HID auto connect problem

Hi. I am using nrf52832 and 17.0.2 sdk.

What I want to do is to provide automatic connection between my nrf device and my android device. For this purpose, I use the HID keyboard example. Then I do a close and close test and after a few automatic connections, I have problems with automatic connection again and I get an error like this.

debug> app: pm_whitelist_get returns 1 addr in whitelist and 1 irk whitelist
<info> app: Fast advertising with whitelist.
<info> app: Disconnected. conn_handle: 0x0, reason: 0x13

Sometimes I always have to trigger the connection manually. Otherwise, the automatic connection never starts. What do you suggest as a solution.

My main file below.

main.rar

  • Hi

    Can you upload the full debug log from your nRF52832 here so we can get some context here? Also, are you using an app for Android or just the "barebones" Bluetooth settings?

    If you use the nRF Connect for Android app you can also see a debug log on the Android side that might tell us something of what exactly happens when these disconnects occurs. 

    Disconnect reason 0x13 indicates that the remote user terminated the connection. Seeing this on the nRF side means that it is the Android trigging the disconnect, so I think logging on the Android side might be helpful here.

    Best regards,

    Simon

Related