Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zephyr 1.14] Host does not change the RPA #18150

Closed
MariuszSkamra opened this issue Aug 9, 2019 · 0 comments · Fixed by #18264
Closed

[zephyr 1.14] Host does not change the RPA #18150

MariuszSkamra opened this issue Aug 9, 2019 · 0 comments · Fixed by #18264
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@MariuszSkamra
Copy link
Collaborator

MariuszSkamra commented Aug 9, 2019

Describe the bug
It happens (about 30%) that Zephyr host does not change the RPA.

To Reproduce
Steps to reproduce the behavior:
To speed up RPA address rotation, set RPA timeout to 30 seconds CONFIG_BT_RPA_TIMEOUT=30
0. Test using Zephyr bluetooth/shell app for both devices. peripheral (a) - (b) central
1a. bt init
1b. bt init
2a. bt clear all
2b. bt clear all
3a. bt advertise on
3b. bt connect REMOTE_RPA_ADDR (random)
4b. bt security 2
5b. bt disconnect
6. Observe Zephyr peripheral (a) does not change the RPA address

Expected behavior
Zephyr changes it's RPA every CONFIG_BT_RPA_TIMEOUT

Screenshots or console output
Observe RPA rotation that in frames #263 - #289

< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1                                                                                                                                                                                                               #287 109.140400
        Advertising: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                                                                                               #288 109.140500
      LE Set Advertise Enable (0x08|0x000a) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6                                                                                                                                                                                                                 #289 109.140900
        Address: 74:78:B8:C4:F8:AB (Resolvable)
          Identity type: Random (0x01)
          Identity: DD:AD:FB:8F:B7:AE (Static)
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                                                                                               #290 109.140900
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1                                                                                                                                                                                                               #291 109.141200
        Advertising: Enabled (0x01)

After the connection, pairing, disconnection

< HCI Command: LE Add Device To Resolving List (0x08|0x0027) plen 39                                                                                                                                                                                                      #346 144.508200
        Address type: Random (0x01)
        Address: FE:69:8F:77:2F:49 (Static)
        Peer identity resolving key: 0fc94333d8498d9ac666b564b3f46abe
        Local identity resolving key: ebe0fd9e7d7dc8adf3c0f358006bc903
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                                                                                               #347 144.508400
      LE Add Device To Resolving List (0x08|0x0027) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Privacy Mode (0x08|0x004e) plen 8                                                                                                                                                                                                                   #348 144.508700
        01 49 2f 77 8f 69 fe 01                          .I/w.i..        
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                                                                                               #349 144.508800
      LE Set Privacy Mode (0x08|0x004e) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Address Resolution Enable (0x08|0x002d) plen 1                                                                                                                                                                                                      #350 144.509100
        Address resolution: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                                                                                               #351 144.509100
      LE Set Address Resolution Enable (0x08|0x002d) ncmd 1
        Status: Success (0x00)
> ACL Data RX: Handle 0 flags 0x02 dlen 21                                                                                                                                                                                                                                #352 144.509400
      SMP: Signing Information (0x0a) len 16
        Signature key: ef07c2b4509b247828ef6754bf6f5806
> HCI Event: Disconnect Complete (0x05) plen 4                                                                                                                                                                                                                            #353 149.849800
        Status: Success (0x00)
        Handle: 0
        Reason: Remote User Terminated Connection (0x13)
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1                                                                                                                                                                                                               #354 150.116400
        Advertising: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                                                                                               #355 150.116600
      LE Set Advertise Enable (0x08|0x000a) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 31                                                                                                                                                                                                                                 #356 717.366800
      LE Enhanced Connection Complete (0x0a)
        Status: Success (0x00)
        Handle: 0
        Role: Slave (0x01)
        Peer address type: Resolved Random (0x03)
        Peer address: FE:69:8F:77:2F:49 (Static)
        Local resolvable private address: 74:78:B8:C4:F8:AB (Resolvable)
          Identity type: Random (0x01)
          Identity: DD:AD:FB:8F:B7:AE (Static)
        Peer resolvable private address: 6E:63:9E:67:6D:9B (Resolvable)
          Identity type: Random (0x01)
          Identity: FE:69:8F:77:2F:49 (Static)
        Connection interval: 50.00 msec (0x0028)
        Connection latency: 0.00 msec (0x0000)
        Supervision timeout: 4000 msec (0x0190)
        Master clock accuracy: 0x07
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6                                                                                                                                                                                                                 #357 717.367100
        Address: 65:FE:FA:57:AC:5A (Resolvable)
          Identity type: Random (0x01)
          Identity: DD:AD:FB:8F:B7:AE (Static)
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                                                                                               #358 717.367200
      LE Set Random Address (0x08|0x0005) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1                                                                                                                                                                                                               #359 717.367600
        Advertising: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                                                                                               #360 717.367700
      LE Set Advertise Enable (0x08|0x000a) ncmd 1
        Status: Connection Limit Exceeded (0x09)

Note the timestamps between LE Set Advertise Enable and LE Enhanced Connection Complete

> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                                                                                               #355 150.116600
      LE Set Advertise Enable (0x08|0x000a) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 31                                                                                                                                                                                                                                 #356 717.366800
      LE Enhanced Connection Complete (0x0a)
        Status: Success (0x00)
        Handle: 0
        Role: Slave (0x01)
        Peer address type: Resolved Random (0x03)
        Peer address: FE:69:8F:77:2F:49 (Static)
        Local resolvable private address: 74:78:B8:C4:F8:AB (Resolvable)
          Identity type: Random (0x01)
          Identity: DD:AD:FB:8F:B7:AE (Static)
        Peer resolvable private address: 6E:63:9E:67:6D:9B (Resolvable)
          Identity type: Random (0x01)
          Identity: FE:69:8F:77:2F:49 (Static)
        Connection interval: 50.00 msec (0x0028)
        Connection latency: 0.00 msec (0x0000)
        Supervision timeout: 4000 msec (0x0190)
        Master clock accuracy: 0x07

it's almost 10 minutes and Zephyr does not changed it's RPA address

gap_priv_conn_bi_01_c.btsnoop.log

Environment (please complete the following information):

  • nrf52840
@MariuszSkamra MariuszSkamra added the bug The issue is a bug, or the PR is fixing a bug label Aug 9, 2019
@MariuszSkamra MariuszSkamra assigned joerchan and jhedberg and unassigned joerchan Aug 9, 2019
@ioannisg ioannisg added the priority: medium Medium impact/importance bug label Aug 13, 2019
joerchan added a commit to joerchan/zephyr that referenced this issue Aug 14, 2019
The RPA timer should always be running, even with privacy supported by
the controller. In order to select an IRK to generate the private
the controller is instructed by provided an identity address.
If we want to advertise privately without providing an identity address
the host has to set the private address.

Fixes: zephyrproject-rtos#18150

Signed-off-by: Joakim Andersson <[email protected]>
carlescufi pushed a commit that referenced this issue Aug 15, 2019
The RPA timer should always be running, even with privacy supported by
the controller. In order to select an IRK to generate the private
the controller is instructed by provided an identity address.
If we want to advertise privately without providing an identity address
the host has to set the private address.

Fixes: #18150

Signed-off-by: Joakim Andersson <[email protected]>
joerchan added a commit to joerchan/zephyr that referenced this issue Aug 15, 2019
The RPA timer should always be running, even with privacy supported by
the controller. In order to select an IRK to generate the private
the controller is instructed by provided an identity address.
If we want to advertise privately without providing an identity address
the host has to set the private address.

Fixes: zephyrproject-rtos#18150

Signed-off-by: Joakim Andersson <[email protected]>
nashif pushed a commit that referenced this issue Aug 15, 2019
The RPA timer should always be running, even with privacy supported by
the controller. In order to select an IRK to generate the private
the controller is instructed by provided an identity address.
If we want to advertise privately without providing an identity address
the host has to set the private address.

Fixes: #18150

Signed-off-by: Joakim Andersson <[email protected]>
LeiW000 pushed a commit to LeiW000/zephyr that referenced this issue Sep 2, 2019
The RPA timer should always be running, even with privacy supported by
the controller. In order to select an IRK to generate the private
the controller is instructed by provided an identity address.
If we want to advertise privately without providing an identity address
the host has to set the private address.

Fixes: zephyrproject-rtos#18150

Signed-off-by: Joakim Andersson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants