Other Parts Discussed in Thread: SYSCONFIG
除了在Syscfg裡可以設定藍牙廣播間隔時間,要如何在Code裡面設定廣播時間
例如:if達成某個條件Interval變成500ms,else就保持1000ms
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好,
请查看这个link在sysconfig后的代码片段(已附上)
这个是API列表
// Advertisement Params 1
GapAdv_params_t advParams1 = {
.eventProps = GAP_ADV_PROP_CONNECTABLE | GAP_ADV_PROP_LEGACY | GAP_ADV_PROP_SCANNABLE,
.primIntMin = 800,
.primIntMax = 800,
.primChanMap = GAP_ADV_CHAN_37,
.peerAddrType = PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID,
.peerAddr = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa },
.filterPolicy = GAP_ADV_WL_POLICY_ANY_REQ,
.txPower = GAP_ADV_TX_POWER_NO_PREFERENCE,
.primPhy = GAP_ADV_PRIM_PHY_1_MBPS,
.secPhy = GAP_ADV_SEC_PHY_1_MBPS,
.sid = 0
};