Central Disconnecting Inactive Peripheral


I am working on a bluetooth application. At the moment I am just trying to ensure that the IOS central has a reliable connection to the BLE peripheral. At the moment the peripheral is configured in a way where it is not updating any of the characteristics. Hence, the IOS central does not recieve any characteristic change notifications. After a few minutes of being in a connect with the peripheral the CBCentralManager recieves a didDisconnectPeripheral event and I notice that the connection is terminated.

Does the Core Bluetooth Central have some sort of timeout that terminates a connection with a peripheral if no new data is being recieved or sent?



I have confirmed that even when the peripheral device is notifying once every ten seconds the BLE central will issue a disconnection event after aproximatly 90 seconds of connection. Once the disconnection event is recieved connection can be re-established by beginning the discovery process again.

the peripheral device is using an nRF5182 BLE core.

First thing to check would be the connection parameters used by the peripheral.

These are the constraints:

Interval Max * (***** Latency + 1) ≤ 2 seconds

Interval Min ≥ 20 ms

Interval Min + 20 ms ≤ Interval Max

***** Latency ≤ 4

SupervisionTimeout ≤ 6 seconds

Interval Max * (***** Latency + 1) * 3 < SupervisionTimeout

Values outside these constraints will cause connection stability issues like you are seeing.

Also, my general recommendation is to keep the Max Interval closer to 1 second rather than the 2 second maximum for better results.

The peripheral needs to respond to link level data within the effective connection interval to maintain a connection. The effective interval is the current connection interval * the ***** Lantency value.

I don't know how you have implemeted your peripheral, but if the peripheral is sleeping for 10 seconds and then sending a notification, and going back to sleep again (and not responding to link level requests) , that would cause timeouts.