Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] adapter: add BCAA UUID also when seen device is not discoverable
@ 2026-05-11 21:54 Pauli Virtanen
  2026-05-11 23:08 ` [BlueZ] " bluez.test.bot
  2026-05-12 19:20 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Pauli Virtanen @ 2026-05-11 21:54 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ] adapter: add BCAA UUID also when seen device is not discoverable
  2026-05-11 21:54 [PATCH BlueZ] adapter: add BCAA UUID also when seen device is not discoverable Pauli Virtanen
@ 2026-05-11 23:08 ` bluez.test.bot
  2026-05-12 19:20 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2026-05-11 23:08 UTC (permalink / raw)
  To: linux-bluetooth, pav

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1093117

---Test result---

Test Summary:
CheckPatch                    PASS      0.29 seconds
GitLint                       FAIL      0.20 seconds
BuildEll                      PASS      20.52 seconds
BluezMake                     PASS      655.94 seconds
CheckSmatch                   PASS      355.51 seconds
bluezmakeextell               PASS      183.32 seconds
IncrementalBuild              PASS      658.13 seconds
ScanBuild                     PASS      1044.68 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ] adapter: add BCAA UUID also when seen device is not discoverable

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
23: B1 Line exceeds max length (89>80): "Link: https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/2812#note_3467783"


https://github.com/bluez/bluez/pull/2119

---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ] adapter: add BCAA UUID also when seen device is not discoverable
  2026-05-11 21:54 [PATCH BlueZ] adapter: add BCAA UUID also when seen device is not discoverable Pauli Virtanen
  2026-05-11 23:08 ` [BlueZ] " bluez.test.bot
@ 2026-05-12 19:20 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2026-05-12 19:20 UTC (permalink / raw)
  To: Pauli Virtanen; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue, 12 May 2026 00:54:47 +0300 you wrote:
> 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
> 
> [...]

Here is the summary with links:
  - [BlueZ] adapter: add BCAA UUID also when seen device is not discoverable
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=ec223f0782ef

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-12 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 21:54 [PATCH BlueZ] adapter: add BCAA UUID also when seen device is not discoverable Pauli Virtanen
2026-05-11 23:08 ` [BlueZ] " bluez.test.bot
2026-05-12 19:20 ` [PATCH BlueZ] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox