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:
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
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
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
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
Hi uniben,
I see the case, thanks for the indication, i will let the SDK team now.
Thanks MT_dialog