For an application reading a block of data (9000 bytes) from a BLE device I need to modify the connect interval to be as fast as possible.
I am running BlueZ stack 4.101 with a linux kernel = 3.14.43
Presently, I am able to do that using "hcitool lecup" after connecting the device but it means to do first "connect" then get the connection handle using "hcitool con" and finally "hcitool lecup" with min and max=6 (minimum value = 7.5 ms).
This is working fine but "hcitool lecup" takes around 600 ms after a "connect" that is taking several hundreds of ms. The connection parameters are reset when the device disconnect, meaning that this sequence has to be done on each connection.
Using BlueZ tools (hcitool and gatttool) is it possible to pass the connection parameters directly during the connect process or is it mandatory to first connect then modify connection parameters in a second step.
Many Thanks
The connection interval can range from 7.5ms up to 4s. The lowest connection interval that you could use depends on the capabilities of the device. Android devices can support a connection interval as low as 7.5 ms, whereas iOS devices can go down to 15ms.
The Connection Supervision Timeout parameter defines the time to wait for a data transfer before assuming that the connection was lost. In all Bluetooth and Bluetooth LE test suites this value is hard coded as 20 sec.
x protocol SPEC, when the iPhone/Android phone play as role of BLE central mode, the limitation to have active connection at the same time is up to 8 devices.
Min Connection Interval (*1.25 mS) Enter the minimum time that a peripheral device can take to establish a BLE connection with the central device. This value is multiplied by a factor of 1.25 milliseconds. The minimum connection interval value is 6 ( 7.5 milliseconds).
You can set the connection interval through the hci kernel filesystem interface before starting the connection:
echo 6 > /sys/kernel/debug/bluetooth/hci0/conn_min_interval
echo 20 > /sys/kernel/debug/bluetooth/hci0/conn_max_interval
(in units of 1.25ms)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With