Comprehensive BLE training

BLE Connections: Setup, Parameters and Power Consumption

Go from Advertising to Connection Established and understand the effect of Connection Interval, Peripheral Latency and Supervision Timeout on speed and battery.

Contents
Actual photo of nRF51822 based mKIT board; Old example of BLE hardware, not the nRF52840 or Sniffer introduced in the text.
Actual photo of nRF51822 based mKIT board; Old example of BLE hardware, not the nRF52840 or Sniffer introduced in the text. Photo: Ordercrazy; Wikimedia Commons resource; CC0. The content of the photo has not changed; A Wikimedia preview image is used. This is not a documentary photo of the LCENJ experiment.
Step 6 of 20 ways to master BLE

A BLE connection is not a constant stream of data; It is a series of short appointments between Central and Peripheral. Getting these settings right makes the difference between a responsive product and one with a weak battery.

Connection path

Peripheral sends Connectable advertisement, Central sees it in Scan and sends connection request with initial parameters. Both parties then enter the first Connection Event at the agreed time and channel. If the timing or Access Address is not correct, the connection will not actually be established.

Connection Interval

Interval is the start interval of two consecutive Connection Events. A short distance gives a faster response and more time to send, but the radio wakes up earlier. The long distance reduces the average consumption, but the command and Notify delay increases. The appropriate value should be derived from the application requirement and measured on the hardware.

Peripheral Latency and Timeout

Peripheral Latency allows the peripheral device to reject multiple events if there is no data. Supervision Timeout is the maximum acceptable silence before announcing disconnection. Timeout must be compatible with Interval and Latency; A very small amount of false outages and a very large amount of late detection will cause failure.

Connection Event and consumption

In each event, two radios wake up on the specified channel, exchange packets and sleep again. Packet count, time on air, PHY and Retransmission determine energy. An oscilloscope or Power Profiler displays current pulses and is the best tool for comparing settings.

Start setting for the sensor

For a thermometer that updates every second, start at the middle Interval, leave the Latency low, and choose a Timeout several times larger. Then measure user command, notify rate and average flow. For the real product, choose the final number by testing in the presence of Wi-Fi.

A numerical example for Interval, Latency and Timeout

For a normal connection without Connection Subrating, suppose the maximum Interval is equal to 30 milliseconds and the Peripheral Latency is equal to 4. The peripheral device can reject four events in the allowed condition; The listening interval can reach 30 x 5 = 150 milliseconds.

timeout > 2 * (latency + 1) * max_interval
1000 ms > 2 * 5 * 30 ms = 300 ms

Timeout of one second is consistent in this sense, but this calculation does not guarantee application delay or optimal battery selection. Other conditions and restrictions of the host must also be observed.

A common base interval starts at 7.5 ms in 1.25 ms increments; Do not apply this to all versions. Bluetooth Core 6.2 has introduced Shorter Connection Intervals, which can reach up to 375 microseconds in the necessary support and negotiation mode. This feature is not automatically added to ESP32 or old phone.

Official reference for SCI feature in Core 6.2

Question and answer article

Ask your technical question

Questions and answers are published after moderation. Authors can see their own pending drafts.

No confirmed questions have been registered for this article yet.