I've been looking all over the place for the required bluetooth connection parameters that will work for all three of these operating platforms. I'm using the HOGP (Bluetooth over HID GATT) profile for this project.
My project is an embedded system written by myself with a BLE module that I have control over the following parameters for connection.
My target devices to connect will be to satisfy connnections with Android >= 4.3, iOS7, and >= Win 8.1.
Apple was kind enough to give a document with the appropriate parameters on page 22 in the link below. I have not been able to find any information about Android and Win 8.
https://developer.apple.com/hardwaredrivers/bluetoothdesignguidelines.pdf
My current working settings for iOS7 tested fully with bidirection communication with freeware lightBlue is as follows. My embedded code and host software for iOS7 works.
I've found from another stack overflow page that android allegedly works on 7.5ms Connection Interval from the following links.
Unfortunately the second requirement from apple iOS spec is that "Interval Min ≥ 20 ms".
Am I not understanding these ranges or how they are interpreted? If I set the Interval min to 7.5ms for Android wouldn't that void apples requirements? How can I satisfy both systems and also Win8 if possible?
My understanding is that the slave device offers a suggested setting in between the min and max and the master (smartphone) alerts the user of the actual selected value in that range.
I appreciated any help with this issue and hope this post could benefit others considering the fairly new and incomplete knowledge base for BLE.
Thanks in advance!
First, the connection interval defines a time window during which both devices use the same frequency to transfer data. There are 37 data channels in total, and connected devices hop through them every Connection Interval.
Thus, both devices has to agree on precise values for these parameters from the beginning in order to be in sync, i.e., connected.
Second, when connection is established the master (or Central) sends connection parameters it supports. The other device (or peripheral) just blindly takes them. iOS by default sets connection interval to 30 ms. After the connection is established the peripheral can request connection parameters update, by defining the min and max values, according to the guidelines apple has provide you with. The receiving part, read iOS in this case, will pick whatever it find best for it between [min;max], and will send back response with exact values it has picked. It also can reject the request, if the values do not comply with the guidelines.
Lastly, 7.5ms is the minimum length of the connection interval defined by Bluetooth specification. The maximum value is 4 s. The lower it is, the higher bandwidth, but higher power consumption. And the opposite in the higher values. The best value depends on the specific application. Considering that you work with HID profile I assume latency is important to you.
iOS says that it supports connection intervals down to 20ms (although I found it hard to achieve this some times), but in your case (HID profile) they also allow 11.25 ms.
Hope that helps.