Understand BLE connection intervals and events in under 5 minutes
A BLE connection interval is the time between two data transfer events (BLE connection events) between the central and the peripheral device. The theoretical value ranges from 7.5 ms to 4 secs (with increments of 1.25 ms). A few notes regarding BLE connection intervals:
- The connection is established with the interval parameter value set by the master (central) device. However, the peripheral may suggest/request different values. The master still has the final say in the values and may end up choosing values different than but closer to the requested values. However, this feature allows dynamic changes in the connection interval (and thus the throughput speed) during a connection which may address a need in larger data transfers.
- The parameter value has to be chosen with a balance of throughput and power consumption in mind. A high connection interval value (e.g. 4 seconds) will decrease power consumption but will also decrease data throughput, and vice versa.
So, if you want to increase the data throughput, you can do so by decreasing the connection interval value, but keep in mind that this will also increase power consumption. In the end, make sure you choose the highest connection interval that achieves the data throughput required by your application, and that will make sure that power consumption is the most it needs to be.
- Sometimes the BLE stack on peripheral devices allows setting a minimum and maximum connection interval. The maximum connection interval value provided by the peripheral allows the central to choose an accepted value within the range rather than choosing a value different than the minimum and possibly outside the acceptable range for the peripheral device.
It’s important to understand that multiple packets can be transferred during one connection event. Each OS/device (iOS, Android.. And their different versions etc) may have different max numbers of packets that is allowed per connection event. Smartphones also perform many tasks which means the data transfer may not occur at the calculated rate as well (the central device may be busy performing other tasks delaying the packet transfer process).
Throughput is also affected by interference in the 2.4 GHz spectrum, and if a packet (or packets) fails to transfer correctly then a retransmit will occur thus decreasing the calculated throughput.
To learn more about this and specifically the effect of this parameter on BLE data throughput I’ve found a great blog post covering this topic here.