Skip to contentSkip to conversation

monitor: Decode Intel DDC LE extended features

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages Jul 30 – Aug 4 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 monitor: Decode Intel DDC LE extended features

From: Luiz Augusto von Dentz <[email protected]>

The Intel DDC Config Write command (0x3f|0x008b) can carry identifier 0x031f which holds the 248 octet LE extended features array, using the same layout as LE Read All Local Features: page 0 is 8 octets followed by 10 pages of 24 octets each.

Decode it with the existing LE feature tables instead of dumping raw hex, and make the parameter loop stop on truncated/padded entries.

Example, setting only the SCI bits on page 1 (bits 8 and 9):

  hcitool cmd 0x3F 0x008B 0xFA 0x1F 0x03 \
      0xFF 0xF9 0x01 0x3F 0xBE 0x00 0x00 0x80 \
      0x00 0x03 0x00 0x00 ... (padding up to 248 octets)

< HCI Command: Intel DDC Config Write (0x3f|0x008b) plen 251

          Identifier: 0x031f
          Features[0/0][8]:
          ff f9 01 3f be 00 00 80                          ...?....
            LE Encryption
            Connection Parameter Request Procedure
            ...
            LL Extended Feature Set
          Features[1/0][8]:
          00 03 00 00 00 00 00 00                          ........
            Shorter Connection Intervals
            Shorter Connection Intervals (Host Support)
          Features[1/1][8]:
          00 00 00 00 00 00 00 00                          ........
          ...
---
 monitor/intel.c | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)
monitor/intel.c +31 -2
index cd997d24b59c..782fda675422 100644
@@ -681,14 +681,43 @@ static void set_event_mask_cmd(uint16_t index, const void *data, uint8_t size)
 						"(0x%16.16" PRIx64 ")", mask);
 }
 
+#define DDC_ID_LE_EXT_FEATURES	0x031f
+
+/* LE extended features: page 0 is 8 octets, pages 1-10 are 24 octets each */
+static void print_ddc_le_ext_features(const uint8_t *features, uint8_t len)
+{
+	uint8_t i;
+
+	if (len < 8) {
+		packet_hexdump(features, len);
+		return;
+	}
+
+	packet_print_features_ext_ll(0, features);
+
+	for (i = 0; i < 10 && len >= 8 + (i + 1) * 24; i++)
+		packet_print_features_ext_ll(i + 1, features + 8 + i * 24);
+}
+
 static void ddc_config_write_cmd(uint16_t index, const void *data, uint8_t size)
 {
-	while (size > 0) {
+	while (size > 2) {
 		uint8_t param_len = get_u8(data);
 		uint16_t param_id = get_le16(data + 1);
 
+		if (param_len < 2 || param_len + 1 > size)
+			break;
+
 		print_field("Identifier: 0x%4.4x", param_id);
-		packet_hexdump(data + 3, param_len - 2);
+
+		switch (param_id) {
+		case DDC_ID_LE_EXT_FEATURES:
+			print_ddc_le_ext_features(data + 3, param_len - 2);
+			break;
+		default:
+			packet_hexdump(data + 3, param_len - 2);
+			break;
+		}
 
 		data += param_len + 1;
 		size -= param_len + 1;
Signature · 1 line
2.54.0
#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=1137629

---Test result---

Test Summary:

CheckPatch                    PASS      0.50 seconds
GitLint                       PASS      0.33 seconds
BuildEll                      PASS      20.14 seconds
BluezMake                     PASS      513.53 seconds
MakeCheck                     PASS      0.96 seconds
MakeDistcheck                 PASS      154.32 seconds
CheckValgrind                 PASS      145.77 seconds
CheckSmatch                   PASS      296.87 seconds
bluezmakeextell               PASS      96.29 seconds
IncrementalBuild              PASS      518.94 seconds
ScanBuild                     PASS      900.58 seconds

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

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Luiz Augusto von Dentz
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 8 lines · On Thu, 30 Jul 2026 13:51:35 -0400 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

The Intel DDC Config Write command (0x3f|0x008b) can carry identifier 0x031f which holds the 248 octet LE extended features array, using the same layout as LE Read All Local Features: page 0 is 8 octets followed by 10 pages of 24 octets each.

[...]

Here is the summary with links:
- [BlueZ,v1] monitor: Decode Intel DDC LE extended features

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

You are awesome, thank you!

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