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

Related