cancel
Showing results for 
Search instead for 
Did you mean: 

Lost bonding key now I get connection disconnection

DS.4
Senior II

Some odd behavior I experience with STM32WB peripheral.

 

Bonding list was cleared, after having been boned with a master. 

 

Now when same master connects to me, I get a connection and an immediate disconnection!

 

What may be the cause? How to prevent that behavior when clearing Bonding list on my side?

 

4 REPLIES 4
STTwo-32
ST Employee

Hello @DS.4 

the behavior you're experiencing with the STM32WB peripheral where the bonding list is cleared and then the same master connects and immediately disconnects could be related to the bonding information not being properly stored or retained after certain events, such as a reset or a forced disconnection. 

To prevent the loss of bonding information and the subsequent immediate disconnection when the same master attempts to reconnect, you should:

  1. Ensure that the link is terminated properly using the ACI_GAP_TERMINATE command.
  2. Wait for at least 100 ms after receiving the HCI_DISCONNECTION_COMPLETE_EVENT before issuing any new commands or resets to allow the system to save the bonding information to non-volatile memory.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Bonding list is not retained on peripheral, I actually forcefully cleared it, so its empty.

It exists only on client side ( that previously  connected and bonded to that  peripheral ) .

Wondering what is the flow of events on this scenario, when that client connects again?

Client knows the peripheral, but peripheral no longer knows that client.

Hello @DS.4 

Could you please clarify more about this. 

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Interested to know what happens in this case on ;peripheral side:

1.Peripheral (STM32WB55) and client Connected -Paired - Bonded.

2. Disconnected.

3. Peripheral (STM32WB55) lost keys.( erased them e.g.)
4. Client attempts to connect ( client still has his key)

 

How will pairing behave on Peripheral Side? Will it disconnect the client? Will it try to repair? Is there some api commands app can use to configure/handle this scenario?