From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v2 4/5] mgmt-tester: Fix missing MGMT_SETTING_LL_PRIVACY
Date: Mon, 24 Mar 2025 09:41:11 -0400 [thread overview]
Message-ID: <20250324134112.2108216-4-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20250324134112.2108216-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This fixes the tests which now requires MGMT_SETTING_LL_PRIVACY (bit
22).
---
tools/mgmt-tester.c | 60 ++++++++++++++++++++++++++++-----------------
1 file changed, 37 insertions(+), 23 deletions(-)
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index ebb158d1f15a..030827cd51d1 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -1509,6 +1509,7 @@ static const char set_ssp_invalid_param[] = { 0x02 };
static const char set_ssp_garbage_param[] = { 0x01, 0x00 };
static const char set_ssp_settings_param_1[] = { 0xc0, 0x00, 0x00, 0x00 };
static const char set_ssp_settings_param_2[] = { 0xc1, 0x00, 0x00, 0x00 };
+static const char set_ssp_settings_param_3[] = { 0xc1, 0x00, 0x40, 0x00 };
static const char set_ssp_on_write_ssp_mode_param[] = { 0x01 };
static const struct generic_data set_ssp_on_success_test_1 = {
@@ -6077,8 +6078,8 @@ static const struct generic_data set_dev_id_power_off_on = {
.send_param = set_powered_on_param,
.send_len = sizeof(set_powered_on_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_ssp_settings_param_2,
- .expect_len = sizeof(set_ssp_settings_param_2),
+ .expect_param = set_ssp_settings_param_3,
+ .expect_len = sizeof(set_ssp_settings_param_3),
.expect_settings_set = MGMT_SETTING_POWERED,
.expect_hci_command = BT_HCI_CMD_WRITE_EXT_INQUIRY_RESPONSE,
.expect_hci_param = write_eir_set_dev_id_success_1,
@@ -6094,8 +6095,8 @@ static const struct generic_data set_dev_id_ssp_off_on = {
.send_param = set_ssp_on_param,
.send_len = sizeof(set_ssp_on_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_ssp_settings_param_2,
- .expect_len = sizeof(set_ssp_settings_param_2),
+ .expect_param = set_ssp_settings_param_3,
+ .expect_len = sizeof(set_ssp_settings_param_3),
.expect_hci_command = BT_HCI_CMD_WRITE_EXT_INQUIRY_RESPONSE,
.expect_hci_param = write_eir_set_dev_id_success_1,
.expect_hci_len = sizeof(write_eir_set_dev_id_success_1),
@@ -8214,13 +8215,17 @@ static const uint8_t set_ext_adv_data_test1[] = {
0x74, 0x65, 0x73, 0x74, 0x31, /* "test1" */
};
+static const char set_powered_ext_adv_instance_settings_param[] = {
+ 0x81, 0x02, 0x40, 0x00,
+};
+
static const struct generic_data add_ext_advertising_success_pwron_data = {
.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_powered_adv_instance_settings_param,
- .expect_len = sizeof(set_powered_adv_instance_settings_param),
+ .expect_param = set_powered_ext_adv_instance_settings_param,
+ .expect_len = sizeof(set_powered_ext_adv_instance_settings_param),
.expect_hci_command = BT_HCI_CMD_LE_SET_EXT_ADV_DATA,
.expect_hci_param = set_ext_adv_data_test1,
.expect_hci_len = sizeof(set_ext_adv_data_test1),
@@ -8239,7 +8244,7 @@ static const struct generic_data add_ext_advertising_success_pwron_enabled = {
.send_param = set_powered_on_param,
.send_len = sizeof(set_powered_on_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_powered_adv_instance_settings_param,
+ .expect_param = set_powered_ext_adv_instance_settings_param,
.expect_len = sizeof(set_powered_adv_instance_settings_param),
.expect_hci_command = BT_HCI_CMD_LE_SET_EXT_ADV_ENABLE,
.expect_hci_param = set_ext_adv_on_set_adv_enable_param,
@@ -8256,13 +8261,15 @@ static const uint8_t set_ext_adv_data_txpwr[] = {
0x00, /* tx power */
};
+static const char set_ext_adv_settings_param[] = { 0x81, 0x06, 0x40, 0x00 };
+
static const struct generic_data add_ext_advertising_success_4 = {
.send_opcode = MGMT_OP_SET_ADVERTISING,
.send_param = set_adv_on_param,
.send_len = sizeof(set_adv_on_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_adv_settings_param_2,
- .expect_len = sizeof(set_adv_settings_param_2),
+ .expect_param = set_ext_adv_settings_param,
+ .expect_len = sizeof(set_ext_adv_settings_param),
.expect_hci_command = BT_HCI_CMD_LE_SET_EXT_ADV_DATA,
.expect_hci_param = set_ext_adv_data_txpwr,
.expect_hci_len = sizeof(set_ext_adv_data_txpwr),
@@ -8273,8 +8280,8 @@ static const struct generic_data add_ext_advertising_success_5 = {
.send_param = set_adv_off_param,
.send_len = sizeof(set_adv_off_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_powered_adv_instance_settings_param,
- .expect_len = sizeof(set_powered_adv_instance_settings_param),
+ .expect_param = set_powered_ext_adv_instance_settings_param,
+ .expect_len = sizeof(set_powered_ext_adv_instance_settings_param),
.expect_hci_command = BT_HCI_CMD_LE_SET_EXT_ADV_DATA,
.expect_hci_param = set_ext_adv_data_test1,
.expect_hci_len = sizeof(set_ext_adv_data_test1),
@@ -8545,13 +8552,16 @@ static uint8_t preset_connectable_on_ext_adv_param[] = {
0x00, /* Scan req notification */
};
+static const char set_connectable_settings_param_4[] = {
+ 0x83, 0x02, 0x40, 0x00 };
+
static const struct generic_data add_ext_advertising_success_16 = {
.send_opcode = MGMT_OP_SET_CONNECTABLE,
.send_param = set_connectable_on_param,
.send_len = sizeof(set_connectable_on_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_connectable_settings_param_3,
- .expect_len = sizeof(set_connectable_settings_param_3),
+ .expect_param = set_connectable_settings_param_4,
+ .expect_len = sizeof(set_connectable_settings_param_4),
.expect_hci_command = BT_HCI_CMD_LE_SET_EXT_ADV_PARAMS,
.expect_hci_param = preset_connectable_on_ext_adv_param,
.expect_hci_len = sizeof(preset_connectable_on_ext_adv_param),
@@ -8575,25 +8585,29 @@ static uint8_t preset_connectable_off_ext_adv_param[] = {
0x00, /* Scan req notification */
};
+static const char set_le_settings_param_3[] = { 0x81, 0x02, 0x40, 0x00 };
+
static const struct generic_data add_ext_advertising_success_17 = {
.send_opcode = MGMT_OP_SET_CONNECTABLE,
.send_param = set_connectable_off_param,
.send_len = sizeof(set_connectable_off_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_le_settings_param_2,
- .expect_len = sizeof(set_le_settings_param_2),
+ .expect_param = set_le_settings_param_3,
+ .expect_len = sizeof(set_le_settings_param_3),
.expect_hci_command = BT_HCI_CMD_LE_SET_EXT_ADV_PARAMS,
.expect_hci_param = preset_connectable_off_ext_adv_param,
.expect_hci_len = sizeof(preset_connectable_off_ext_adv_param),
};
+static const char set_le_settings_param_off_1[] = { 0x81, 0x00, 0x40, 0x00 };
+
static const struct generic_data add_ext_advertising_le_off = {
.send_opcode = MGMT_OP_SET_LE,
.send_param = set_le_off_param,
.send_len = sizeof(set_le_off_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_le_settings_param_off,
- .expect_len = sizeof(set_le_settings_param_off),
+ .expect_param = set_le_settings_param_off_1,
+ .expect_len = sizeof(set_le_settings_param_off_1),
.expect_alt_ev = MGMT_EV_ADVERTISING_REMOVED,
.expect_alt_ev_param = advertising_instance1_param,
.expect_alt_ev_len = sizeof(advertising_instance1_param),
@@ -8875,8 +8889,8 @@ static const struct generic_data multi_ext_advertising_add_no_power = {
.send_param = set_powered_on_param,
.send_len = sizeof(set_powered_on_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_powered_adv_instance_settings_param,
- .expect_len = sizeof(set_powered_adv_instance_settings_param),
+ .expect_param = set_powered_ext_adv_instance_settings_param,
+ .expect_len = sizeof(set_powered_ext_adv_instance_settings_param),
.expect_hci_list = multi_ext_adv_add_2_advs_hci_cmds,
};
@@ -9403,8 +9417,8 @@ static const struct generic_data add_ext_advertising_conn_on_1m = {
.send_param = set_connectable_on_param,
.send_len = sizeof(set_connectable_on_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_connectable_settings_param_3,
- .expect_len = sizeof(set_connectable_settings_param_3),
+ .expect_param = set_connectable_settings_param_4,
+ .expect_len = sizeof(set_connectable_settings_param_4),
.expect_hci_command = BT_HCI_CMD_LE_SET_EXT_ADV_PARAMS,
.expect_hci_param = preset_connectable_on_ext_pdu_adv_param,
.expect_hci_len = sizeof(preset_connectable_on_ext_pdu_adv_param),
@@ -9463,8 +9477,8 @@ static const struct generic_data add_ext_advertising_conn_off_1m = {
.send_param = set_connectable_off_param,
.send_len = sizeof(set_connectable_off_param),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_param = set_le_settings_param_2,
- .expect_len = sizeof(set_le_settings_param_2),
+ .expect_param = set_le_settings_param_3,
+ .expect_len = sizeof(set_le_settings_param_3),
.expect_hci_command = BT_HCI_CMD_LE_SET_EXT_ADV_PARAMS,
.expect_hci_param = preset_connectable_off_ext_1m_adv_param,
.expect_hci_len = sizeof(preset_connectable_off_ext_1m_adv_param),
--
2.48.1
next prev parent reply other threads:[~2025-03-24 13:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-24 13:41 [PATCH BlueZ v2 1/5] mgmt-api: Add missing Device Flag Luiz Augusto von Dentz
2025-03-24 13:41 ` [PATCH BlueZ v2 2/5] mgmt-api: Add LL Privacy setting Luiz Augusto von Dentz
2025-03-24 13:41 ` [PATCH BlueZ v2 3/5] gatt-database: Fix always registering CentralAddressResolution Luiz Augusto von Dentz
2025-03-24 13:41 ` Luiz Augusto von Dentz [this message]
2025-03-24 13:41 ` [PATCH BlueZ v2 5/5] monitor: Add decoding of MGMT LL Privacy setting Luiz Augusto von Dentz
2025-03-24 14:39 ` [BlueZ,v2,1/5] mgmt-api: Add missing Device Flag bluez.test.bot
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=20250324134112.2108216-4-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.