TI中文支持网
TI专业的中文技术问题搜集分享网站

想问一下,在multi_role 中的 pEvent->deviceInfo*pEvtData是扫描到的从机的广播数据吗?

谢谢各位

Alvin Chen:

// End of discovery reportcase GAP_DEVICE_DISCOVERY_EVENT:{uint8_t i;
// Discovery completescanningStarted = FALSE;
// If devices were foundif (pEvent->discCmpl.numDevs > 0){// Update menutbm_setItemStatus(&mrMenuMain, TBM_ITEM_1, TBM_ITEM_NONE);// Loop through discovered devices to store in static device listfor (i = 0; i < pEvent->discCmpl.numDevs; i++){// Store address typedevList[i].addrType = pEvent->discCmpl.pDevList[i].addrType;
// Store event type (adv / scan response)devList[i].eventType = pEvent->discCmpl.pDevList[i].eventType;
// Store addressmemcpy(devList[i].addr, pEvent->discCmpl.pDevList[i].addr, B_ADDR_LEN);
// Convert address to stringuint8_t *pAddr = (uint8_t*)Util_convertBdAddr2Str(devList[i].addr);
// Copy converted string to static device listmemcpy(devList[i].strAddr, pAddr, B_STR_ADDR_LEN);

Alvin Chen:

回复 user5758795:

后面不是有注释了。
你扫描回应包对应的就是peripheral 里面的扫描回应包的格式。

addrtype:
/** @} End GAP_Discovery */

/** @defgroup GAP_Addr_Types Address Types* @{*/
#define ADDRTYPE_PUBLIC0x00//!< Public Device Address
#define ADDRTYPE_RANDOM0x01//!< Random Device Address
#define ADDRTYPE_PUBLIC_ID0x02//!< Public Identity Address (corresponds to peer's RPA)
#define ADDRTYPE_RANDOM_ID0x03//!< Random (static) Identity Address (corresponds to peer's RPA

赞(0)
未经允许不得转载:TI中文支持网 » 想问一下,在multi_role 中的 pEvent->deviceInfo*pEvtData是扫描到的从机的广播数据吗?
分享到: 更多 (0)