Showing results for 
Search instead for 
Did you mean: 

Bluetooth SDK

New Contributor II

Please help me to understand how to implement the following scenario: my device based on CYW20706 is BLE peripheral that is able to accept pairing from multiple clients and maintain bonding info over power cycles.

According to WBT101-04B-BLE-Ntfy-Sec.pdf document, if bonding info for the remote device being connecting exists, it shall be loaded upon receiving BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT. Now comes the question: the proposed solution is to find the proper bonding info in NV database, based on the MAC address of the remote. However, if the address is random, the one from the database and the one coming with the BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT don't match. I checked the data provided in the wiced_bt_device_link_keys_t structure delivered with BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT, and there only 'bd_addr' (the random one) and 'key_data.le_keys_available_mask' are set. So, there's no chance to find out whether the data from NV database belongs to the remote device being connecting.

However, if we use only one device, it works pretty well: when BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT is received we load bonding data without checking MAC address, and it gets accepted.

I did find some tickets that discuss similar issues, for example, this one, but they describe scenario with one remote device only.

For my tests I'm using latest version of ModusToolbox 2.4.0 with Bluetooth SDK 3.1.0 on CYW920706WCDEVAL, with LE_Battery_Service sample application.

2 Replies

Hello @kf 

I would suggest you to go through the application flow example from peripheral-privacy example available here:  

Hope this will help to you to understand managing multiple device bonding with RPA .

Thanks & Regards,


New Contributor II

Hello Anjana,

Thank you for providing the example. However, it seems to have the same problem I was talking about in the description of this ticket: in BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT is looking for matching BLE address, that simply cannot work with random addresses, so the user will be forced to start another pairing.

Also please note that the provided example is not available for my hardware CYW920706WCDEVAL.

Please explain how to find matching link key for BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT.

Best regards,