apache / apache/mynewt-nimble

Re-Pairing Required on Reconnect due to Resolvable Random Address Handling Issue on Linux

Open
#1,852 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
893
Forks
512
Avg merge
13d 31m
Merged PRs (30d)
7

Description

Hi,
I am facing an issue that might not be a nimble bug, but I haven't found a solution yet. I am using the NimBLE stack on Linux to create a BLE peripheral. I can successfully connect and pair my phone. However, when I try to reconnect my phone later, it prompts me to pair again.

After investigating, I suspect the problem is that my Bluetooth adapter doesn't support the Resolving List feature. As a result, when my phone reconnects using a resolvable random address, NimBLE cannot identify it as an already bonded device.

I use key distribution flags: BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID

Logs when I start my program:
btmon log (I removed the sensitive informations):

```
HCI Command: LE Add Device To Resolving List (0x08|0x0027) plen 39
[hci1] 8.517265
Address type: Public (0x00)
Address: XX:XX:XX:XX:XX:XX
Peer identity resolving key: ...
Local identity resolving key: ...
HCI Event: Command Complete (0x0e) plen 4
8.519054
LE Add Device To Resolving List (0x08|0x0027) ncmd 2
Status: Unsupported Remote Feature / Unsupported LMP Feature (0x1a)
```

Nimble log output:

`failed to configure restored IRK`

Out of three BT adapter, two has this issue.
Is there a way to solve this problem?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reconnect flow on the affected Linux Bluetooth adapters and inspect the btmon output for the LE Add Device To Resolving List failure alongside NimBLE's "failed to configure restored IRK" message. Compare the adapters' Resolving List support and determine whether a supported workaround exists; done means reconnecting without an unnecessary pairing prompt or clearly documenting the adapter limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.