1,可以做個循環(huán),根據(jù)最大的綁定數(shù)量,去遍歷下當前的綁定表,
2,bondsaved時候 可以根據(jù)當前的連接地址去 解析出對應的public device address
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//函數(shù)的頭文件
/**
?* @brief?????? Resolve an address from bonding information.
?*
?* @param?????? addrType - device's address type. Reference GAP_ADDR_TYPE_DEFINES in gap.h
?* @param?????? pDevAddr - device's address
?* @param?????? pResolvedAddr - pointer to buffer to put the resolved address
?*
?* @return????? bonding index (0 - (GAP_BONDINGS_MAX-1) if found,
?*????????????? GAP_BONDINGS_MAX if not found
?*/
extern uint8 GAPBondMgr_ResolveAddr( uint8 addrType, uint8 *pDevAddr, uint8 *pResolvedAddr );
?
?
?
//------------------使用---------------------------------------------------
?
PRINT( "Connected.. %02x-%02x-%02x-%02x-%02x-%02x,type:%02x\n",? event->devAddr[0],event->devAddr[1],event->devAddr[2],\
??????????????????????????????????????????????????????event->devAddr[3],event->devAddr[4],event->devAddr[5],event->devAddrType);
//GAP_ResolvePrivateAddr( u8 *pIRK, u8 *pAddr );
uint8_t addr[6]={0};
PRINT("GAPBondMgr_ResolveAddr %02x\r\n",
??????????
//根據(jù)私有可解析地址解析出public device address
GAPBondMgr_ResolveAddr(event->devAddrType,event->devAddr,addr));
for(uint8_t i=0;i<6;i++)
{
?????????PRINT("%02x ",addr[i]);
}
PRINT("\r\n");