Open jori-nordic opened 3 months ago
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
Describe the bug
The Bluetooth specification says that (when using legacy advertising) it is forbidden to update the random address whilst another role is running. That means we can't start a scanner while an advertiser is running or the opposite.
With the resume feature, it is very probable that the host attempts to re-start advertising while the scanner is already running.
Proposed change
We should deprecate that feature. It has also been the source of many race-condition bugs (finding PRs left as exercise to the reader).
With the addition of the
recycled
callback, that feature is now implementable by the application itself. https://github.com/zephyrproject-rtos/zephyr/blob/e32c2ee2968599e893172a0221bab7d4bde3632b/include/zephyr/bluetooth/conn.h#L1003-L1016Additional context