- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I am using PSoC 63 BLE and this function to get the bdAddress of the connected peer devices.
//Print the Connected Device BT Address
cy_stc_ble_conn_handle_t connectionIndParameter = *(cy_stc_ble_conn_handle_t*) evenParam;
cy_stc_ble_gap_peer_addr_info_t peerBdAdd;
peerBdAdd.bdHandle = connectionIndParameter.bdHandle;
uint8_t retbdAddr = Cy_BLE_GAP_GetPeerBdAddr(&peerBdAdd);
retbdAddr = Cy_BLE_GAP_GetPeerBdAddr(&peerBdAdd);
//uint8_t bdAddress[6];
printf("\r\n Error: %x",retbdAddr);
printf( "\r\n - > Device bdAddress:");
for(uint i=CY_BLE_BD_ADDR_SIZE ; i>0 ; i--)
{
printf( "%2.2x ", (uint8_t) peerBdAdd.bdAddr.bdAddr[i-1]);
//bdAddress = peerBdAdd.bdAddr.bdAddr[i-1];
}
printf("\r\n");
It prints a 6 bytes address, however this is not the connected device address. Usually after a long session of connections and disconnections trying things out, this address changes as well.
Any ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
At my end, I'm able to printing the correct central device address in CY_BLE_EVT_GATT_CONNECT_IND event. Could you please check the connected device address type ?
Most of the smart phones use RPA(Random Private Address) as their Bluetooth device address, where this Resolvable Private Addresses (RPA) will be changed at regular intervals of time. So, if the central device uses the RPA address then it can changes over a period of time.
Thanks,
P Yugandhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
At my end, I'm able to printing the correct central device address in CY_BLE_EVT_GATT_CONNECT_IND event. Could you please check the connected device address type ?
Most of the smart phones use RPA(Random Private Address) as their Bluetooth device address, where this Resolvable Private Addresses (RPA) will be changed at regular intervals of time. So, if the central device uses the RPA address then it can changes over a period of time.
Thanks,
P Yugandhar.