Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: Advertising resume functionality is broken #72567

Closed
jori-nordic opened this issue May 10, 2024 · 2 comments · Fixed by #73395 · May be fixed by nrfconnect/sdk-zephyr#2287
Closed

Bluetooth: Advertising resume functionality is broken #72567

jori-nordic opened this issue May 10, 2024 · 2 comments · Fixed by #73395 · May be fixed by nrfconnect/sdk-zephyr#2287
Assignees
Labels
area: Bluetooth Host area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Stale

Comments

@jori-nordic
Copy link
Collaborator

jori-nordic commented May 10, 2024

Describe the bug

  1. This feature only works when using legacy advertising
  2. This feature will attempt to change the random address while a scanner/initiator is running

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.

/** @brief A connection object has been returned to the pool.
*
* This callback notifies the application that it might be able to
* allocate a connection object. No guarantee, first come, first serve.
*
* Use this to e.g. re-start connectable advertising or scanning.
*
* Treat this callback as an ISR, as it originates from
* @ref bt_conn_unref which is used by the BT stack. Making
* Bluetooth API calls in this context is error-prone and strongly
* discouraged.
*/
void (*recycled)(void);

Additional context

image

@jori-nordic jori-nordic added bug The issue is a bug, or the PR is fixing a bug area: Bluetooth Host labels May 10, 2024
@jori-nordic jori-nordic self-assigned this May 10, 2024
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue May 14, 2024
@aescolar aescolar added the priority: low Low impact/importance bug label May 14, 2024
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue May 21, 2024
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue May 27, 2024
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue May 28, 2024
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue May 28, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue May 28, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Jun 4, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Jun 12, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>

wip note: BT_LE_PER_ADV_DEFAULT
jori-nordic added a commit to jori-nordic/zephyr that referenced this issue Jul 2, 2024
This test verifies a convoluted interaction between the scanner and the
resumable advertiser feature in the host.

That feature is going away, see zephyrproject-rtos#72567.

Prepare that work by removing this test that's in the way.

Signed-off-by: Jonathan Rico <[email protected]>
jori-nordic added a commit to jori-nordic/zephyr that referenced this issue Jul 4, 2024
This test verifies a convoluted interaction between the scanner and the
resumable advertiser feature in the host.

That feature is going away, see zephyrproject-rtos#72567.

Prepare that work by removing this test that's in the way.

Signed-off-by: Jonathan Rico <[email protected]>
aescolar pushed a commit that referenced this issue Jul 4, 2024
This test verifies a convoluted interaction between the scanner and the
resumable advertiser feature in the host.

That feature is going away, see #72567.

Prepare that work by removing this test that's in the way.

Signed-off-by: Jonathan Rico <[email protected]>
AlienSarlak pushed a commit to AlienSarlak/zephyr that referenced this issue Jul 13, 2024
This test verifies a convoluted interaction between the scanner and the
resumable advertiser feature in the host.

That feature is going away, see zephyrproject-rtos#72567.

Prepare that work by removing this test that's in the way.

Signed-off-by: Jonathan Rico <[email protected]>
Copy link

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.

@github-actions github-actions bot added the Stale label Jul 14, 2024
CZKikin pushed a commit to nxp-upstream/zephyr that referenced this issue Jul 18, 2024
This test verifies a convoluted interaction between the scanner and the
resumable advertiser feature in the host.

That feature is going away, see zephyrproject-rtos#72567.

Prepare that work by removing this test that's in the way.

Signed-off-by: Jonathan Rico <[email protected]>
Devansh0210 pushed a commit to Devansh0210/zephyr that referenced this issue Jul 20, 2024
This test verifies a convoluted interaction between the scanner and the
resumable advertiser feature in the host.

That feature is going away, see zephyrproject-rtos#72567.

Prepare that work by removing this test that's in the way.

Signed-off-by: Jonathan Rico <[email protected]>
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 28, 2024
@jori-nordic jori-nordic reopened this Jul 29, 2024
@jori-nordic jori-nordic removed the Stale label Jul 29, 2024
Chenhongren pushed a commit to Chenhongren/zephyr that referenced this issue Aug 26, 2024
This test verifies a convoluted interaction between the scanner and the
resumable advertiser feature in the host.

That feature is going away, see zephyrproject-rtos#72567.

Prepare that work by removing this test that's in the way.

(cherry picked from commit 3af358d)

Original-Signed-off-by: Jonathan Rico <[email protected]>
GitOrigin-RevId: 3af358d
Change-Id: Ie87c2a9163f414eb7cd18e13593e4a28ef9a3a69
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5680019
Tested-by: ChromeOS Prod (Robot) <[email protected]>
Commit-Queue: Fabio Baltieri <[email protected]>
Reviewed-by: Fabio Baltieri <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Aug 26, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>

wip note: BT_LE_PER_ADV_DEFAULT
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Aug 26, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Aug 27, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Aug 27, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Aug 27, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Aug 28, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Aug 28, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Aug 28, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Aug 28, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Aug 28, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Aug 28, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Sep 13, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Sep 13, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Sep 13, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Sep 16, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
Copy link

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.

@github-actions github-actions bot added the Stale label Sep 28, 2024
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Oct 2, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Oct 2, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Oct 3, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Oct 3, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
alwa-nordic added a commit to alwa-nordic/zephyr that referenced this issue Oct 7, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
HubertYGuan pushed a commit to HubertYGuan/zephyr that referenced this issue Oct 10, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
coreboot-org-bot pushed a commit to coreboot/zephyr-cros that referenced this issue Oct 11, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

(cherry picked from commit 8cfad44)

Original-Resolves: zephyrproject-rtos/zephyr#72567
Original-Signed-off-by: Aleksander Wasaznik <[email protected]>
GitOrigin-RevId: 8cfad44
Cr-Build-Id: 8734380568354140561
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8734380568354140561
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: I4fad8e35af2a49bdefdc13b2f99684325483a986
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5918818
Tested-by: ChromeOS Prod (Robot) <[email protected]>
Tested-by: Jeremy Bettis <[email protected]>
Reviewed-by: Jeremy Bettis <[email protected]>
ycsin pushed a commit to ycsin/zephyr that referenced this issue Oct 12, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
sean-madigan pushed a commit to sean-madigan/sdk-zephyr that referenced this issue Nov 19, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos/zephyr#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
(cherry picked from commit 8cfad44)

Signed-off-by: Sean Madigan <[email protected]>
sean-madigan pushed a commit to sean-madigan/sdk-zephyr that referenced this issue Nov 20, 2024
The host-based adv auto-resume function has both a problematic
implementation and disagreement in the community around how it should
behave. See the issue linked resolved below for details.

This patch makes the deprecation visible to the user. The user will be
better served by a auto-resume tailored their applications use case,
based on more primitive host API like `conn_cb.recycled`, which has
obvious behavior that is unlikely to change.

Resolves: zephyrproject-rtos/zephyr#72567

Signed-off-by: Aleksander Wasaznik <[email protected]>
(cherry picked from commit 8cfad44)

Signed-off-by: Sean Madigan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Host area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Stale
Projects
None yet
3 participants