Bluetooth Low Energy Connection Parameters

I'm developing an accessory that communicates with iOS/iPadOS via Bluetooth Low Energy and observed some odd behavior. My accessory (peripheral) requests more forgiving BLE connection parameters from the OS (central). The request is initially accepted, but then immediately overwritten by the central with the default parameters. This ultimately leads to a an endless loop of negotiating parameters that eventually results in the peripheral getting overwhelmed and disconnecting.

The first solution I tried was simply going along with the central's parameters, but this proved to be less than optimal, as there were still sporadic disconnects. As best as I can tell, the parameters I'm requesting are compliant with Apple's spec (please correct me if I'm wrong):

Minimum Connection Interval: 30ms

Maximum Connection Interval: 60ms

Peripheral Latency: 30

Supervisory Timeout: 6s

So my question is this: Is there some mechanism that's causing the central to continuously renegotiate connection parameters, and is there anything I can do inside my accessory to avoid it?

I think the short answer is no. Your peripheral isn't in charge of the connection, the central is. You can request, the central isn't obliged to accept your request.

Remember your peripheral is not necessarily the only one the phone wants to maintain a connection with, and you're not in charge of everything going on in the central.

@ssmith_c took the words out of my mouth - as a phone is not a dedicated central device that only communicates wth your accessory, it will not accept parameters that is not suitable for itself at the time. So you may see the same parameters accepted once, and rejected later.

As for the parameters being compliant, they are not correct. It is missing the rule: Interval Max * (Peripheral Latency + 1) LESS THAN 6 seconds.

With your settings that value is 18 seconds. You may have mistaken the peripheral latency to be the time, but actually it is supposed to be the number of connection intervals. The minimum latency you can request with your connection interval selections is 60ms, by setting the latency value to zero.

General connection parameter request guidelines:

  • Peripheral Latency ≤ 30 connection intervals.
  • Supervision Timeout from 6 seconds to 18 seconds.
  • Interval Min ≥ 15 ms.
  • Interval Min ≤ 2 seconds.
  • Interval Min is a multiple of 15 ms.
  • One of the following:
    • Interval Max at least 15 ms greater than Interval Min.
    • Interval Max and Interval Min are both 15 ms.
  • Interval Max * (Peripheral Latency + 1) of 6 seconds or less.
  • Supervision Timeout greater than Interval Max * (Peripheral Latency + 1) * 3.

These can be found in Apple Accessory Design Guidelines Section 55.6

Bluetooth Low Energy Connection Parameters
 
 
Q