How do BLE Adverts Happen at the Baseband Level?
Published on February 12, 2015
The next few years will be an exciting and innovative time for wireless. The long awaited Internet of Things (IoT) is driving wireless adoption around the globe. BI Intelligence, Business Insider's research service, forecasts that as many as 23.3 billion IoT devices will be connected by 2019. Wireless technologies like Bluetooth Low Energy (BLE) and Wi-Fi have become key enablers for the IoT, laying the foundation for wireless communication. As such, it is important to have a sound understanding of the technology.
Mahendra Tailor, Senior Staff Engineer at Laird and creator of the smartBASIC programming language, thought it would be useful and interesting for readers to better understand how BLE adverts happen at the baseband level.
During a BLE connection, one end advertises (peripheral role) and scanners (central role) receive those advertisements. The 2.4GHz ISM band is 80MHz wide and for BLE that is split into 40 channels, each 2 MHz wide. Three of those channels are dedicated for advertisements (at 2402, 2426 and 2480 MHz), which are chosen to coexist with Wi-Fi access point channels.
For each advert event, the same packet is sent three times; one in each channel, spaced so that all three happen within no more than 20ms, think “beep... beep... beep”. Hence, at the advertiser the frequency will hop 3 times within approximately 20ms so that no matter which channel a scanner is listening on it will hear an advert.
At the scanner end, the frequency also has to hop but at much slower rate, otherwise the probability of coincidence is going to be low (note that the scanner has to be listening on same frequency as the transmitter). So, it makes sense that at the scanner it will tune to a frequency and remain there for hundreds of milliseconds (or at least the interval at which the advertiser is sending out adverts) so at least one of the transmitted adverts comes through.
For example, imagine you have a torch with a red/ blue/ green LED and 3 push switches – one for each LED. An advert means you push each button in sequence (say half a second apart) so that you see a red, blue, green pulse of light and you do that every 5 seconds (which is your interval). At the scanner, imagine you are wearing glasses with color filters so that only one of those colors get through to your eyes. If the filter is blue+green, then only one pulse will come through for each three push sequences at the other end, and you would need to keep the blue+green filter for at least 5 seconds to have 100% probability that you will see at least one pulse. Therefore it is a probability game. At the scanner end, the “scan_window” should be longer than the advert interval to guarantee that an advert will be picked up.
Now put that in the context of locationing where there are multiple scanners. Given the scanners are not synchronized as to which ‘color filter glasses’ they are wearing, although all scanners will receive adverts, it is not guaranteed that all will receive on the same channel. That is a contributor to the volatility of rssi reported with each advert as different channels will have different fading effects at the same distance separation. This all means that when trying to get as many adverts as possible, it helps to tweak the parameters. For example, as an absolute requirement the scan window should be greater than the advertising interval. On Laird’s BL620 and BT900 you change the window using BleScanConfig() and at the advertising end the function to start adverts takes an interval parameter.
For additional technical blog posts, industry news, product updates and more, subscribe to Laird’s Wireless Connectivity Blog.