zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.59k stars 6.48k forks source link

Bluetooth: Host: Scanner never updates its RPA when timeout != 0 #73634

Closed rugeGerritsen closed 2 months ago

rugeGerritsen commented 3 months ago

Describe the bug When scan_params.timeout != 0 the RPA never updates.

To Reproduce Run the test case added in https://github.com/zephyrproject-rtos/zephyr/pull/73633

Expected behavior The RPA updates.

Impact It will become possible to track the scanning device. Adding support for concurrent and scanning and initiating with a timeout will become harder.

rugeGerritsen commented 3 months ago

Possible solutions:

  1. Start using controller based privacy (https://github.com/zephyrproject-rtos/zephyr/issues/71751).
  2. Add logic to start and stop the scanner for RPA updates like we have for the initiator and advertiser.
    • Host needs to keep track of scanner timeout.
    • Either stop using the controller scanner timeout feature, or combine it with a host timer.