本人用的BLE是TIcc2541,1.3.2协议栈
1、首先要说明的是,iphone手机将信息保护了,BLE设备读到的iphone地址是随机的,每次连接都会不同
2、下面我就具体说明如何查看手机的mac地址
首先我的程序是作为从机的,从机配好开始广播,事件SBP_START_DEVICE_EVT ---> GAPRole_StartDevice( &simpleBLEPeripheral_PeripheralCBs );
然后进入peripheral.c中的GAPRole_ProcessEvent函数(关于回调函数我就不提了),
由事件SYS_EVENT_MSG --->gapRole_ProcessOSALMsg( (osal_event_hdr_t *)pMsg );
---> GAP_MSG_EVENT ---> gapRole_ProcessGAPMsg( (gapEventHdr_t *)pMsg );
---> GAP_LINK_ESTABLISHED_EVENT --->
#define GAP_LINK_ESTABLISHED_EVENT 0x05
//!< Sent when the Establish Link Request is complete. This event is sent as an OSAL message defined as gapEstLinkReqEvent_t.
uint8 devAddr[B_ADDR_LEN]; //!< Device address of link
typedef struct
{
osal_event_hdr_t hdr; //!< GAP_MSG_EVENT and status