The Bluetooth LE connection parameters are a set of values that tell the Bluetooth hardware how to maintain a GATT connection. They control how fast communication is and how much power the device needs. Most of the time they do not need to be changed, because the vendor of the remote device has already tuned them for its typical use. In some cases though — for example, to increase the data transfer rate — they do need to be adjusted.
Before Windows 11 there was no way to change them. Microsoft later added the feature, so on Windows 11 an application can change the current connection parameters of a BLE GATT link. On earlier Windows versions, the BLED112 USB Bluetooth dongle is the way to do it.
The three parameters
Connection parameters affect power consumption, data transfer speed, and stability of the connection. They are exchanged when the central and peripheral first connect. The central always sets the parameters actually used, but the peripheral can send an update request that the central can accept or reject.
Connection interval
Determines how often the central asks the peripheral for data. When the peripheral requests an update, it supplies a maximum and a minimum wanted
interval. The connection interval must be between 7.5 ms and 4 s.
The connection interval has an inverse effect on throughput:
DataThroughput = (8 * BytesPerPacket * PacketsPerInterval * 1000) / ConnectionInterval
To save power, the connection interval is often increased to a much longer value when the connection is going to be idle for a period of time.
Slave latency
With a non-zero slave latency, the peripheral can choose not to answer when the central asks for data, up to the slave latency number of times. If the peripheral has data to send, it can still send at any time. This allows a peripheral to stay asleep for a longer time when idle while remaining able to send data quickly when needed. Slave latency is one of the main levers for reducing power consumption in the peripheral.
Supervision timeout
Determines the timeout from the last data exchange until a link is considered lost. The central will not try to reconnect before the timeout has passed. If a device goes in and out of range often and the application needs to detect that quickly, a short timeout makes sense.
Effective connection interval
The effective connection interval is the amount of time between two connection events, assuming the slave skips the maximum number
of events allowed by slave latency. If slave latency is 0, the effective interval is equal to the actual connection interval.
Slave latency is the maximum number of events that can be skipped, from 0 to 499. The resulting effective connection
interval must not exceed 16 s. The formula is:
Effective Connection Interval = Connection Interval * (1 + Slave Latency)
Example: with a connection interval of 80 (100 ms) and a slave latency of 4, the effective connection interval is
100 ms * (1 + 4) = 500 ms. When no data is being sent from the slave to the master, the slave transmits once every 500 ms.
Trade-offs
In many applications, the slave skips the maximum number of events. The effective connection interval is what matters when selecting or requesting parameters. Each direction has its own effect.
Reducing the connection interval
- Increases power consumption for both devices.
- Increases throughput in both directions.
- Reduces the time for sending data in either direction.
Increasing the connection interval
- Reduces power consumption for both devices.
- Reduces throughput in both directions.
- Increases the time for sending data in either direction.
Reducing slave latency (or setting it to zero)
- Increases power consumption for the peripheral device.
- Reduces the time for the peripheral device to receive data sent from the central.
Increasing slave latency
- Reduces power consumption for the peripheral when it has no data to send.
- Increases the time for the peripheral device to receive data sent from the central.
Setting connection parameters
If an application uses the standard Microsoft UWP Bluetooth LE API and runs on Windows 11, it can set predefined connection parameters through that API. The predefined sets are:
- Balanced — a set that offers a balance between throughput and power usage.
- Power Optimized — a more power-efficient set, optimized for power at the expense of throughput. Also allows more simultaneous connections to other Bluetooth devices.
- Throughput Optimized — a more aggressive set, optimized for faster throughput at the expense of power. Also reduces the number of simultaneous connections that can be made to other Bluetooth devices.
There are two problems with the UWP API: it is available only on Windows 11, and it does not allow custom values. The Bluetooth Framework removes both. It allows changing Bluetooth LE connection parameters on any Windows version with the BLED112 dongle, and it allows custom values on any supported platform. The framework also provides a method to read the currently used connection parameters and an event that fires when they change.
The GattClient sample application from the Bluetooth Framework package demonstrates how to set
predefined or custom connection parameters.
Frequently asked questions
- What are Bluetooth LE connection parameters?
- They are the connection interval, slave latency, and connection supervision timeout. Together they control power consumption, data throughput, and connection stability.
- How can I change BLE connection parameters on Windows?
- On Windows 11 the Microsoft UWP API provides predefined settings. For custom values or older Windows versions, the Bluetooth Framework allows full control and also works with the BLED112 dongle.
- What is the effective connection interval?
- It is the actual interval between connection events when slave latency is applied. Formula:
Effective Connection Interval = Connection Interval * (1 + Slave Latency).