Bluetooth Low Energy Connection Parameters for Android, iOS and Win8

bassplayer142 picture bassplayer142 · Mar 19, 2014 · Viewed 19.3k times · Source

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.

  1. Connection Interval Min
  2. Connection Interval Max
  3. Slave Latency
  4. Supervision Timeout
  5. Advertising Interval Min
  6. Advertising Interval Max

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.

  1. Connection Interval Min 30ms
  2. Connection Interval Max 56.25ms
  3. Slave Latency 3
  4. Supervision Timeout 5000ms

I've found from another stack overflow page that android allegedly works on 7.5ms Connection Interval from the following links.

  1. Android BLE Connection time interval
  2. http://processors.wiki.ti.com/index.php/Bluetooth_SensorTag?DCMP=lprf-stdroid&HQS=lprf-stdroid-pr-wiki1#Supported_Android_devices

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!

Answer

ildarM picture ildarM · Apr 2, 2014

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.