Skip to main content
gocchan
Senior
Oct 9, 2026 6:49 AM UTC
Question

Bonding fails

Hello, 


I'm developing software for the STM32WBA2. Bonding is a required feature of this project, so I've set the bonding-related parameters as follows:

 

CFG_BONDING_MODE: Bonding mode (0x01)
CFG_ENCRYPTION_KEY_SIZE_MAX: 16
CFG_ENCRYPTION_KEY_SIZE_MIN: 8
CFG_IO_CAPABILITY: Display Yes No (0x01)
CFG_MITM_PROTECTION: MITM protection required (0x01)
CFG_SC_SUPPORT: Secure Connections Pairing supported but optional (0x01)
CFG_KEYPRESS_NOTIFICATION_SUPPORT: Keypress notification not supported (0x00)

 

I've also attached app_conf.h and ble_conf.h.
However, when I connect using ST BLE Toolbox and press the Bond button, the Bluetooth connection is lost.
What could be the cause?
Is it possible to view communication logs using ST BLE Toolbox?

 

Best regards, 
Gotoda
 

3 replies

ST Technical Moderator
Oct 9, 2026 5:33 PM UTC
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
gocchan
gocchanAuthor
Senior
Oct 22, 2026 6:35 AM UTC

Hello, 

When I select the WBA25 HeartRate in "Start My project from Example" and build, bonding works correctly.

However, I am currently developing with the WBA23. Since there doesn't seem to be an example for the WBA23, I selected WBA23KEUx in "Start My project from MCU," but bonding fails. I believe the contents of STM32_WPAN in CubeMX are the same.

Are there any other parameters I should be setting?

gocchan
gocchanAuthor
Senior
Oct 26, 2026 6:55 AM UTC

I've attached the current .ioc file.

I can establish a Bluetooth connection, but I can't perform pairing/bonding.

Are there any other settings I need to configure besides STM32_WPAN?

Or do I need to add anything to the source code?