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.

[参考译文] CC2541:CC2541 MAC 地址。

Guru**** 2771175 points

Other Parts Discussed in Thread: CC2541, BLE-STACK

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/845000/cc2541-cc2541-mac-address

器件型号:CC2541
Thread 中讨论的其他器件: BLE-STACK

我有 CC2541。 我将 TI BLE-STACK 用于开发目的。

我正在使用  

GAPRole_GetParameter (GAPROLE_BD_ADDR、guMAC);//用于访问 MAC 地址

置于函数下方的函数内

SimpleBLEBroadcaster Init();  

但是、我无法获得6字节 MAC 地址(BD_ADDRESS)。

您是否有适合这种情况的解决方案或 API 函数。

感谢阅读。

Jignesh narola

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您应该能够使用以下代码将设备 BD 地址放入 BDAddress 数组。

    UINT8 BDAddress[B_ADDR_LEN];

    GAPRole_GetParameter (GAPROLE_BD_ADDR、BDAddress);

    或者、您可以使用 HCI_ReadBDADDRCmd 读取 BD 地址。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    GAPRole_GetParameter (GAPROLE_BD_ADDR、BDAddress);函数正在工作、但应在"GAPROLE_started"之后执行