connection interval for BLE on Galaxy S3 Android 4.3

我是研究僧i 提交于 2020-01-15 08:41:05

问题


when I send data from my perifpheral ( CC2541 ) to my GalaxyS3 ( Android 4.3 ) I see that regardless of the connection interval that I set in the peripheral ( 7.5msec ) I get packets sent at intervals of ~100msec.

That is really poor data rate.

Any advice of how I can speed things up?

( I already turned off the WiFi )

Thanks


回答1:


As you might already know, there's no way to configure the connection interval from Android BLE API, thus, the only way left is to set it from the peripheral device. Your peripheral should negotiate the best connection interval for it depending on the device bluetooth hardware and its bluetooth stack.

According to Bluetooth Low Energy specs, the connection interval determines the time between the start of the data packet exchange sequence called connection events, and it can be from 7.5 ms to 4 seconds. This value is closely linked with the power consumption, being higher the consumption when the value is smaller.

The peripheral should negotiate the connection interval proposing a minimum and maximum values for it. If the device rejects that connection interval, your peripheral should try another value until it reaches the optimum one for the link.

The case of the Samsung Galaxy S3 is one of those who need a higher connection interval. In one of my tests, I achieved to negotiate a connection interval of ~20ms in a Nexus 5 device but when the same test was performed into the S3, it rejected those small values and set one of ~48ms.

For example in iOS, in their Bluetooth design guidelines document they suggest to use a minimum connection interval value of 20ms. So as I said before, the work is in hands of the peripheral trying to get the best value.




回答2:


As per my knowledge, you have to negotiate the connection interval(connInterval) using link layer control packet LL_CONNECTION_UPDATE_REQ. As per the specs, the connection interval is limited between 7.5ms to 4000ms.



来源:https://stackoverflow.com/questions/21916951/connection-interval-for-ble-on-galaxy-s3-android-4-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!