STM32WB55 BLE Stack v1.21.0.3 - Unable to enable LE Privacy (Resolvable Private Address)
Hi ST Team,
I am trying to enable Bluetooth LE Privacy (Resolvable Private Address) on an STM32WB55CG.
Environment
- MCU: STM32WB55CG
- STM32CubeWB Package: v1.23.0
- BLE Stack: v1.23.0.3
- FUS: v1.2.0.0
What I changed
I changed the address type from:
#define CFG_BLE_ADDRESS_TYPE PUBLIC_ADDRto
#define CFG_BLE_ADDRESS_TYPE RESOLVABLE_PRIVATE_ADDRThe generated code calls:
aci_gap_init(
role,
2,
...
);and
aci_gap_set_discoverable(
...
RESOLVABLE_PRIVATE_ADDR,
...
);Initially, aci_gap_set_authentication_requirement() was also using CFG_BLE_ADDRESS_TYPE as the Identity Address Type. I found an ST forum discussion mentioning this is incorrect, so I changed it to:
aci_gap_set_authentication_requirement(
...
PUBLIC_ADDR
);However, the behavior did not change.
Observed behavior
With
CFG_BLE_ADDRESS_TYPE = PUBLIC_ADDR- Pairing succeeds.
- Device works normally.
With
CFG_BLE_ADDRESS_TYPE = RESOLVABLE_PRIVATE_ADDR- Connection is established.
- Pairing fails.
ACI_GAP_PAIRING_COMPLETE_VSEVT_CODEreports Status = 1.HCI_DISCONNECTION_COMPLETE_EVENTreports Reason = 0x13 (Remote User Terminated Connection).
Additional observations
I also tried the official BLE_P2PServer example from STM32CubeWB v1.23.0.
Simply changing
#define CFG_BLE_ADDRESS_TYPE RESOLVABLE_PRIVATE_ADDRcauses a compilation error because a_srd_bd_addr is not defined:
error: 'a_srd_bd_addr' undeclaredThe example appears to assume every non-public address is a Static Random Address and attempts to call:
aci_hal_write_config_data(CONFIG_DATA_RANDOM_ADDRESS_OFFSET, ...)which is not applicable for Resolvable Private Addresses.
Question
- What is the correct procedure to enable Controller LE Privacy / Resolvable Private Address on STM32WB55 using BLE Stack v1.21.0.3?
- Is there an official example demonstrating LE Privacy on the STM32WB legacy BLE stack?
- Should additional APIs (such as Resolving List management) be used? My project does not expose APIs such as:
aci_gap_add_devices_to_resolving_list()or
aci_gap_add_devices_to_list()If there is an application note or reference example for enabling LE Privacy on STM32WB, could you please point me to it?
Thank you.
