请问扫到的设备的信息存在哪里,一直没找到
Viki Shi:
请看如下两个事件:
GAP_DEVICE_INFO_EVENT 每发现一个设备就会产生一次 ,对应的是pEvent->deviceInfoGAP_DEVICE_DISCOVERY_EVENT 是发现过程完成了产生一次,对应的是pEvent->discCmpl.numDevs
可在相应的结构体中查找信息,比如:
typedef struct
{osal_event_hdr_thdr;//!< GAP_MSG_EVENT and statusuint8 opcode;//!< GAP_DEVICE_INFO_EVENTuint8 eventType;//!< Advertisement Type: @ref GAP_ADVERTISEMENT_REPORT_TYPE_DEFINESuint8 addrType;//!< address type: @ref ADDRTYPE_DEFINESuint8 addr[B_ADDR_LEN];//!< Address of the advertisement or SCAN_RSPint8 rssi;//!< Advertisement or SCAN_RSP RSSIuint8 dataLen;//!< Length (in bytes) of the data field (evtData)uint8 *pEvtData;//!< Data field of advertisement or SCAN_RSP
} gapDeviceInfoEvent_t;typedef struct
{osal_event_hdr_thdr;//!< GAP_MSG_EVENT and statusuint8 opcode;//!< GAP_DEVICE_DISCOVERY_EVENTuint8 numDevs;//!< Number of devices found during scangapDevRec_t *pDevList;//!< array of device records
} gapDevDiscEvent_t;