I would like to learn a little more about the process of negotiating a connection interval between an iOS and Android central and a nRF51 peripheral.
So, here are my questions:
A little overview of my situation, in case someone are curious or see a better approach than what I am heading towards:
In my application, at certain events I will have a stream of data needed to be forwarded via a GATT characteristics. Experiments show that processing the stream of data takes much shorter than the connection interval, so I concluded that a delay between each call to the notifying function is necessary.
If the connection parameters are not within what the central can set it can refuse the connection parameter update request. The peripheral will then get an event indicating this and will have to do appropriate actions.
The central will decide the connection parameters on connection establishment until a connection parameter update request is accepted. You can set the range between min and max interval high to be sure that the connection parameter update request is accepted. You can also take knowledge of what the limits or rules for the connection parameters the central has.
It depends on the central what interval it will choose.
Which intervals can be chosen for Android depends on the device, do a search for this on the internet. Apple have guidelines for the connection parameters, see section 3.6 in this document, here it is summarized:
Interval Max * (Slave Latency + 1) ≤ 2 seconds
Interval Min ≥ 20 ms
Interval Min + 20 ms ≤ Interval Max
Slave Latency ≤ 4
connSupervisionTimeout ≤ 6 seconds
Interval Max * (Slave Latency + 1) * 3 < connSupervisionTimeout
The connection interval must be between 7.5 ms and 4 s according to the Bluetooth spec.
Ole, I intended my questions towards a little different direction.
For the first question, I would like to know if there is any issues in specifying max interval == min interval. In particular, any possible issues both with the nRF51 SDK and with expectation of the actual connection interval.
max interval == min interval
For the second question, I would also like to know if the Bluetooth standard specifies that central should attempt to have a low connection interval or not. But from your answer, I take it that it does not?
There is no problem with setting max interval = min interval in our SDK, the only possible problem will be if the connection parameter update request is rejected, but then the application can handle this.
max interval = min interval
There is nothing in the Bluetooth standard that specifies if the central should attempt to use the min interval or the max interval. The central migth choose a high interval if it already has a lot of connections or low if not. You can for example set in Master Control Panel for PC if the central shall choose the minimum, medium or maximum value for connection interval. Looks like this feature is not present in nRF connect, but you can disable "auto accept update requests" and manually choose the parameters when the connection request arrives.
Readers of this very helpful answer should follow the above link to section 3.6 the Apple Guidelines to check for changes. R8 of the document as of 2017-07-09 has requirements quite different from those listed above, including specification of a 15 ms interval factor. (Comments don't allow full markup so I won't try to paste today's guidelines in here.)