Skip to content

Disable LE privacy offload when controller lacks LL Privacy support - #1008

Merged
zxzxwu merged 2 commits into
google:mainfrom
HowardChung1209:disable-privacy-offload-without-ll-privacy
Oct 19, 2026
Merged

zxzxwu merged 2 commits into
google:mainfrom
HowardChung1209:disable-privacy-offload-without-ll-privacy

Conversation

@HowardChung1209

Copy link
Copy Markdown
Contributor

Bumble enables address_resolution_offload by default on Device instances. During power_on(), refresh_resolving_list() sends HCI_LE_Clear_Resolving_List whenever address_resolution_offload or address_generation_offload is enabled, even if the controller does not report LL_PRIVACY in its LE supported features. Controllers without LL Privacy (such as the Raspberry Pi 4 CYW43455) reject this command with UNKNOWN_HCI_COMMAND_ERROR (0x01), aborting device initialization.

Check supports_le_features(hci.LeFeatureMask.LL_PRIVACY) in Device.power_on() after resetting the host and disable both address_resolution_offload and address_generation_offload when LL_PRIVACY is unsupported.

Testing

  • Added unit test test_power_on_disables_privacy_offload_without_ll_privacy in tests/device_test.py.
  • Verified on Raspberry Pi 4 (CYW43455 / hci0) running Bluetooth LE ASHA and HAP tests.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the device power-on sequence to automatically disable address resolution and generation offloading if the controller does not support LL Privacy, and adds a corresponding unit test. The feedback suggests adding informational logging when these offload settings are automatically disabled to provide better visibility to the user.

Comment thread bumble/device.py Outdated
Comment on lines +2942 to +2944
if not self.supports_le_features(hci.LeFeatureMask.LL_PRIVACY):
self.address_resolution_offload = False
self.address_generation_offload = False

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It would be highly beneficial to log an informational message when address_resolution_offload or address_generation_offload are automatically disabled due to the lack of controller-side LL_PRIVACY support. This provides clear visibility to the user as to why their configured privacy offload settings are being overridden during initialization.

Suggested change
if not self.supports_le_features(hci.LeFeatureMask.LL_PRIVACY):
self.address_resolution_offload = False
self.address_generation_offload = False
if not self.supports_le_features(hci.LeFeatureMask.LL_PRIVACY):
if self.address_resolution_offload or self.address_generation_offload:
logger.info("Controller does not support LL Privacy; disabling privacy offloads")
self.address_resolution_offload = False
self.address_generation_offload = False

Bumble enables `address_resolution_offload` by default on `Device`
instances. During `power_on()`, `refresh_resolving_list()` sends
`HCI_LE_Clear_Resolving_List` whenever `address_resolution_offload` or
`address_generation_offload` is enabled, even if the controller does not
report `LL_PRIVACY` in its LE supported features. Controllers without LL
Privacy (such as Raspberry Pi 4 `CYW43455`) reject this command with
`UNKNOWN_HCI_COMMAND_ERROR` (`0x01`), aborting device initialization.

Check `supports_le_features(hci.LeFeatureMask.LL_PRIVACY)` in
`Device.power_on()` after resetting the host and disable both
`address_resolution_offload` and `address_generation_offload` when
`LL_PRIVACY` is unsupported.
@HowardChung1209
HowardChung1209 marked this pull request as ready for review October 16, 2026 12:34
@HowardChung1209
HowardChung1209 force-pushed the disable-privacy-offload-without-ll-privacy branch from 0675c8b to d13c775 Compare October 16, 2026 12:34
Comment thread bumble/device.py Resolved
Comment thread bumble/device.py Resolved
@zxzxwu
zxzxwu merged commit 82d8fe2 into google:main Oct 19, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants