BLE Connection Establishment Workbench

BLE Connection Establishment Workbench

animation
bluetooth
ble
protocols

BLE Connection Establishment Workbench

Advertising to scheduled meetings

Play silently with captions on provisional timing; narration audio is pending. These are schematic teaching states, not measured protocol or elapsed lifecycle time. Choose Reduced motion for a complete still at each beat. Explanations beyond the model remain in captions.

Full transcript — ble-connection (8 beats)

B1 — Cold-room commissioning
You are commissioning a cold-room sensor with a phone before it joins the building gateway. The phone must connect while the sensor is still in setup mode. Getting connected in time matters, and so does saving energy when the sensor is quiet.

Model caption: Commission the cold-room sensor before setup mode ends; quiet operation also needs energy savings.

B2 — Advertising and scanning
Bluetooth Low Energy discovery starts with advertising and scanning. An advertisement is a short radio message saying a device is present. For our example, the sensor is the peripheral, offering a connection. The phone is the central, scanning for the advertisement and deciding when to request that connection.

Model caption: The sensor advertises; the phone scans and decides when to request a connection.

B3 — Scheduled connection
When the request is accepted, the devices move into a scheduled connection. The connection interval is the spacing between connection events, when the radios meet to communicate. The central starts each event. Longer gaps can save energy, with slower interaction as the tradeoff.

Model caption: Accepted request → scheduled connection events. Longer intervals can save energy and slow interaction.

B4 — Periodic sensor settings
For a worked example, use the model's periodic sensor settings. The connection interval is one hundred milliseconds. Peripheral latency is four, allowing the sensor to skip four connection events when it has no data. The supervision timeout is six seconds.

Model caption: Interval: 100 ms. Idle events allowed to be skipped: 4. Supervision timeout: 6 s.

B5 — Timing threshold
The model relates those settings with a timing calculation. Start by adding one to the latency of four, giving five. Double five to get ten. Multiply ten by the hundred-millisecond interval to get one thousand milliseconds, which is one second.

Model caption: 1 + 4 = 5; 2 × 5 = 10; 10 × 100 ms = 1000 ms = 1 s.

B6 — Supervision margin
The timeout must be greater than that one second. Our six-second setting passes. Subtract one second from six seconds and the model gives five seconds of margin. That margin describes how far the setting exceeds the calculated threshold.

Model caption: 6 s > 1 s. Margin: 6 s − 1 s = 5 s.

B7 — Idle skips are bounded
The misconception is that permission to skip events lets the sensor stay silent indefinitely. Peripheral latency permits idle skips, but supervision still applies. If the supervision timer expires, the connection is considered lost. For your sensor, saving wakeups still has to fit the connection's timing rules.

Model caption: Idle skipping remains subject to supervision. If the supervision timer expires, the link is lost.

B8 — Respect the timeout
Advertising finds a possible partner; a connection schedules meetings, and saving wakeups still means respecting the timeout.

Model caption: Advertising finds a possible partner; a connection schedules meetings, and saving wakeups still means respecting the timeout.

Try the setup with the door open and shut. Turn phone radio access off, then on. Choose the wrong device once. Cancel pairing once. Let the setup time out. At each fault, the app should say what failed and give a safe next step.

After setup, restart the phone and sensor. Move out of range and return. Remove an old trust record. The product should reconnect when it is safe or ask for trust again when it is not. Keep a log that shows which boundary passed.

End the test by removing access. The old phone should not keep control after the product says it was removed.

Back to the chapter