* [PATCH v2 1/2] mgmt-tester: Fix expected manufacturer
@ 2021-10-21 22:36 Luiz Augusto von Dentz
2021-10-21 22:36 ` [PATCH v2 2/2] btdev: Set Local RPA when own_addr_type is 0x03 Luiz Augusto von Dentz
2021-10-21 22:55 ` [v2,1/2] mgmt-tester: Fix expected manufacturer bluez.test.bot
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2021-10-21 22:36 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The emulator is now using Linux Foundation manufacturer ID.
---
tools/mgmt-tester.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 64a5e1c3d..f490dc261 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -462,7 +462,7 @@ static void test_condition_complete(struct test_data *data)
user->test_setup = setup; \
user->test_data = data; \
user->expected_version = version; \
- user->expected_manufacturer = 0x003f; \
+ user->expected_manufacturer = 0x05f1; \
user->expected_supported_settings = expected_settings; \
user->initial_settings = settings; \
tester_add_full(name, data, \
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] btdev: Set Local RPA when own_addr_type is 0x03
2021-10-21 22:36 [PATCH v2 1/2] mgmt-tester: Fix expected manufacturer Luiz Augusto von Dentz
@ 2021-10-21 22:36 ` Luiz Augusto von Dentz
2021-10-21 22:55 ` [v2,1/2] mgmt-tester: Fix expected manufacturer bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2021-10-21 22:36 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This enables the emulator to properly emulate the generation of a Local
RPA so it always set the random_addr when Create Connection sets 0x03 as
own_addr_type 0x03:
< HCI Command: LE Extended.. (0x08|0x0043) plen 26
Filter policy: Accept list is not used (0x00)
Own address type: Random (0x03)
Peer address type: Public (0x00)
Peer address: 00:AA:01:01:00:00 (Intel Corporation)
Initiating PHYs: 0x01
Entry 0: LE 1M
Scan interval: 60.000 msec (0x0060)
Scan window: 60.000 msec (0x0060)
Min connection interval: 30.00 msec (0x0018)
Max connection interval: 50.00 msec (0x0028)
Connection latency: 0 (0x0000)
Supervision timeout: 420 msec (0x002a)
Min connection length: 0.000 msec (0x0000)
Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4
LE Extended Create Connection (0x08|0x0043) ncmd 1
Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 31
LE Enhanced Connection Complete (0x0a)
Status: Success (0x00)
Handle: 42
Role: Central (0x00)
Peer address type: Public (0x00)
Peer address: 00:AA:01:01:00:00 (Intel Corporation)
Local resolvable private address: 60:0C:C5:B9:10:5D (Resolvable)
Peer resolvable private address: 00:00:00:00:00:00 (Non-Resolvable)
Connection interval: 50.00 msec (0x0028)
Connection latency: 0 (0x0000)
Supervision timeout: 420 msec (0x002a)
Central clock accuracy: 0x00
---
emulator/btdev.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/emulator/btdev.c b/emulator/btdev.c
index 956dcee7f..03003d949 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -5124,9 +5124,10 @@ static void le_ext_conn_complete(struct btdev *btdev,
ev.status = status;
ev.peer_addr_type = btdev->le_scan_own_addr_type;
- if (ev.peer_addr_type == 0x01)
+ if (ev.peer_addr_type == 0x01 || ev.peer_addr_type == 0x03) {
+ ev.peer_addr_type = 0x01;
memcpy(ev.peer_addr, btdev->random_addr, 6);
- else
+ } else
memcpy(ev.peer_addr, btdev->bdaddr, 6);
ev.role = 0x01;
@@ -5135,6 +5136,11 @@ static void le_ext_conn_complete(struct btdev *btdev,
ev.latency = lecc->latency;
ev.supv_timeout = lecc->supv_timeout;
+ /* Set Local RPA if an RPA was generated for the advertising */
+ if (ext_adv->rpa)
+ memcpy(ev.local_rpa, ext_adv->random_addr,
+ sizeof(ev.local_rpa));
+
le_meta_event(conn->link->dev,
BT_HCI_EVT_LE_ENHANCED_CONN_COMPLETE, &ev,
sizeof(ev));
@@ -5148,10 +5154,13 @@ static void le_ext_conn_complete(struct btdev *btdev,
memcpy(ev.peer_addr, cmd->peer_addr, 6);
ev.role = 0x00;
- /* Set Local RPA if an RPA was generated for the advertising */
- if (ext_adv->rpa)
- memcpy(ev.local_rpa, ext_adv->random_addr,
- sizeof(ev.local_rpa));
+ /* Use random address as Local RPA if Create Connection own_addr_type
+ * is 0x03 since that expects the controller to generate the RPA.
+ */
+ if (btdev->le_scan_own_addr_type == 0x03)
+ memcpy(ev.local_rpa, btdev->random_addr, 6);
+ else
+ memset(ev.local_rpa, 0, sizeof(ev.local_rpa));
le_meta_event(btdev, BT_HCI_EVT_LE_ENHANCED_CONN_COMPLETE, &ev,
sizeof(ev));
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [v2,1/2] mgmt-tester: Fix expected manufacturer
2021-10-21 22:36 [PATCH v2 1/2] mgmt-tester: Fix expected manufacturer Luiz Augusto von Dentz
2021-10-21 22:36 ` [PATCH v2 2/2] btdev: Set Local RPA when own_addr_type is 0x03 Luiz Augusto von Dentz
@ 2021-10-21 22:55 ` bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2021-10-21 22:55 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 884 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/project/bluetooth/list/?series=568217
---Test result---
Test Summary:
CheckPatch PASS 2.85 seconds
GitLint PASS 1.90 seconds
Prep - Setup ELL PASS 45.27 seconds
Build - Prep PASS 0.50 seconds
Build - Configure PASS 8.27 seconds
Build - Make PASS 195.24 seconds
Make Check PASS 9.74 seconds
Make Distcheck PASS 231.28 seconds
Build w/ext ELL - Configure PASS 8.36 seconds
Build w/ext ELL - Make PASS 185.36 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-21 22:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 22:36 [PATCH v2 1/2] mgmt-tester: Fix expected manufacturer Luiz Augusto von Dentz
2021-10-21 22:36 ` [PATCH v2 2/2] btdev: Set Local RPA when own_addr_type is 0x03 Luiz Augusto von Dentz
2021-10-21 22:55 ` [v2,1/2] mgmt-tester: Fix expected manufacturer bluez.test.bot
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.