public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1 1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled
@ 2025-06-05 18:12 Luiz Augusto von Dentz
  2025-06-05 18:12 ` [PATCH BlueZ v1 2/3] client: Add assistant.list Luiz Augusto von Dentz
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2025-06-05 18:12 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This fixes exposing non-discoverable coordinate set members if LE Audio
is disabled since it may lead system device setting showing them to user
that may attempt to pair them and end up not working.

Fixes: https://github.com/bluez/bluez/issues/523
---
 src/adapter.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 2417e3cea960..70141e1542d7 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -7356,11 +7356,12 @@ void btd_adapter_device_found(struct btd_adapter *adapter,
 				MGMT_SETTING_ISO_SYNC_RECEIVER))
 			monitoring = true;
 
-		/* Monitor Devices advertising RSI since those can be
-		 * coordinated sets not marked as visible but their object are
-		 * needed.
+		/* If ISO  Socket is enabled, monitor Devices advertising RSI
+		 * since those can be coordinated sets not marked as visible but
+		 * their object are needed.
 		 */
-		if (eir_data.rsi)
+		if (btd_adapter_has_exp_feature(adapter, EXP_FEAT_ISO_SOCKET) &&
+						eir_data.rsi)
 			monitoring = true;
 
 		if (!discoverable && !monitoring) {
-- 
2.49.0


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

* [PATCH BlueZ v1 2/3] client: Add assistant.list
  2025-06-05 18:12 [PATCH BlueZ v1 1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled Luiz Augusto von Dentz
@ 2025-06-05 18:12 ` Luiz Augusto von Dentz
  2025-06-05 18:12 ` [PATCH BlueZ v1 3/3] client: Add assistant.show Luiz Augusto von Dentz
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2025-06-05 18:12 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds assistant.list command:

assistant.list --help
List available assistants
Usage:
	 list
---
 client/assistant.c                | 14 ++++++++++++++
 client/bluetoothctl-assistant.rst |  7 +++++++
 2 files changed, 21 insertions(+)

diff --git a/client/assistant.c b/client/assistant.c
index 19d9faac57e5..ffefa25baf9b 100644
--- a/client/assistant.c
+++ b/client/assistant.c
@@ -383,11 +383,25 @@ fail:
 	return bt_shell_noninteractive_quit(EXIT_FAILURE);
 }
 
+static void cmd_list_assistant(int argc, char *argv[])
+{
+	GList *l;
+
+	for (l = assistants; l; l = g_list_next(l)) {
+		GDBusProxy *proxy = l->data;
+		print_assistant(proxy, NULL);
+	}
+
+	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
+}
+
 static const struct bt_shell_menu assistant_menu = {
 	.name = "assistant",
 	.desc = "Media Assistant Submenu",
 	.pre_run = assistant_menu_pre_run,
 	.entries = {
+	{ "list",         NULL,    cmd_list_assistant,
+						"List available assistants" },
 	{ "push", "<assistant>", cmd_push_assistant,
 					"Send stream information to peer" },
 	{} },
diff --git a/client/bluetoothctl-assistant.rst b/client/bluetoothctl-assistant.rst
index ea094f444425..75166a6e7928 100644
--- a/client/bluetoothctl-assistant.rst
+++ b/client/bluetoothctl-assistant.rst
@@ -21,6 +21,13 @@ SYNOPSIS
 Assistant Commands
 ==================
 
+list
+----
+
+List available assistants.
+
+:Usage: **> list**
+
 push
 ----
 
-- 
2.49.0


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

* [PATCH BlueZ v1 3/3] client: Add assistant.show
  2025-06-05 18:12 [PATCH BlueZ v1 1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled Luiz Augusto von Dentz
  2025-06-05 18:12 ` [PATCH BlueZ v1 2/3] client: Add assistant.list Luiz Augusto von Dentz
@ 2025-06-05 18:12 ` Luiz Augusto von Dentz
  2025-06-05 20:09 ` [BlueZ,v1,1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled bluez.test.bot
  2025-06-06 19:00 ` [PATCH BlueZ v1 1/3] " patchwork-bot+bluetooth
  3 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2025-06-05 18:12 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds assistant.show command:

assistant.show --help
Assistant information
Usage:
	 show [assistant]
---
 client/assistant.c                | 63 +++++++++++++++++++++++++++++--
 client/bluetoothctl-assistant.rst |  7 ++++
 2 files changed, 67 insertions(+), 3 deletions(-)

diff --git a/client/assistant.c b/client/assistant.c
index ffefa25baf9b..88795cdd3cd3 100644
--- a/client/assistant.c
+++ b/client/assistant.c
@@ -395,15 +395,72 @@ static void cmd_list_assistant(int argc, char *argv[])
 	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
 }
 
+static void print_assistant_properties(GDBusProxy *proxy)
+{
+	bt_shell_printf("Transport %s\n", g_dbus_proxy_get_path(proxy));
+
+	print_property(proxy, "State");
+	print_property(proxy, "Metadata");
+	print_property(proxy, "QoS");
+}
+
+static void print_assistants(void *data, void *user_data)
+{
+	print_assistant_properties(data);
+}
+
+static char *generic_generator(const char *text, int state, GList *source)
+{
+	static int index = 0;
+
+	if (!source)
+		return NULL;
+
+	if (!state)
+		index = 0;
+
+	return g_dbus_proxy_path_lookup(source, &index, text);
+}
+
+static char *assistant_generator(const char *text, int state)
+{
+	return generic_generator(text, state, assistants);
+}
+
+static void cmd_show_assistant(int argc, char *argv[])
+{
+	GDBusProxy *proxy;
+
+	/* Show all transports if no argument is given */
+	if (argc != 2) {
+		g_list_foreach(assistants, print_assistants, NULL);
+		return bt_shell_noninteractive_quit(EXIT_SUCCESS);
+	}
+
+	proxy = g_dbus_proxy_lookup(assistants, NULL, argv[1],
+					MEDIA_ASSISTANT_INTERFACE);
+	if (!proxy) {
+		bt_shell_printf("Assistant %s not found\n", argv[1]);
+		return bt_shell_noninteractive_quit(EXIT_FAILURE);
+	}
+
+	print_assistant_properties(proxy);
+
+	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
+}
+
 static const struct bt_shell_menu assistant_menu = {
 	.name = "assistant",
 	.desc = "Media Assistant Submenu",
 	.pre_run = assistant_menu_pre_run,
 	.entries = {
-	{ "list",         NULL,    cmd_list_assistant,
-						"List available assistants" },
+	{ "list", NULL, cmd_list_assistant, "List available assistants" },
+	{ "show", "[assistant]", cmd_show_assistant,
+					"Assistant information",
+					assistant_generator },
 	{ "push", "<assistant>", cmd_push_assistant,
-					"Send stream information to peer" },
+					"Send stream information to peer",
+					assistant_generator },
 	{} },
 };
 
diff --git a/client/bluetoothctl-assistant.rst b/client/bluetoothctl-assistant.rst
index 75166a6e7928..33fbcbc764cf 100644
--- a/client/bluetoothctl-assistant.rst
+++ b/client/bluetoothctl-assistant.rst
@@ -28,6 +28,13 @@ List available assistants.
 
 :Usage: **> list**
 
+show
+----
+
+Show assistant information.
+
+:Usage: **> show [assistant]**
+
 push
 ----
 
-- 
2.49.0


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

* RE: [BlueZ,v1,1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled
  2025-06-05 18:12 [PATCH BlueZ v1 1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled Luiz Augusto von Dentz
  2025-06-05 18:12 ` [PATCH BlueZ v1 2/3] client: Add assistant.list Luiz Augusto von Dentz
  2025-06-05 18:12 ` [PATCH BlueZ v1 3/3] client: Add assistant.show Luiz Augusto von Dentz
@ 2025-06-05 20:09 ` bluez.test.bot
  2025-06-06 19:00 ` [PATCH BlueZ v1 1/3] " patchwork-bot+bluetooth
  3 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2025-06-05 20:09 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 1261 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=969025

---Test result---

Test Summary:
CheckPatch                    PENDING   0.26 seconds
GitLint                       PENDING   0.30 seconds
BuildEll                      PASS      20.34 seconds
BluezMake                     PASS      2621.01 seconds
MakeCheck                     PASS      20.28 seconds
MakeDistcheck                 PASS      195.62 seconds
CheckValgrind                 PASS      272.16 seconds
CheckSmatch                   PASS      299.16 seconds
bluezmakeextell               PASS      126.99 seconds
IncrementalBuild              PENDING   0.23 seconds
ScanBuild                     PASS      898.08 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ v1 1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled
  2025-06-05 18:12 [PATCH BlueZ v1 1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled Luiz Augusto von Dentz
                   ` (2 preceding siblings ...)
  2025-06-05 20:09 ` [BlueZ,v1,1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled bluez.test.bot
@ 2025-06-06 19:00 ` patchwork-bot+bluetooth
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2025-06-06 19:00 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

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

On Thu,  5 Jun 2025 14:12:54 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This fixes exposing non-discoverable coordinate set members if LE Audio
> is disabled since it may lead system device setting showing them to user
> that may attempt to pair them and end up not working.
> 
> Fixes: https://github.com/bluez/bluez/issues/523
> 
> [...]

Here is the summary with links:
  - [BlueZ,v1,1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=4a7ee30978da
  - [BlueZ,v1,2/3] client: Add assistant.list
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=04c32f3d3129
  - [BlueZ,v1,3/3] client: Add assistant.show
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f09f33199858

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] 5+ messages in thread

end of thread, other threads:[~2025-06-06 18:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-05 18:12 [PATCH BlueZ v1 1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled Luiz Augusto von Dentz
2025-06-05 18:12 ` [PATCH BlueZ v1 2/3] client: Add assistant.list Luiz Augusto von Dentz
2025-06-05 18:12 ` [PATCH BlueZ v1 3/3] client: Add assistant.show Luiz Augusto von Dentz
2025-06-05 20:09 ` [BlueZ,v1,1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled bluez.test.bot
2025-06-06 19:00 ` [PATCH BlueZ v1 1/3] " 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