public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1 1/2] client: Add mgmt.exp-iso command
@ 2026-02-10 20:58 Luiz Augusto von Dentz
  2026-02-10 20:58 ` [PATCH BlueZ v1 2/2] bluetoothctl-mgmt: Add documentation to exp-iso command Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2026-02-10 20:58 UTC (permalink / raw)
  To: linux-bluetooth

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

This adds mgmt.exp-iso command which can be used to toggle ISO socket
support:

@ MGMT Command: Set Experimental Feature (0x004a) plen 17
        UUID: BlueZ Experimental ISO Socket
        Action: Enabled (0x01)
@ MGMT Event: Command Complete (0x0001) plen 23
      Set Experimental Feature (0x004a) plen 20
        Status: Success (0x00)
        UUID: BlueZ Experimental ISO Socket
        Flags: 0x00000001
          Active
@ MGMT Event: Experimental Feature Changed (0x0027) plen 20
        UUID: BlueZ Experimental ISO Socket
        Flags: 0x00000001
          Active
---
 client/mgmt.c | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/client/mgmt.c b/client/mgmt.c
index 968efdbca5b0..4e68547ed33c 100644
--- a/client/mgmt.c
+++ b/client/mgmt.c
@@ -2751,6 +2751,42 @@ static void cmd_exp_offload_codecs(int argc, char **argv)
 	}
 }
 
+static void exp_iso_rsp(uint8_t status, uint16_t len, const void *param,
+							void *user_data)
+{
+	if (status != 0)
+		error("Set ISO Socket failed with status 0x%02x (%s)", status,
+					mgmt_errstr(status));
+	else
+		print("ISO Socket successfully set");
+
+	bt_shell_noninteractive_quit(EXIT_SUCCESS);
+}
+
+static void cmd_exp_iso(int argc, char **argv)
+{
+	/* 6fbaf188-05e0-496a-9885-d6ddfdb4e03e */
+	static const uint8_t uuid[16] = {
+		0x3e, 0xe0, 0xb4, 0xfd, 0xdd, 0xd6, 0x85, 0x98,
+		0x6a, 0x49, 0xe0, 0x05, 0x88, 0xf1, 0xba, 0x6f
+	};
+	struct mgmt_cp_set_exp_feature cp;
+	uint8_t val;
+
+	if (parse_setting(argc, argv, &val) == false)
+		return bt_shell_noninteractive_quit(EXIT_FAILURE);
+
+	memset(&cp, 0, sizeof(cp));
+	memcpy(cp.uuid, uuid, 16);
+	cp.action = val;
+
+	if (mgmt_send(mgmt, MGMT_OP_SET_EXP_FEATURE, MGMT_INDEX_NONE,
+			sizeof(cp), &cp, exp_iso_rsp, NULL, NULL) == 0) {
+		error("Unable to set ISO Socket experimental feature");
+		return bt_shell_noninteractive_quit(EXIT_FAILURE);
+	}
+}
+
 static void class_rsp(uint16_t op, uint16_t id, uint8_t status, uint16_t len,
 							const void *param)
 {
@@ -6166,6 +6202,8 @@ static const struct bt_shell_menu mgmt_menu = {
 		"Set bluetooth quality report feature"			},
 	{ "exp-offload",		"<on/off>",
 		cmd_exp_offload_codecs,	"Toggle codec support"		},
+	{ "exp-iso",		"<on/off>",
+		cmd_exp_iso,	"Toggle ISO support"		},
 	{ "read-sysconfig",	NULL,
 		cmd_read_sysconfig,	"Read System Configuration"	},
 	{ "set-sysconfig",	"<-v|-h> [options...]",
-- 
2.52.0


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

end of thread, other threads:[~2026-02-11 18:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 20:58 [PATCH BlueZ v1 1/2] client: Add mgmt.exp-iso command Luiz Augusto von Dentz
2026-02-10 20:58 ` [PATCH BlueZ v1 2/2] bluetoothctl-mgmt: Add documentation to exp-iso command Luiz Augusto von Dentz
2026-02-10 21:48 ` [BlueZ,v1,1/2] client: Add mgmt.exp-iso command bluez.test.bot
2026-02-11 18:00 ` [PATCH BlueZ v1 1/2] " 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