nrf5340 BLE Auto reconnect to paired peer after reboot

Basically I want the nrf5340 to reconnect to a paired peer upon reboot. The code seems to suggest that this should happen via directed advertising. 

I am testing this with the direct_adv zephyr sample and the nrf5340 audio application in CIS headset mode. The peer is a pixel 7 and a Pixel 6. Behaviour is consistent across these devices.

Initial pairing works as expected but once I reset the audio dk via the reset button the connection is not reestablished.

For the audio application Logs suggest that directed adv times out and normal adv is resumed but this is not the behaviour I need. 

For the direct_adv sample the logs say that a connection is established upon reboot but it disconnects immediately with error 0x13 without user intervention. 

Is there some config flag that needs to be enabled?

  • Hi Laurin,

    Which NCS version are you using?

    Are you using the phone's Bluetooth settings to bond the devices, or are you using an app (i.e. nRF Connect for Android)?

    I was using NCS v2.6.0 and I tested this with a Pixel 7. I found that the LE Audio application reconnected to the phone on reboot, but I did see issues with the direct_adv sample. I was using the nRF Connect for Android app and I needed to initiate a new connection after a DK reboot for them to connect again. After initiating it would take a few minutes before the connection was established.

    Best regards,

    Maria

  • Sorry for the very late response.

    And sorry for not providing that information with the initial post. I was testing with NCS v2.6.0 as well. 

    I was using the android bluetooth settings to pair the device which is an audio dk running the audio application with CIS and headset options.

    I tried to confirm the behaviour that I described but it seems now that after updating the pixel, the auto connect seems to happen as expected.

    But not via directed advertising as this times out and upon normal adv the connection is established as expected.

Related