Test: Bluetooth Low Energy (advertising, GATT and the coin cell)
Bluetooth Low Energy: Advertising, GATT and the Coin Cell
Advertising: shouting into three channels
Node 1 is now a XIAO nRF52840 on a coin cell: no Wi-Fi, no broker, just a 2.4 GHz radio that is off almost all the time. To be found, it advertises: every advertising interval it wakes, sends a short packet on channel 37, then 38, then 39, and goes back to sleep. Those three channels sit in the gaps between Wi-Fi channels 1, 6 and 11. A random 0 to 10 ms is added to each interval so two devices cannot stay in step. A phone scans by listening on one channel for a scan window, every scan interval, moving to the next channel each time. Discovery happens when a packet lands inside a window on the right channel. The waterfall shows frequency against time; the trace below is node 1’s current.
Challenge: Find settings where the phone takes more than 5 s on average to find node 1.
The advertiser
Every advertising interval, plus 0 to 10 ms at random: one packet on 37, then 38, then 39, then sleep.
interval 100 ms
The scanner
Listens on one advertising channel for a window, once per scan interval, moving 37 → 38 → 39.
100 ms in every 100 ms
Discovery
Happens when a packet lands inside a window on the same channel. Both duty cycles decide how long that takes.
-
Node 1 · XIAO nRF52840 · F4:12:FA:3B:9C:21
advertising every 100 ms · 0 dBm
Phone · central
not scanning
Average to find (200 tries)
0.05 s
9 in 10 within
0.09 s
Worst
0.10 s
The three averages come from 200 simulated attempts with the scanner starting at a random moment. Phones choose their own scan settings: a foreground app gets near-continuous scanning, a background one much less, so a device a user is looking at in an app is found far faster. The advertising channels sit beside Wi-Fi channels 1, 6 and 11 rather than on top of them, so Wi-Fi traffic barely touches advertising (channel 37 is closest to Wi-Fi 1).
Radio log, newest first
Nothing on the wire yet.
© 2026 Derek Molloy, Dublin City University. All rights reserved.
Spot an error, omission, or have a suggestion?
Submit an errata report here.