This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Previously bonded device disconnects.

I have an nrf52832 BLE HIDS device based, with the connection and peer handling code copied from the hids keyboard example, SDK13. I use Windows 10 as host. Setting up a connection works fine, but when I remove the device from Windows and try to add it again, it goes wrong. The debugger says "Connected to a previously bonded device." and "Connected", but then after about 2 seconds, I get "Disconnected" and the device starts advertising again.

I'd like to figure out what goes wrong and how I can resolve it, but I don't know where to start. The only solution I currently have it deleting the peer data, but to me that kind of defeats the purpose, right?

I also tried to replicate the behaviour using nRF Connect on an iPhone, but this seems to work fine.

Related