⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
uniben
Offline
Last seen:2 years 4 weeks ago
Joined:2016-08-23 09:46
Loosing Bonded Device

Device = DA14681
SDK = 1.0.12-1078

Hello,

In a central application I'm trying to reconnect an already bonded device.
If the device is switched off, it will be removed from the bonded devices list.
Usually I need to reconnect that device without bonding again.

In my application I implemented a connection timeout, using ble_gap_connect_cancel() after the timeout expires.

Many thanks for your help in advance. uniben.

Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
Hi uniben,

Hi uniben,

I am sorry but i dont quite get the question, since the device is a bonded device that means that you have the bonding data in your flash (what do you mean that if it switced off, it will be removed from the bonded list ? The 68x stores the bonding data in the flash which retains its data as long as the CONFIG_BLE_STORAGE macro is used, please check the UM-B-044 Software Platform Reference on paragraph 7.3.5), since you have those data in the flash you can directly issue an encryption request (this is done by invoking in the connection callback the ble_gap_set_level(), this will search for the keys of the existing connection and if there are no keys a paring request will be issued) after connection without having to go through the pairing process again, so that the link will be encrypted with the existing keys (if no keys you should go through the pairing procedure again, which is also implemented by the SDK). What exactly is the question ?

Thanks MT_dialog

uniben
Offline
Last seen:2 years 4 weeks ago
Joined:2016-08-23 09:46
Hi,

Hi,

我仍然使用CONFIG_BLE_STORAGE descri宏bed.

I found out, that calling ble_gap_connect_cancel() removes the bonding data from flash for the device I tried to connect with ble_gap_connect() before.

Thanks uniben

MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
Hi uniben,

Hi uniben,

Can you please explain what exactly is the problem, you mentioned that when calling the ble_gap_connect_cancel() the data on the flash are getting erased (at least this is what i understand), i dont see any interaction with the flash when the ble_gap_connect_cancel() is invoked. So can you please share some details on the issue ? Do you actually have the bonding data in the flash and upon cancelling the connection those data are erased from the flash ?

Thanks MT_dialog

uniben
Offline
Last seen:2 years 4 weeks ago
Joined:2016-08-23 09:46
Hello MT_dialog,

Hello MT_dialog,

This is exactly what happens: ble_gap_connect_cancel() returns to ble_mgr_gapm_connect_cmp_evt_handler() and there bonded data will be deleted from flash.

The attached patch fixes this issue.

Hope this helps improving the sdk.

Thanks uniben

MT_dialog
Offline
Last seen:2 months 2 weeks ago
Staff
Joined:2015-06-08 11:34
Hi uniben,

Hi uniben,

I see the case, thanks for the indication, i will let the SDK team now.

Thanks MT_dialog