在廣播中啟用遠距模式后 observer無法獲取廣播內(nèi)容

遠距模式好像只有這個配置能被發(fā)現(xiàn) 但advertData中的內(nèi)容丟失了

uint8_t initial_adv_event_type = GAP_ADTYPE_EXT_NONCONN_NONSCAN_UNDIRECT;

GAP_SetParamValue(TGAP_ADV_PRIMARY_PHY, GAP_PHY_VAL_LE_CODED);
GAP_SetParamValue(TGAP_ADV_SECONDARY_PHY, GAP_PHY_VAL_LE_CODED);



不清楚以下幾種廣播方式的區(qū)別 有沒有辦法將advertData中的內(nèi)容也發(fā)出去

#define GAP_ADTYPE_EXT_CONN_DIRECT????????????
#define GAP_ADTYPE_EXT_SCAN_UNDIRECT?????????
#define GAP_ADTYPE_EXT_NONCONN_NONSCAN_UNDIRECT
#define GAP_ADTYPE_EXT_CONN_UNDIRECT???????????
#define GAP_ADTYPE_EXT_SCAN_DIRECT????????????
#define GAP_ADTYPE_EXT_NONCONN_NONSCAN_DIRECT

您好,可以參考主機例程,在ObserverEventCB回調(diào)中添加?case GAP_EXT_ADV_DEVICE_INFO_EVENT: 事件。


有效果

???? case GAP_EXT_ADV_DEVICE_INFO_EVENT:
??????? {
??????????? int i;
??????????????????????? for(i=0; ideviceInfo.dataLen; i++)
??????????????????????? {
??????????????????????????? PRINT("%02x ",pEvent->deviceInfo.pEvtData[i]);
??????????????????????? }
??????????????????????? PRINT("\n");

?? }

但數(shù)據(jù)和廣播對不上? 得到的結果分別為observer 得到的數(shù)據(jù)分別為6f 10 d0 ? 00 00 00 ??


static uint8_t advertData[] = {

??? 0x02,
??????? GAP_ADTYPE_FLAGS,
??????? GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED,

??????? 0x02,
??????? 0x01,0x18

};

static uint8_t advertData2[] = {

??? 0x02,
??????? GAP_ADTYPE_FLAGS,
??????? GAP_ADTYPE_FLAGS_LIMITED,

??????? 0x02,
??????? 0x01,0x17

};


static void advTask(void)
{
? if (open) {
??? GAP_UpdateAdvertisingData(Broadcaster_TaskID,TRUE,sizeof(advertData2), advertData2);
??? open = FALSE;
? }else {
??? GAP_UpdateAdvertisingData(Broadcaster_TaskID,TRUE,sizeof(advertData), advertData);
??? open = TRUE;
? }

}


謝謝 用pEvent->deviceExtAdvInfo.pEvtData 就ok


只有登錄才能回復,可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频