From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v1 06/12] monitor: Add decoding for Load Connection Subrate, SCI setting and event
Date: Fri, 24 Jul 2026 15:12:19 -0400 [thread overview]
Message-ID: <20260724191225.1815634-7-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20260724191225.1815634-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add decoding support for the new MGMT_OP_LOAD_CONN_SUBRATE (0x005C)
command, the MGMT_EV_CONN_SUBRATE (0x0033) event and the Shorter
Connection Interval setting bit (25) to btmon.
---
monitor/packet.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/monitor/packet.c b/monitor/packet.c
index 82afef6011d2..0d3b23cc3fb7 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -14941,6 +14941,7 @@ static const struct bitfield_data mgmt_settings_table[] = {
{ 22, "LL Privacy" },
{ 23, "PAST Sender" },
{ 24, "PAST Receiver" },
+ { 25, "Shorter Connection Interval" },
{}
};
@@ -15101,6 +15102,27 @@ static void mgmt_print_connection_parameter(const void *data)
print_field("Supervision timeout: %u", supv_timeout);
}
+static void mgmt_print_connection_subrate(const void *data)
+{
+ uint8_t address_type = get_u8(data + 6);
+ uint16_t min_interval = get_le16(data + 7);
+ uint16_t max_interval = get_le16(data + 9);
+ uint16_t subrate_min = get_le16(data + 11);
+ uint16_t subrate_max = get_le16(data + 13);
+ uint16_t max_latency = get_le16(data + 15);
+ uint16_t cont_num = get_le16(data + 17);
+ uint16_t supv_timeout = get_le16(data + 19);
+
+ mgmt_print_address(data, address_type);
+ print_field("Min connection interval: %u", min_interval);
+ print_field("Max connection interval: %u", max_interval);
+ print_field("Subrate min: %u", subrate_min);
+ print_field("Subrate max: %u", subrate_max);
+ print_field("Max latency: %u", max_latency);
+ print_field("Continuation number: %u", cont_num);
+ print_field("Supervision timeout: %u", supv_timeout);
+}
+
static void mgmt_print_link_key(const void *data)
{
uint8_t address_type = get_u8(data + 6);
@@ -16026,6 +16048,22 @@ static void mgmt_load_connection_parameters_cmd(const void *data, uint16_t size)
mgmt_print_connection_parameter(data + 2 + (i * 15));
}
+static void mgmt_load_conn_subrate_cmd(const void *data, uint16_t size)
+{
+ uint16_t num_parameters = get_le16(data);
+ int i;
+
+ print_field("Parameters: %u", num_parameters);
+
+ if (size - 2 != num_parameters * 21) {
+ packet_hexdump(data + 2, size - 2);
+ return;
+ }
+
+ for (i = 0; i < num_parameters; i++)
+ mgmt_print_connection_subrate(data + 2 + (i * 21));
+}
+
static void mgmt_read_unconf_index_list_rsp(const void *data, uint16_t size)
{
uint16_t num_controllers = get_le16(data);
@@ -17096,6 +17134,9 @@ static const struct mgmt_data mgmt_command_table[] = {
{ 0x005B, "Send HCI command and wait for event",
mgmt_hci_cmd_sync_cmd, 6, false,
mgmt_hci_cmd_sync_rsp, 0, false},
+ { 0x005C, "Load Connection Subrate",
+ mgmt_load_conn_subrate_cmd, 2, false,
+ mgmt_null_rsp, 0, true },
{ }
};
@@ -17620,6 +17661,25 @@ static void mgmt_mesh_packet_cmplt_evt(const void *data, uint16_t size)
print_field("Handle: %d", handle);
}
+static void mgmt_conn_subrate_evt(const void *data, uint16_t size)
+{
+ uint8_t address_type = get_u8(data + 6);
+ uint8_t status = get_u8(data + 7);
+ uint16_t interval = get_le16(data + 8);
+ uint16_t subrate = get_le16(data + 10);
+ uint16_t latency = get_le16(data + 12);
+ uint16_t cont_num = get_le16(data + 14);
+ uint16_t supv_timeout = get_le16(data + 16);
+
+ mgmt_print_address(data, address_type);
+ mgmt_print_status(status);
+ print_field("Interval: %u", interval);
+ print_field("Subrate: %u", subrate);
+ print_field("Latency: %u", latency);
+ print_field("Continuation number: %u", cont_num);
+ print_field("Supervision timeout: %u", supv_timeout);
+}
+
static const struct mgmt_data mgmt_event_table[] = {
{ 0x0001, "Command Complete",
mgmt_command_complete_evt, 3, false },
@@ -17717,6 +17777,8 @@ static const struct mgmt_data mgmt_event_table[] = {
mgmt_mesh_device_found_evt, 22, false },
{ 0x0032, "Mesh Packet Complete",
mgmt_mesh_packet_cmplt_evt, 1, true },
+ { 0x0033, "Connection Subrate",
+ mgmt_conn_subrate_evt, 18, true },
{ }
};
--
2.54.0
next prev parent reply other threads:[~2026-07-24 19:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 19:12 [PATCH BlueZ v1 00/12] Add support for Shorter Connection Interval (SCI) Luiz Augusto von Dentz
2026-07-24 19:12 ` [PATCH BlueZ v1 01/12] input/hog-lib: Add discovery support for HIDS 1.1 SCI attributes Luiz Augusto von Dentz
2026-07-24 20:41 ` Add support for Shorter Connection Interval (SCI) bluez.test.bot
2026-07-24 19:12 ` [PATCH BlueZ v1 02/12] emulator/btdev: Add emulation support for HIDS 1.1 SCI commands Luiz Augusto von Dentz
2026-07-24 19:12 ` [PATCH BlueZ v1 03/12] mgmt: Add Shorter Connection Interval setting and Load Connection Subrate Luiz Augusto von Dentz
2026-07-24 19:12 ` [PATCH BlueZ v1 04/12] mgmt-tester: Add tests for SCI " Luiz Augusto von Dentz
2026-07-24 19:12 ` [PATCH BlueZ v1 05/12] adapter: Add support for loading connection subrate parameters Luiz Augusto von Dentz
2026-07-24 19:12 ` Luiz Augusto von Dentz [this message]
2026-07-24 19:12 ` [PATCH BlueZ v1 07/12] doc: Document ConnectionSubrate storage format Luiz Augusto von Dentz
2026-07-24 19:12 ` [PATCH BlueZ v1 08/12] client/mgmt: Add conn-subrate command Luiz Augusto von Dentz
2026-07-24 19:12 ` [PATCH BlueZ v1 09/12] mgmt-tester: Add HIDS recommended SCI parameter tests Luiz Augusto von Dentz
2026-07-24 19:12 ` [PATCH BlueZ v1 10/12] l2cap-tester: Add SCI mode tests for LE client connections Luiz Augusto von Dentz
2026-07-24 19:12 ` [PATCH BlueZ v1 11/12] emulator/bthost: Add LE Connection Rate Request support Luiz Augusto von Dentz
2026-07-24 19:12 ` [PATCH BlueZ v1 12/12] l2cap-tester: Add SCI mode tests for LE server connections Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260724191225.1815634-7-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox