Skip to main content
User1655833706281357277
Associate III
April 9, 2025
Solved

STM32WB55 BLE client will not re-connect to a paired server

  • April 9, 2025
  • 1 reply
  • 497 views

I have a BLE device that uses BLE security mode 1, BLE security level 3 authenticated pairing.  It works with iOS, Windows, and MacOS.   It has an unencrypted characteristic for the initial connection and an encrypted characteristic for use after pairing.  I have an STM32WB55 BLE client that can connect to the unencrypted characteristic, complete the pairing process, and then switch to the encrypted characteristic for normal communication.  However, when I disconnect and then connect back in to the server, the STM32WB55 can talk on the unencrypted characteristic, but attempts to transmit to the server on the the encrypted characteristic fail (error code 0x91).  Both devices report bonding information that correspond to each other properly.  Is there some BLE stack call needed when connected to a bonded server that I am not finding in the documentation?   The connect/pairing/switch-to-encrypted-characteristic process works repeatably.  What is there about connecting to a paired device that I am missing?

Thank you,

--b

 

Best answer by User1655833706281357277

Okay, my bad.   Apparently you HAVE to send a pairing request every connection for this to work.  Subsequent pairing requests after bonding don't send the request with the force arg set to zero, but they do enable encryption.  Fun.

 

1 reply

User1655833706281357277
User1655833706281357277AuthorBest answer
Associate III
April 10, 2025

Okay, my bad.   Apparently you HAVE to send a pairing request every connection for this to work.  Subsequent pairing requests after bonding don't send the request with the force arg set to zero, but they do enable encryption.  Fun.