Skip to content

Bluetooth: Fix scannable broadcast advertising on extended APIs

Daniel Winkler linux-bluetooth 3 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesApplied
  2. v23 patches 4 repliesSuperseded
  3. v13 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Use helpers to determine scannable rather than generating earlier

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2advertising: Create and use scannable adv param flaglib/mgmt.h src/advertising.c src/shared/ad.c +1 more+43 -10 replies
2/2doc/mgmt-api: Update documentation for scan_rsp param flagdoc/mgmt-api.txt+5 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchSonny SasakaMiao-chen ChouAlain Michaud
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [Bluez PATCH v3 0/2] Bluetooth: Fix scannable broadcast advertising on extended APIs

Hello Maintainers,

We have discovered that when userspace registers a broadcast (non-connectable) advertisement with scan response data, it exposes a limitation in the new extended MGMT APIs. At the time that the parameters are registered with the controller, kernel does not yet have the advertising data and scan response (coming in a separate MGMT call), and will default to a non-scannable PDU. When the MGMT call for data/scan response is received, the controller will either fail when we request to set the scan response, or return success and not use it.

This series along with another in kernel will allow userspace to pass a flag with the params request indicating if the advertisement contains a scan response. This allows kernel to register the parameters correctly with the controller.

The patch is tested with a scannable broadcast advertisement on Hatch and Kukui chromebooks (ext and non-ext capabilities) and ensuring a peripheral device can detect the scan response.

Best,
Daniel

Changes in v3:
- Use helpers to determine scannable rather than generating earlier

Changes in v2:
- Check kernel supports flag before setting it

Daniel Winkler (2):
advertising: Create and use scannable adv param flag doc/mgmt-api: Update documentation for scan_rsp param flag

 doc/mgmt-api.txt  |  5 +++++
 lib/mgmt.h        |  1 +
 src/advertising.c | 24 +++++++++++++++++++++++-
 src/shared/ad.c   | 17 +++++++++++++++++
 src/shared/ad.h   |  2 ++
 5 files changed, 48 insertions(+), 1 deletion(-)
Signature · 1 line
2.31.0.rc2.261.g7f71774620-goog