cancel
Showing results for 
Search instead for 
Did you mean: 

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

User1655833706281357277
Associate III

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
User1655833706281357277
Associate III

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.

 

View solution in original post

1 REPLY 1
User1655833706281357277
Associate III

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.