Skip to contentSkip to conversation

client/mgmt: Print UUID and flags when showing experimental features

PATCH Applied Yao Zi 3 participants 3 messages Jul 19, 2025 – Jul 24, 2025 Bluetooth drivers

lore
Share & tools
lore

Yao Zi

author
#0 lore raw

PATCH 1/1 client/mgmt: Print UUID and flags when showing experimental features

Command expinfo in mgmt menu queries experimental features from kernel with MGMT_OP_READ_EXP_FEATURES_INFO. However, currently only the number of experimental features are shown,

> expinfo
Global
Number of experimental features: 1
Primary controller (hci0)
Number of experimental features: 4

and lacking of details makes the command less useful. To ease debug, this patch introduces extra output for the expinfo command, showing UUID and flags of experimental features as well. A typical output will look like,

	> expinfo
	Global
	        Number of experimental features: 1
	        6fbaf188-05e0-496a-9885-d6ddfdb4e03e (flags 0x0000)
	Primary controller (hci0)
	        Number of experimental features: 4
	        671b10b5-42c0-4696-9227-eb28d1b049d6 (flags 0x0000)
	        330859bc-7506-492d-9370-9a6f0614037f (flags 0x0000)
	        6fbaf188-05e0-496a-9885-d6ddfdb4e03e (flags 0x0000)
	        2ce463d7-7a03-4d8d-bf05-5f24e8f36e76 (flags 0x0000)
---
 client/mgmt.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
client/mgmt.c +12 -1
index d07f7d8c0ea3..f1d607283da5 100644
@@ -1699,7 +1699,10 @@ static void exp_info_rsp(uint8_t status, uint16_t len, const void *param,
 							void *user_data)
 {
 	const struct mgmt_rp_read_exp_features_info *rp = param;
-	uint16_t index = PTR_TO_UINT(user_data);
+	uint16_t index = PTR_TO_UINT(user_data), i;
+	uint128_t uuid_be;
+	char uuidstr[40];
+	bt_uuid_t uuid;
 
 	if (status != 0) {
 		error("Reading hci%u exp features failed with status 0x%02x (%s)",
@@ -1720,6 +1723,14 @@ static void exp_info_rsp(uint8_t status, uint16_t len, const void *param,
 	print("\tNumber of experimental features: %u",
 					le16_to_cpu(rp->feature_count));
 
+	uuid.type = BT_UUID128;
+	for (i = 0; i < le16_to_cpu(rp->feature_count); i++) {
+		memcpy(&uuid_be, &rp->features[i].uuid, sizeof(uint128_t));
+		ntoh128(&uuid_be, &uuid.value.u128);
+		bt_uuid_to_string(&uuid, uuidstr, sizeof(uuidstr));
+
+		print("\t%s (flags 0x%04x)", uuidstr, rp->features[i].flags);
+	}
 done:
 	pending_index--;
 
Signature · 1 line
2.50.1
#1 lore raw

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=983945

---Test result---

Test Summary:

CheckPatch                    PENDING   0.27 seconds
GitLint                       PENDING   0.34 seconds
BuildEll                      PASS      20.22 seconds
BluezMake                     PASS      2635.95 seconds
MakeCheck                     PASS      20.42 seconds
MakeDistcheck                 PASS      186.75 seconds
CheckValgrind                 PASS      237.17 seconds
CheckSmatch                   PASS      306.43 seconds
bluezmakeextell               PASS      128.32 seconds
IncrementalBuild              PENDING   0.35 seconds
ScanBuild                     PASS      922.57 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

#2 lore raw
In reply to Yao Zi
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 11 lines · On Sat, 19 Jul 2025 07:05:47 +0000 you wrote:

Command expinfo in mgmt menu queries experimental features from kernel with MGMT_OP_READ_EXP_FEATURES_INFO. However, currently only the number of experimental features are shown,

> expinfo
Global
Number of experimental features: 1
Primary controller (hci0)
Number of experimental features: 4

[...]

Here is the summary with links:
- [BlueZ] client/mgmt: Print UUID and flags when showing experimental features

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=da772d62b295

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html