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.

CC2640R2L: How does CC2640R2L get the Bluetooth static MAC of the host

Part Number: CC2640R2L

case GAPROLE_CONNECTED:
{
         linkDBInfo_t linkInfo;
         uint8_t numActive = 0;
         uint8 MacAddr[8] = {0}; //!< Other Device's address
         numActive = linkDB_NumActive();

         // Use numActive to determine the connection handle of the last
         // connection

         if ( linkDB_GetInfo( numActive - 1, &linkInfo ) == SUCCESS )
         {              

                 Display_print1("numActiveaddrType: %d\r\n", linkInfo.addrType);

                 Display_print1("Num Conns: %d\r\n", (uint16_t)numActive );

                 Display_print1("addr NEW:%s\r\n",Util_convertBdAddr2Str(linkInfo.addr));

                   linkInfo.addrd地址是随机的,怎样可以获取到主机的静态地址呢?

  • 您好,

    感谢您的对TI产品的关注!为更加有效地解决您的问题,我需要多一些时间查看这个问题,稍后会为您解答。

  • 您好,

    您看到的地址可是一种随机地址形式。它可能是一个随机静态地址(每个电源周期都会更改),也可能是一个私有地址(随时间变化)。 BLE 堆栈能够解析所有这些地址以正确识别哪个设备是哪个。User's Guide 的 Resolving Private Addresses 部分讨论了如何完成此操作的过程。User's Guide  Privacy 章节提供了很多关于不同类型地址的非常有价值的信息。