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

BLE connection to iOS device disconnects consistently after 40 seconds

We are consistently seeing a BLE disconnection after being connected to an iOS device for 40 seconds. On the iOS side, the log output at the time of disconnection says: "[System]Error disconnect from peripheral <DeviceName> Unknown Error." We are handling the iOS data length updates successfully as well as MTU exchange. We are able to read/write/notify over the connection properly with no failures until we hit the 40-second point, upon which the connection drops immediately.

We have essentially breakpointed each instance of sd_ble_gap_disconnect() in our code, and verified that it is not being called from our code at the time of disconnection. We're not seeing any BLE events immediately before the disconnection that would lead us to believe that a request timeout or transmission failure occurred, and nothing in the iOS logs indicates any related failures either.

When testing this same code against a BLE connection with a PCA dev board thru the OSx NRF Connect app, connection is sustained indefinitely without any issues.

Any ideas as to what might be causing this?

iOS version: 11.3

Device: iPhone 7

SoftDevice: S132 5.1.0

SDK version: 14.2

Connection parameter configuration:

Min connection interval = 15ms

Max connection interval = 650ms

Slave latency = 0

Connection supervisory timeout = 4s

Related