cancel
Showing results for 
Search instead for 
Did you mean: 

Delete address from security_db

jampino
Associate II
Posted on November 08, 2017 at 17:45

Hello,

I have differents slave devices bonded to a master device, I would like to remove a unique address currently bonded to that master device, is it possible to do it without using the aci_gap_clear_security_db() function as this will delete all the bonded devices.

Thank you

4 REPLIES 4
Antonio Vilei
Senior III
Posted on November 10, 2017 at 14:23

Hi Jamp,

with the current version of the BlueNRG-1 stack, you can't delete an individual address and you have to clear the whole database of bonded devices by using aci_gap_clear_security_db().

When the database of bonded devices is full, older entries will be automatically overwritten by newer ones, so the chip keeps the most relevant information only. Anyway, if you have other reasons to delete an individual device, I'm interested in getting more information about your use case.

Best regards,

Antonio

Posted on November 13, 2017 at 17:15

Hello Antonio,

What I am trying to do is to send different information from the slave to the master when the slave starts advertising ( I have different scenarios). I want to send for example 0x31 when I want to bond slave and master, and 0x32 when I want to forget that connection. (The master can have different slave devices registered)

Doing so I can bond both devices when sending 0x31, then I can send the 0x32 when I want to forget that device, I use the  aci_gap_clear_security_db

() function on the slave, that is fine, but if I do not do anything on the Master I can't get both of them bonded again, when I try to pair them again I get on the master the aci_gap_bond_lost_event, I try to use the function aci_gap_allow_rebond( ConnectionHandle) when the event is generated but the response is always an error.

That is way I was asking if there is a different way to delete a single device from the Master without using the aci_gap_clear_security_db

() as this will remove all the other devices from the list.

Thank you

Posted on November 15, 2017 at 17:46

It's OK to use aci_gap_allow_rebond() on the slave, but please remember that when calling aci_gap_send_pairing_req() on the master, you must use the force rebond option, otherwise the pairing request will fail because the master thinks that the bonding is still valid and will refuse it.

Best regards,

Antonio

jampino
Associate II
Posted on December 12, 2017 at 15:16

Hello all,

I am having some problems to re-connect two devices, I am using blueNRG-1. First I get two devices paired, I can close the connection and connected again without no problems but if I removed the battery and put back from one of them, I can't get them connected again. I can see on the database the MAC on both devices but I can't see why I am having the problem to connect after removing the battery.

In both cases before and after removing the battery I am using hci_le_set_scan_response_data()

thank for your help