This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

peer_manager_handler: BLE_GAP_SEC_STATUS_AUTH_REQ at Re-pairing causes every following connection to fail until reset

Hi all,

I discovered that if I get BLE_GAP_SEC_STATUS_AUTH_REQ while pairing, the device is basically useless until a new reset. I would be extremely grateful for some help in understanding how to build a workaround as it seems coming from the softdevice.

The way I got this "bug" is by simply running a DEBUG version of our firmware, including the Nordic SDK, with the CLI open. I think the key of this error comes from the re-pairing process, which I rarely noticed in our logs.

```

[00003722] <info> BLEDriver: Bonding started.
[00003722] <info> SecurityService: Bonding in progress.
[00003723] <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
[00003723] <info> BLEDriver: Connection secured: role: peripheral, conn_handle: 0x0, procedure: 1.
[00003723] <info> SecurityService: Secured.
[00003723] <info> BLEDriver: Bonding started.
[00003723] <info> SecurityService: Bonding in progress.
[00003723] <info> BLEDriver: Re-pairing requested. Will be allowed.
[00003723] <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 131
[00003723] <info> BLEDriver: Failed to secure connection!
[00003723] <info> SecurityService: Securing failed.
[00003941] <info> BLEDriver: Fast advertising.
[00003941] <info> BLEDriver: Disconnected.
[00003953] <info> BLEDriver: Connected.
[00003954] <info> BLEDriver: Encryption started.
[00003954] <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102
[00003954] <info> BLEDriver: Failed to secure connection!
[00003954] <info> SecurityService: Securing failed.
[00003954] <info> BLEDriver: Fast advertising.
[00003954] <info> BLEDriver: Disconnected.
[00003954] <info> SecurityService: Not bonded.

```

The reasons why I am reporting this are two: firstly, to let you know of the occurrence, given that coming from the SD is hardly debuggable by anyone outside Nordic, secondly because it really confuses(?) the PeerManager at the point where only a reset(software or hardware) is able to "fix" the issue. So I wonder if you could suggest any smart workaround maybe to avoid the reset.

I was connecting to the Nordic module using Bluetoothctl from a Linux machine. I don't manage to reproduce it.

Many thanks in advance.

SDK: 17.0.2
SD: s140 - 7.2.0
bluetoothctl: 5.48

Parents Reply Children
No Data
Related