2025-04-09 1:35 PM - edited 2025-04-09 1:42 PM
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
Solved! Go to Solution.
2025-04-10 6:40 AM
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.
2025-04-10 6:40 AM
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.