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.

CC2640: 获取连接设备的实际蓝牙地址

Part Number: CC2640

我在使用CC2640作为蓝牙服务方进行广播,想获取连接设备的MAC地址,但目前获取到的同一个外设设备的地址是变化的。

想问一下如何获取连接CC2640的蓝牙设备实际MAC地址。

  • 根据相关帖(链接)合并内容如下:

    我是使用如下函数获取的:

    linkDB_GetInfo()
    uint8 linkDB_GetInfo ( uint16 connectionHandle,
    linkDBInfo_t * pInfo
    )
    Get information about a link

    Copies all of the link information into pInfo. Uses the connection handle to search the link database.

    Parameters
    connectionHandle controller link connection handle.
    pInfo output parameter to copy the link information
    Returns
    SUCCESS
    FAILURE connection wasn't found

  • 您好,

    在这里您应该使用函数 linkDB_GetInfo()。linkDBInfo_t * pInfo 指针包含配对设备的 BLE 地址。您有发现地址正在更改,那么是配对设备可能没有使用公共地址,而是使用 RPA,这将导致地址定期更改。