Skip to main content
BStic.2
Senior
Apr 22, 2022 10:31 PM UTC
Question

I updated to the 1.13.3 stack and it seems that LE Privacy is broken.

I went from the v1.12.1 stack to the v1.13.3 stack and LE Privacy seems to be no longer working. It advertises, but always with the static random address, not a random resolvable address. Also, the address never changes. Anyone else seeing this? Is there some new interface I need to use to get random resolvable addresses?

This topic has been closed for replies.

5 replies

Remy ISSALYS
ST Technical Moderator
Apr 25, 2022 1:29 PM UTC

Hello,

If you want to use a random resolvable address, you need to configure the last parameter of aci_gap_set_authentication_requirement command (i.e CFG_BLE_ADDRESS_TYPE).

Best Regard

BStic.2
BStic.2Author
Senior
Apr 25, 2022 3:10 PM UTC

Thank you, I tried that. Passing RESOLVABLE_PRIVATE_ADDR to aci_gap_set_authentication_requirement results in a return code of BLE_STATUS_INVALID_PARAMS.

The comment for the function states that only these parameters are allowed.

 * @param Identity_Address_Type Identity address type.

 *    Values:

 *    - 0x00: Public Identity Address

 *    - 0x01: Random (static) Identity Address

Remy ISSALYS
ST Technical Moderator
Apr 28, 2022 8:31 AM UTC

Hello,

You shall use this parameter 0x01: Random (static) Identity Address in aci_gap_set_authentication_requirement command and use RESOLVABLE_PRIVATE_ADDR  parameter in aci_gap_set_discoverable command.

Best Regards

BStic.2
BStic.2Author
Senior
Apr 28, 2022 3:19 PM UTC

Ok, so in the following:

aci_gap_init I am passing 0x02 for privacy_enabled (ive tried 0x01 - like it used to be, and I get no difference)

aci_gap_set_authentication_requirement I am passing 0x01 for Identity_Address_Type

aci_gap_set_discoverable I am passing RESOLVABLE_PRIVATE_ADDR(0x02) for Own_Address_Type

The address never changes from the static random address. The device still advertises with the static random address (exactly what I program for CONFIG_DATA_RANDOM_ADDRESS_OFFSET) not a random resolvable address. This functionality has definitely changed from v1.12.1 - it used to work exactly the way I had it configured.

Remy ISSALYS
ST Technical Moderator
May 11, 2022 9:50 AM UTC

Hello,

Indeed, the privacy behavior have changed since v1.12 in order to be align with Bluetooth standards. In order to have a random resolvable address follow these steps:

  • aci_gap_init with 0x02 for privacy_enabled
  • aci_gap_set_authentication_requirement with 0x01 for Identity_Address_Type
  • aci_hal_write_config_data with 0x2E for Offset and for example 0xCC1122334455 for Value (The two upper bits shall be set to 1) 
  • aci_gap_add_devices_to_resolving_list with 0x01 for num_of_resolving_list_entries and a dummy address different of 0 for peer_identity_address
  • aci_gap_set_discoverable with 0x02 for Own_Address_Type

Best Regards