请问怎样获取CC2540本身的MAC地址?
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.
你会收到一个 HCI_COMMAND_COMPLETE_EVENT_CODE 事件.
举例, 假如你用的是simpleBLEPeripheral工程, 到peripheral.c 中, 找到 static void gapRole_ProcessOSALMsg( osal_event_hdr_t *pMsg )
其中
case HCI_GAP_EVENT_EVENT:
if ( pMsg->status == HCI_COMMAND_COMPLETE_EVENT_CODE )
加个判断:
if ( pPkt->cmdOpcode == HCI_READ_BDADDR )
然后 pPkt 里面应该就有地址了.