I have a NRF52840 device which advertises connectable every 2 seconds for unlimited time.
I'm running a custom service (based mostly on this code https://github.com/NordicPlayground/nRF5x-custom-ble-service-tutorial).
After a day or two some of the devices keep on advertising but fail to connect (previous to get into this bad state I can connect just fine). I have tried to connect using nrf connect from multiple android and ios phones, as well as the Bluetooth Low Energy app in the NRF connect desktop app .
In the BLE Test in NRF connect desktop app I get the following error when trying to connect:
Failed to get services (BLE_ERROR_INVALID_CONN_HANDLE)
Connection was lost during service discovery
Failed to call gattsExchangeMtuReply (BLE_ERROR_INVALID_CONN_HANDLE)
Failed to call gattsExchangeMtuReply
Failed to update data length (BLE_ERROR_INVALID_CONN_HANDLE)
Failed to update data length
I'm attaching a sniffer trace with the device "dd:49:a2:a8:1b:cf" and a andriod phone trying to connect to it.
I'm using soft device 140 v6.0.0 and SDK 15.0.0. The device is mostly not doing anything else other than the 2second advertising.
Any ideas what might be going on?