主题中讨论的其他器件:CC1354P10
您好!
目前、我们正在使用 simplelink_cc13xx_cc26xx_sdk_7_10_01_24 SDK 为 CC1354P10 (外设)开发代码。
我们要在建立连接后捕获外设侧连接的器件(中央设备)的 MAC ID。
您能否指出外设代码中连接的设备(中央设备) Mac ID 更新的位置。
谢谢。此致、
P·R·布拉格
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.
您好!
目前、我们正在使用 simplelink_cc13xx_cc26xx_sdk_7_10_01_24 SDK 为 CC1354P10 (外设)开发代码。
我们要在建立连接后捕获外设侧连接的器件(中央设备)的 MAC ID。
您能否指出外设代码中连接的设备(中央设备) Mac ID 更新的位置。
谢谢。此致、
P·R·布拉格
您好,Prathmesh,
请看一下 SimplePeripheral_processGapMessage 中的 GAP_LINK_Establed_event 处理。
应用程序会接收一个 gapEstLinkReqEvent_t。 如果您查看此结构的定义、您可以看到它包含 器件地址:
typedef struct { osal_event_hdr_t hdr; //!< @ref GAP_MSG_EVENT and status uint8_t opcode; //!< @ref GAP_LINK_ESTABLISHED_EVENT uint8_t devAddrType; //!< Device address type: @ref GAP_Addr_Types_t uint8_t devAddr[B_ADDR_LEN]; //!< Device address of link uint16_t connectionHandle; //!< Connection Handle for this connection uint8_t connRole; //!< Role connection was formed as, @ref GAP_Profile_Roles uint16_t connInterval; //!< Connection Interval uint16_t connLatency; //!< Connection Latency uint16_t connTimeout; //!< Connection Timeout uint8_t clockAccuracy; //!< Clock Accuracy } gapEstLinkReqEvent_t;
您可以使用它来提取地址。 例如,将其添加为 connList 的新成员。
谢谢、
M·H
您好,Prathmesh,
大多数电话都切换其设备地址(例如、每15分钟切换一次)。 在蓝牙规范中、这是使用随机地址调用的。 您可以在此处阅读更多信息:
谢谢、
M·H