From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v1 04/12] mgmt-tester: Add tests for SCI setting and Load Connection Subrate
Date: Fri, 24 Jul 2026 15:12:17 -0400 [thread overview]
Message-ID: <20260724191225.1815634-5-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 HCIEMU_TYPE_BREDRLE62 device type for testing Bluetooth 6.2
features and add test cases:
- Set Low Energy on 6.2 - SCI Setting: verifies that the SCI
setting bit (25) is reported in supported/current settings
for a 6.2 controller.
- Load Connection Subrate - Invalid Params 1: verifies invalid
parameters are rejected.
- Load Connection Subrate - Success 1: verifies loading valid
connection subrate parameters succeeds.
---
tools/mgmt-tester.c | 59 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 4d28090271e9..15c9254e307e 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -597,6 +597,13 @@ static void test_condition_complete(struct test_data *data)
#define test_bredrle60(name, data, setup, func) \
test_bredrle60_full(name, data, setup, func, 2)
+#define test_bredrle62_full(name, data, setup, func, timeout) \
+ test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE62, \
+ 0x0e, 0x0201beff, 0x00000080)
+
+#define test_bredrle62(name, data, setup, func) \
+ test_bredrle62_full(name, data, setup, func, 2)
+
#define test_hs_full(name, data, setup, func, timeout) \
test_full(name, data, setup, func, timeout, HCIEMU_TYPE_BREDRLE, \
0x09, 0x0001bfff, 0x00000080)
@@ -4429,6 +4436,48 @@ static const struct generic_data load_conn_params_fail_1 = {
.expect_status = MGMT_STATUS_INVALID_PARAMS,
};
+static const char set_le_settings_param_sci[] = { 0x81, 0x02, 0xfc, 0x03 };
+static const struct generic_data set_le_on_success_sci = {
+ .setup_settings = settings_le,
+ .send_opcode = MGMT_OP_SET_POWERED,
+ .send_param = set_powered_on_param,
+ .send_len = sizeof(set_powered_on_param),
+ .expect_status = MGMT_STATUS_SUCCESS,
+ .expect_param = set_le_settings_param_sci,
+ .expect_len = sizeof(set_le_settings_param_sci),
+ .expect_settings_set = MGMT_SETTING_LE,
+ .expect_hci_command = BT_HCI_CMD_WRITE_LE_HOST_SUPPORTED,
+ .expect_hci_param = set_le_on_write_le_host_param,
+ .expect_hci_len = sizeof(set_le_on_write_le_host_param),
+};
+
+static const uint8_t load_conn_subrate_nval_1[16] = { 0x12, 0x11 };
+static const struct generic_data load_conn_subrate_fail_1 = {
+ .send_opcode = MGMT_OP_LOAD_CONN_SUBRATE,
+ .send_param = load_conn_subrate_nval_1,
+ .send_len = sizeof(load_conn_subrate_nval_1),
+ .expect_status = MGMT_STATUS_INVALID_PARAMS,
+};
+
+static const uint8_t load_conn_subrate_valid_1[] = {
+ 0x01, 0x00, /* param_count */
+ 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, /* address */
+ 0x01, /* address type */
+ 0x08, 0x00, /* min_interval */
+ 0x80, 0x0c, /* max_interval */
+ 0x01, 0x00, /* subrate_min */
+ 0x04, 0x00, /* subrate_max */
+ 0x00, 0x00, /* max_latency */
+ 0x02, 0x00, /* cont_num */
+ 0xc8, 0x00, /* supv_timeout */
+};
+static const struct generic_data load_conn_subrate_success_1 = {
+ .send_opcode = MGMT_OP_LOAD_CONN_SUBRATE,
+ .send_param = load_conn_subrate_valid_1,
+ .send_len = sizeof(load_conn_subrate_valid_1),
+ .expect_status = MGMT_STATUS_SUCCESS,
+};
+
static const uint8_t add_device_nval_1[] = {
0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc,
0x00,
@@ -13329,6 +13378,9 @@ int main(int argc, char *argv[])
test_bredrle60("Set Low Energy on 6.0 - Success 5",
&set_le_on_success_test_4,
NULL, test_command_generic);
+ test_bredrle62("Set Low Energy on 6.2 - SCI Setting",
+ &set_le_on_success_sci,
+ NULL, test_command_generic);
test_bredrle("Set Low Energy on - Invalid parameters 1",
&set_le_on_invalid_param_test_1,
NULL, test_command_generic);
@@ -13812,6 +13864,13 @@ int main(int argc, char *argv[])
&load_conn_params_fail_1,
NULL, test_command_generic);
+ test_bredrle62("Load Connection Subrate - Invalid Params 1",
+ &load_conn_subrate_fail_1,
+ NULL, test_command_generic);
+ test_bredrle62("Load Connection Subrate - Success 1",
+ &load_conn_subrate_success_1,
+ NULL, test_command_generic);
+
test_bredrle("Add Device - Invalid Params 1",
&add_device_fail_1,
NULL, test_command_generic);
--
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 ` Luiz Augusto von Dentz [this message]
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 ` [PATCH BlueZ v1 06/12] monitor: Add decoding for Load Connection Subrate, SCI setting and event Luiz Augusto von Dentz
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-5-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