Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] mgmt-tester: Add LL Privacy host-resolved RPA scan checks
@ 2026-10-14 18:11 Luiz Augusto von Dentz
  2026-10-14 21:53 ` [BlueZ,v1] " bluez.test.bot
  2026-10-15 19:40 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2026-10-14 18:11 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Controllers with LL Privacy resolve RPAs themselves, so peers with an
IRK can be kept in the accept list and passive scanning shall use the
accept list filter policy.

Assisted-by: OpenCode:claude-opus-5.5
---
 tools/mgmt-tester.c | 84 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 13484a6632ff..631c906f3aa8 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -10758,6 +10758,70 @@ static const struct generic_data host_rpa_no_irk_autoconnect = {
 	.expect_hci_param_check_func = host_rpa_filtered_check,
 };
 
+static const uint8_t ll_privacy_rpa_filtered[] = {
+	0x00,			/* Own Address Type */
+	0x01,			/* Filter Policy - Accept List */
+	0x05,			/* PHYs - 1M and Coded */
+	0x00,			/* Type - Passive */
+	0x60, 0x00,		/* Interval */
+	0x30, 0x00,		/* Window */
+	0x00,			/* Type - Passive */
+	0x60, 0x00,		/* Interval */
+	0x30, 0x00,		/* Window */
+};
+
+static int ll_privacy_rpa_filtered_check(const void *param, uint16_t length)
+{
+	const struct bt_hci_cmd_le_set_ext_scan_params *cp = param;
+	const struct bt_hci_le_scan_phy *phy = (void *) cp->data;
+
+	if (length != sizeof(ll_privacy_rpa_filtered))
+		return -EINVAL;
+
+	return cp->filter_policy != 0x01 || phy[0].type != 0x00 ||
+							phy[1].type != 0x00;
+}
+
+static const struct generic_data ll_privacy_rpa_autoconnect = {
+	.setup_settings = settings_powered_le,
+	.setup_send_opcode = MGMT_OP_LOAD_IRKS,
+	.setup_send_param = load_irks_le_public_param_1,
+	.setup_send_len = sizeof(load_irks_le_public_param_1),
+	.send_opcode = MGMT_OP_ADD_DEVICE,
+	.send_param = add_device_le_public_param_1,
+	.send_len = sizeof(add_device_le_public_param_1),
+	.expect_param = add_device_rsp_le_public,
+	.expect_len = sizeof(add_device_rsp_le_public),
+	.expect_status = MGMT_STATUS_SUCCESS,
+	.expect_alt_ev = MGMT_EV_DEVICE_ADDED,
+	.expect_alt_ev_param = add_device_le_public_param_1,
+	.expect_alt_ev_len = sizeof(add_device_le_public_param_1),
+	.expect_hci_command = BT_HCI_CMD_LE_SET_EXT_SCAN_PARAMS,
+	.expect_hci_param = ll_privacy_rpa_filtered,
+	.expect_hci_len = sizeof(ll_privacy_rpa_filtered),
+	.expect_hci_param_check_func = ll_privacy_rpa_filtered_check,
+};
+
+static const struct generic_data ll_privacy_rpa_report = {
+	.setup_settings = settings_powered_le,
+	.setup_send_opcode = MGMT_OP_LOAD_IRKS,
+	.setup_send_param = load_irks_le_public_param_1,
+	.setup_send_len = sizeof(load_irks_le_public_param_1),
+	.send_opcode = MGMT_OP_ADD_DEVICE,
+	.send_param = host_rpa_report_param,
+	.send_len = sizeof(host_rpa_report_param),
+	.expect_param = add_device_rsp_le_public,
+	.expect_len = sizeof(add_device_rsp_le_public),
+	.expect_status = MGMT_STATUS_SUCCESS,
+	.expect_alt_ev = MGMT_EV_DEVICE_ADDED,
+	.expect_alt_ev_param = host_rpa_report_param,
+	.expect_alt_ev_len = sizeof(host_rpa_report_param),
+	.expect_hci_command = BT_HCI_CMD_LE_SET_EXT_SCAN_PARAMS,
+	.expect_hci_param = ll_privacy_rpa_filtered,
+	.expect_hci_len = sizeof(ll_privacy_rpa_filtered),
+	.expect_hci_param_check_func = ll_privacy_rpa_filtered_check,
+};
+
 static const struct generic_data host_rpa_no_irk_report = {
 	.setup_settings = settings_powered_le,
 	.send_opcode = MGMT_OP_ADD_DEVICE,
@@ -15856,6 +15920,26 @@ int main(int argc, char *argv[])
 	test_bredrle("Scan RPA - Background report without IRK",
 			&host_rpa_no_irk_report, NULL, test_command_generic);
 
+	/* LL Privacy
+	 * Setup: Enable LE, load IRK and Power On
+	 * Run: Add new device with auto-connect
+	 * Expect: Passive scanning uses the accept list since the controller
+	 *         resolves RPAs
+	 */
+	test_bredrle50("LL Privacy - Scan RPA - Auto-connect with IRK",
+				&ll_privacy_rpa_autoconnect,
+				setup_command_generic, test_command_generic);
+
+	/* LL Privacy
+	 * Setup: Enable LE, load IRK and Power On
+	 * Run: Add new device with background report
+	 * Expect: Passive scanning uses the accept list since the controller
+	 *         resolves RPAs
+	 */
+	test_bredrle50("LL Privacy - Scan RPA - Background report with IRK",
+				&ll_privacy_rpa_report,
+				setup_command_generic, test_command_generic);
+
 	/* LL Privacy
 	 * Setup: Enable LE and Power On
 	 * Run: Add new device
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ,v1] mgmt-tester: Add LL Privacy host-resolved RPA scan checks
  2026-10-14 18:11 [PATCH BlueZ v1] mgmt-tester: Add LL Privacy host-resolved RPA scan checks Luiz Augusto von Dentz
@ 2026-10-14 21:53 ` bluez.test.bot
  2026-10-15 19:40 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2026-10-14 21:53 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 858 bytes --]

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/series/1185788/

---Test result---

Test Summary:
CheckPatch                    PASS      0.60 seconds
GitLint                       PASS      0.33 seconds
BuildEll                      PASS      19.72 seconds
BluezMake                     PASS      302.23 seconds
CheckSmatch                   PASS      296.18 seconds
bluezmakeextell               PASS      95.13 seconds
TestFunctional                PASS      1135.66 seconds
IncrementalBuild              PASS      302.77 seconds
ScanBuild                     PASS      1153.57 seconds



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

---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ v1] mgmt-tester: Add LL Privacy host-resolved RPA scan checks
  2026-10-14 18:11 [PATCH BlueZ v1] mgmt-tester: Add LL Privacy host-resolved RPA scan checks Luiz Augusto von Dentz
  2026-10-14 21:53 ` [BlueZ,v1] " bluez.test.bot
@ 2026-10-15 19:40 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2026-10-15 19:40 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 14 Oct 2026 14:11:53 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> Controllers with LL Privacy resolve RPAs themselves, so peers with an
> IRK can be kept in the accept list and passive scanning shall use the
> accept list filter policy.
> 
> Assisted-by: OpenCode:claude-opus-5.5
> 
> [...]

Here is the summary with links:
  - [BlueZ,v1] mgmt-tester: Add LL Privacy host-resolved RPA scan checks
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=fa6ba55020de

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-15 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14 18:11 [PATCH BlueZ v1] mgmt-tester: Add LL Privacy host-resolved RPA scan checks Luiz Augusto von Dentz
2026-10-14 21:53 ` [BlueZ,v1] " bluez.test.bot
2026-10-15 19:40 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox