Bluetooth Low Energy Connection Parameters for Android, iOS and Win8

前端 未结 3 1989
后悔当初
后悔当初 2020-12-23 23:02

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 (Bluet

3条回答
  •  臣服心动
    2020-12-23 23:22

    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.

提交回复
热议问题