Skip to contentSkip to conversation

monitor: Add decoding support for LL Extended Feature Set

PATCH Applied Luiz Augusto von Dentz 3 participants 4 messages Oct 30, 2025 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH v3 1/2 monitor: Add decoding support for LL Extended Feature Set

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

This adds support for decoding LL Extended Feature Set introduced in 6.0 that adds the following:

Commands:

- HCI_LE_Read_All_Local_Supported_­Features(0x2087)(Feature:47,1)
- HCI_LE_Read_All_Remote_Features(0x2088)(Feature:47,2)

Events:

- HCI_LE_Read_All_Remote_Features_Complete(0x2b)(Mask bit:42)

---
 monitor/bt.h     |  24 +++++++
 monitor/packet.c | 160 +++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 166 insertions(+), 18 deletions(-)
monitor/bt.h +24 -0
index ca91f7fefc84..9ca3e7c88fb1 100644
@@ -2952,6 +2952,21 @@ struct bt_hci_rsp_le_read_iso_link_quality {
 	uint32_t duplicated_packets;
 } __attribute__ ((packed));
 
+#define BT_HCI_CMD_LE_READ_ALL_LOCAL_FEATURES	0x2087
+#define BT_HCI_BIT_LE_READ_ALL_LOCAL_FEATURES	BT_HCI_CMD_BIT(47, 2)
+struct bt_hci_rsp_le_read_all_local_features {
+	uint8_t  status;
+	uint8_t  page;
+	uint8_t  features[248];
+} __attribute__ ((packed));
+
+#define BT_HCI_CMD_LE_READ_ALL_REMOTE_FEATURES	0x2088
+#define BT_HCI_BIT_LE_READ_ALL_REMOTE_FEATURES	BT_HCI_CMD_BIT(47, 3)
+struct bt_hci_cmd_le_read_all_remote_features {
+	uint16_t handle;
+	uint8_t  pages;
+} __attribute__ ((packed));
+
 #define BT_HCI_CMD_LE_CS_RD_LOC_SUPP_CAP	0x2089
 #define BT_HCI_BIT_LE_CS_RD_LOC_SUPP_CAP	BT_HCI_CMD_BIT(20, 5)
 struct bt_hci_rsp_le_cs_rd_loc_supp_cap {
@@ -3990,6 +4005,15 @@ struct bt_hci_evt_le_big_info_adv_report {
 	uint8_t  encryption;
 } __attribute__ ((packed));
 
+#define BT_HCI_EVT_LE_READ_ALL_REMOTE_FEATURES_COMPLETE	0x2B
+struct bt_hci_evt_le_read_all_remote_features_complete {
+	uint8_t  status;
+	uint16_t handle;
+	uint8_t  max_pages;
+	uint8_t  valid_pages;
+	uint8_t  features[248];
+} __attribute__ ((packed));
+
 #define BT_HCI_EVT_LE_CS_RD_REM_SUPP_CAP_COMPLETE	(0x2C)
 struct bt_hci_evt_le_cs_rd_rem_supp_cap_complete {
 	uint8_t status;
monitor/packet.c +142 -18

238 lines not on this page · raw message

Signature · 1 line
2.51.0
author maintainer
#1 lore raw

PATCH v3 2/2 monitor: Add decoding support for LL_FEATURE_EXT_{REQ,RSP}

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

This adds support for LL_FEATURE_EXT_{REQ,RSP} which is used to exchange LL Features.

---
 monitor/bt.h     | 14 ++++++++++++++
 monitor/ll.c     | 24 ++++++++++++++++++++++++
 monitor/packet.c |  5 +++++
 monitor/packet.h |  1 +
 4 files changed, 44 insertions(+)
monitor/bt.h +14 -0
index 9ca3e7c88fb1..1c753b694883 100644
@@ -239,6 +239,20 @@ struct bt_ll_cis_term_ind {
 	uint8_t  reason;
 } __attribute__ ((packed));
 
+#define BT_LL_FEATURE_EXT_REQ	0x2b
+struct bt_ll_feature_ext_req {
+	uint8_t  max_page;
+	uint8_t  page;
+	uint8_t  features[24];
+} __attribute__ ((packed));
+
+#define BT_LL_FEATURE_EXT_RSP	0x2c
+struct bt_ll_feature_ext_rsp {
+	uint8_t  max_page;
+	uint8_t  page;
+	uint8_t  features[24];
+} __attribute__ ((packed));
+
 #define LMP_ESC4(x) ((127 << 8) | (x))
 
 #define BT_LMP_NAME_REQ			1
monitor/ll.c +24 -0
index 34dddcb0bb74..4d65d183f958 100644
@@ -741,6 +741,24 @@ static void cis_term_ind(const void *data, uint8_t size)
 	packet_print_error("Reason", ind->reason);
 }
 
+static void feature_ext_req(const void *data, uint8_t size)
+{
+	const struct bt_ll_feature_ext_req *req = data;
+
+	print_field("Max page: %u", req->max_page);
+	print_field("Page: %u", req->page);
+	packet_print_features_ext_ll(req->page, req->features);
+}
+
+static void feature_ext_rsp(const void *data, uint8_t size)
+{
+	const struct bt_ll_feature_ext_req *rsp = data;
+
+	print_field("Max page: %u", rsp->max_page);
+	print_field("Page: %u", rsp->page);
+	packet_print_features_ext_ll(rsp->page, rsp->features);
+}
+
 struct llcp_data {
 	uint8_t opcode;
 	const char *str;
@@ -790,6 +808,12 @@ static const struct llcp_data llcp_table[] = {
 	{ BT_LL_CIS_TERMINATE_IND, "LL_CIS_TERMINATE_IND", cis_term_ind,
 					sizeof(struct bt_ll_cis_term_ind),
 					true },
+	{ BT_LL_FEATURE_REQ, "LL_FEATURE_EXT_REQ", feature_ext_req,
+					sizeof(struct bt_ll_feature_ext_req),
+					true },
+	{ BT_LL_CIS_RSP, "LL_FEATURE_EXT_RSP", feature_ext_rsp,
+					sizeof(struct bt_ll_feature_ext_rsp),
+					true },
 	{ }
 };
 
monitor/packet.c +5 -0
index b4da6653f4a2..ceed85318b3b 100644
@@ -2918,6 +2918,11 @@ void packet_print_features_ll(const uint8_t *features)
 	print_features(0, features, 0x01);
 }
 
+void packet_print_features_ext_ll(uint8_t page, const uint8_t *features)
+{
+	print_features(page, features, 0x01);
+}
+
 void packet_print_features_msft(const uint8_t *features)
 {
 	print_features(0, features, 0xf0);
monitor/packet.h +1 -0
index 154a08efacc5..2990b795bd3e 100644
@@ -78,6 +78,7 @@ void packet_print_rssi(const char *label, int8_t rssi);
 void packet_print_ad(const void *data, uint8_t size);
 void packet_print_features_lmp(const uint8_t *features, uint8_t page);
 void packet_print_features_ll(const uint8_t *features);
+void packet_print_features_ext_ll(uint8_t page, const uint8_t *features);
 void packet_print_features_msft(const uint8_t *features);
 void packet_print_channel_map_lmp(const uint8_t *map);
 void packet_print_channel_map_ll(const uint8_t *map);
Signature · 1 line
2.51.0
#2 lore raw
In reply to Luiz Augusto von Dentz

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

---Test result---

Test Summary:

CheckPatch                    PENDING   0.31 seconds
GitLint                       PENDING   0.41 seconds
BuildEll                      PASS      20.16 seconds
BluezMake                     PASS      2783.35 seconds
MakeCheck                     PASS      19.98 seconds
MakeDistcheck                 PASS      194.56 seconds
CheckValgrind                 PASS      247.71 seconds
CheckSmatch                   WARNING   314.08 seconds
bluezmakeextell               PASS      127.90 seconds
IncrementalBuild              PENDING   0.29 seconds
ScanBuild                     PASS      906.71 seconds

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

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

##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1931:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3866:52: warning: array of flexible structuresmonitor/bt.h:3854:40: warning: array of flexible structuresmonitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1931:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3866:52: warning: array of flexible structuresmonitor/bt.h:3854:40: warning: array of flexible structures
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:

---
Regards,
Linux Bluetooth

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

Hello:

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

Quoted 8 lines · On Thu, 30 Oct 2025 15:48:55 -0400 you wrote:

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

This adds support for decoding LL Extended Feature Set introduced in 6.0 that adds the following:

Commands:

[...]

Here is the summary with links:
- [BlueZ,v3,1/2] monitor: Add decoding support for LL Extended Feature Set

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=1479b279a016
  - [BlueZ,v3,2/2] monitor: Add decoding support for LL_FEATURE_EXT_{REQ,RSP}
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=32d740d87970

You are awesome, thank you!

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