From: Pauli Virtanen <pav@iki.fi>
To: linux-bluetooth@vger.kernel.org
Cc: Pauli Virtanen <pav@iki.fi>
Subject: [PATCH BlueZ] adapter: add BCAA UUID also when seen device is not discoverable
Date: Tue, 12 May 2026 00:54:47 +0300 [thread overview]
Message-ID: <a03d5b481c87d86d2bd2bdb376729ea6c4f992a9.1778535912.git.pav@iki.fi> (raw)
BAP v1.0.2 Sec 6.4 specifies Broadcast discovery uses observation
procedure (Core Vol 3 Part C Sec 9.1.2) which makes no reference to
device discoverability state.
However, if remote device does:
1. Send Advertising Data for some other UUID with General Discoverable
2. Send Advertising Data for BCAA UUID with no flags
then adapter.c:btd_adapter_device_found() creates device in step 1. but
in step 2. it ignores the BCAA UUID since the device exists but is not
discoverable; the monitoring=true special case applies only for
first-seen devices. Consequently bap plugin fails to pick up the BCAA
stream.
This sequence was observed to be produced by BlueZ + btvirt.
Fix by monitoring also previously existing but currently non-connectable
devices with BCAA UUID.
Link: https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/2812#note_3467783
Log:
--------------------------
@ MGMT Event: Device Found (0x0012) plen 17
LE Address: 00:AA:01:00:00:42 (Intel Corporation)
RSSI: invalid (0x7f)
Flags: 0x00000000
Data length: 3
Data[3]:
02 01 06 ...
Flags: 0x06
LE General Discoverable Mode
BR/EDR Not Supported
...
@ MGMT Event: Device Found (0x0012) plen 39
LE Address: 00:AA:01:00:00:42 (Intel Corporation)
RSSI: invalid (0x7f)
Flags: 0x00000004
Not Connectable
Data length: 25
Data[25]:
06 16 52 18 56 db 55 03 03 4e 18 0d 16 4e 18 00 ..R.V.U..N...N..
ff 0f 0f 00 04 03 01 01 00 .........
Service Data: Broadcast Audio Announcement (0x1852)
Broadcast ID: 5626710 (0x55db56)
16-bit Service UUIDs (complete): 1 entry
Audio Stream Control (0x184e)
Service Data: Audio Stream Control (0x184e)
Data[10]:
00 ff 0f 0f 00 04 03 01 01 00
--------------------------
---
src/adapter.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/adapter.c b/src/adapter.c
index 6df66b3e0..20f7c3e03 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -7360,6 +7360,14 @@ void btd_adapter_device_found(struct btd_adapter *adapter,
discoverable = device_is_discoverable(adapter, &eir_data, addr,
bdaddr_type, &auto_connect);
+ /* Monitor Devices advertising Broadcast Announcements if the
+ * adapter is capable of synchronizing to it.
+ */
+ if (eir_get_service_data(&eir_data, BCAA_SERVICE_UUID) &&
+ btd_adapter_has_settings(adapter,
+ MGMT_SETTING_ISO_SYNC_RECEIVER))
+ monitoring = true;
+
dev = btd_adapter_find_device(adapter, bdaddr, bdaddr_type);
if (!dev) {
/* In case of being just a scan response don't attempt to create
@@ -7370,14 +7378,6 @@ void btd_adapter_device_found(struct btd_adapter *adapter,
return;
}
- /* Monitor Devices advertising Broadcast Announcements if the
- * adapter is capable of synchronizing to it.
- */
- if (eir_get_service_data(&eir_data, BCAA_SERVICE_UUID) &&
- btd_adapter_has_settings(adapter,
- MGMT_SETTING_ISO_SYNC_RECEIVER))
- monitoring = true;
-
/* If ISO Socket is enabled, monitor Devices advertising RSI
* since those can be coordinated sets not marked as visible but
* their object are needed.
--
2.54.0
next reply other threads:[~2026-05-11 21:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 21:54 Pauli Virtanen [this message]
2026-05-11 23:08 ` [BlueZ] adapter: add BCAA UUID also when seen device is not discoverable bluez.test.bot
2026-05-12 19:20 ` [PATCH BlueZ] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a03d5b481c87d86d2bd2bdb376729ea6c4f992a9.1778535912.git.pav@iki.fi \
--to=pav@iki.fi \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox