nrf5340 Audio out of band pairing Security Failed issue

Using nrf5340 as both Central and Peripheral roles and I have implemented the Basic Audio Profile based on the nrf5340 audio example. I am using nRF Connect v2.6.1.

I have implemented Out of Band Pairing over UART. The connection works 90% of the time but occasionally when powering the devices up AFTER the devices have been removed from the out of band connection the devices connect but they're unable to establish a secure connection and then it just continuously retries.

Procedure:

  • Physically connect the 2 devices and it exchanges addresses,c and r and successfully connects via out of band pairing and the devices successfully establish a Level 4 connection
  • Remove power from the GAP Central, Unicast Client (Gateway) so it shuts down
  • Start advertising on the Unicast Server (headset)
  • Turn on the Gateway and it starts scanning
  • It successfully retrieves the address and starts filtering by that address
  • A connection is then established and 75% of the time it establishes a secure connection
  • 25% of the time I get the following
    "Security failed: XX:XX:XX:XX:XX:XX(random) level 1 err 9" with XX's being the properly retrieved BLE address

There's also more during the retry mechanism when it continuously fails


-- [00:02:00.712,982] <dbg> ble_supervisor.c 234: security changed
-- [00:02:00.713,012] <wrn> bt_gatt: conn 0x2000c9c8 err 0x0e
-- [00:02:00.713,195] <inf> ble_supv: Disconnected: DC:E2:A8:E5:CD:84 (random) (reas n 8)

-- [00:02:00.713,195] <wrn> unicast_client: Failed to remove conn from discover_list: -22
-- [00:02:00.713,226] <wrn> unicast_client: Connection not found
-- [00:02:00.713,226] <wrn> unicast_client: Unknown connection disconnected
-- [00:02:00.713,287] <inf> ble_supv: Bonded device addr: XX:XX:XX:XX:XX:XX (random)
-- [00:02:00.713,317] <inf> ble_supv: Set to bonded addr
-- [00:02:00.713,378] <dbg> ble_supervisor.c 398: Scanning started
-- [00:02:01.078,735] <inf> ble_supv: Filters matched. Address: XX:XX:XX:XX:XX:XX (random) connectable: yes

-- [00:02:01.079,864] <dbg> ble_supervisor.c 111: Connecting
-- [00:02:01.184,539] <inf> ble_supv: Connected

-- [00:02:05.434,631] <err> ble_supv: Security failed: XX:XX:XX:XX:XX:XX (random) level 1 err 9

Parents Reply Children
No Data
Related