- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, was this issue ever solved?
How to resolve random ble address
I'm using WICED SDK v6.2.1, and trying to use a CYW43438A1 as a peripheral device, to be connected to by devices using Resolvable Private Addresses (from iOS/Android of course).
I can bond with devices, and store the keys, including the IRK and Static Public address, so I know the module can resolve this address somehow.
However, when a previously bonded device reconnects, and asks for the Identity keys, I can only access its RPA address (bd_addr). When the "BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT" triggers, I would expected "p_event_data->paired_device_link_keys_request.key_data.static_addr" to contain the static address, but it is empty.
So how can I resolve the RPA of a device trying to connect, so I can find its static address and match the Link Keys that I store in NVRAM?
I need a function like
wiced_bool_t wiced_bt_dev_get_identity_address( wiced_bt_device_address_t bd_addr, wiced_bt_device_address_t identity_address )
but it is undefined when I build the project. Only seems implemented on the BCM920739. Resolving and saving the keys seems to work on the CYW43438A1, however, so is there a way to ask it for the resolved address?
Thanks,
Dave
- Tags:
- random ble address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please confirm the bonding of devices are successful?
There is no direct API as wiced_bt_dev_get_identity_address . However paired_device_link_keys_request.key_data.static_addr should work.
Can you please share your project ?
Thanks,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear, AnjanaM_61.
I have same question.
I confirm that the bonding of devices are successful.
The field "paired_device_link_keys_request.key_data.static_addr" contains the correct STATIC ADDRESS, when I got event "BTM_PAIRED_DEVICE_LINK_KEYS_UPDATE_EVT".
However, if I do RESET my device CYW290719 and then I do connect Android smartphone, I get event BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT.
And wiced_bt_management_evt_data_t *p_event_data contains STATIC ADDRESS = 00 00 00 00 00 00
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AnjanaM_61,
Thank you for your response.
I can confirm that the devices successfully bond. I can save & read the keys from SPI flash and this works.
I see the same behaviour as d.kozenkov_3902136
I tested using a static public address, and a Resolvable Private Address for the peer device. The log output from my board looks like:
/// Using Static Public Address as Device Address ///
First-time connection:
>> BTM_PAIRED_DEVICE_LINK_KEYS_UPDATE_EVT
- DEVICE ADDRESS: [12:34:56:78:9A:BC]
- DEVICE ADDRESS TYPE: 0
- PUBLIC ADDRESS: [12:34:56:78:9A:BC]
- PUBLIC ADDRESS TYPE: 0
- LTK: [71:73:8F:00:FF:98:88:C0:5B:38:AF:A6:FF:00:BF:FF]
>>> Key added to resolution db, result 0
Then restart board, and reconnect device:
>> [BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT]
- paired_device_link_keys_request.key_data.static_addr: [00:00:00:00:00:00]
/// Using Resolvable Private Address as Device Address ///
First-time connection:
>> BTM_PAIRED_DEVICE_LINK_KEYS_UPDATE_EVT
- DEVICE ADDRESS: [9B:68:B0:5F:63:93]
- DEVICE ADDRESS TYPE: 1
- PUBLIC ADDRESS: [12:34:56:78:9A:BC]
- PUBLIC ADDRESS TYPE: 0
- LTK: [FC:8C:FF:02:C4:7D:44:42:66:C7:D7:00:88:3C:3F:12]
>>> Key added to resolution db, result 0
Then restart board, and reconnect device:
>> [BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT]
- paired_device_link_keys_request.key_data.static_addr: [00:00:00:00:00:00]
Behaviour is the same when using static public or RPA for the peer. The CYW43438A1 does know that the DEVICE ADDRESS TYPE is BLE_ADDR_RANDOM, and I can successfully add this address to the address resolution database using:
wiced_bt_dev_add_device_to_address_resolution_db()
and I also do this at boot, for each address in SPI flash.
There are other WICED_BT_ADDR_TYPE, these are BLE_ADDR_PUBLIC_ID and BLE_ADDR_RANDOM_ID. What do these types refer to? Should a peer using RPA be detected as one of these BT types?
So I still see [00:00:00:00:00:00] for the resolved address, which means I cannot use the Static Public address to search the SPI flash database to find keys to authenticate.