We sometimes get asked if it’s possible to send custom advertising. All Bluetooth advertising is based on Bluetooth standards and our post on the Cheat Sheet shows some examples such as iBeacon and Eddystone.
The first question is why you might want to send your own advertising. Using the iBeacon or Eddystone protocol is sufficient in the majority of cases where you just want to a unique id at the Bluetooth LE receiver (usually but not always an app or gateway). The most common case of custom advertising is sensor beacons that need to send their own sensor data.
Nevertheless, some projects use custom advertising that signifies something extra other than a unique id. This is project specific and might, for example, indicate something about location, asset or person. Very few beacons support custom advertising without full re-programming (as opposed to setup). Re-programming involves replacing the SoC firmware and is a significant undertaking. Some of the MeeBlue beacons support setup of a custom channel that can contain any data.
There’s a growing number of operating systems for microcontrollers on single board computers, most of which can scan for Bluetooth LE devices such as beacons and connect to them via GATT for setup and extraction of data. Zerynth is now one such OS that you can program using Python. Zerynth r2.2.0 update allows use of Bluetooth LE.
Nordic, the manufacturer of the System on a Chip (SoC) in many beacons, has a latest issue of Wireless Q Magazine. It showcases the many uses of Nordic SoCs.
Haltian has a useful IoT protocols comparison. It provides a comparison of TE Cat 1, LTE Cat M1, EC-GSM-IoT, NB-Io, Zigbee, SigFox, LoRa, Google Thread, Bluetooth LE and Wirepas Mesh.
Haltian say “It’s is a question of selecting the best-suited option for each use-case at hand”. One thing they don’t say is that the protocols are not mutually exclusive. For example, it’s increasingly the case that more than one protocol is used, one for short on-site distances and another for intra-site communication. WiFi/Ethernet also aren’t mentioned which are often a component of IoT solutions.
Bluetooth LE works at 2.4GHz, the same frequency used for WiFi and microwave ovens! There are two main types of Bluetooth LE transmission: advertising where the device only sends out data and connection-orientated using Generic Attributes (GATT) .
Bluetooth LE uses frequency hopping for increased reliability when there might be noise on a particular channel. When advertising, it uses channels 37, 37 and 39. If subsequently connected, it uses other channels:
When only advertising, the transmission is very short of the order of 1 or 2 milliseconds. In between advertising, there is no transmission which is one of the main reasons why Bluetooth LE has very low power use:
The paper explains how the Bluetooth Mesh Standard came about to address the problem of the variety of BLE meshing solutions that were not interoperable. It includes a great introduction to Bluetooth LE and Mesh with some statistical and experimental insights into mesh performance.
The authors explain how the choice of the use of advertising advertising at 100% duty cycle for lower end-to-end delay has degraded the low energy advantage of BLE advertising thus limiting the usefulness in power (battery) sensitive applications.
The paper contains some useful insights:
The back off mechanism, used to decrease the chance of mesh network collisions, contributes most to the communication delay. However, as they identify, it’s this mechanism that provides reliability and scalability in larger networks. Disabling the backoff mechanism decreases the delay but makes the network less scaleable and robust.
Making the network more dense, has a positive effect on the round trip time (RTT). However too a dense network leads to more collisions.
Increasing the number of hops needed, making the network more sparse, has a negative effect on the RTT.
“It is clear that there are a lot of factors influencing the communication flows within a Bluetooth Mesh network, requiring more advanced management mechanism for optimizing the performance of the mesh network.”
However, the research had some limitations. Noise was simulated by introducing non-mesh beacons advertising every 20ms. This wasn’t very realistic given that most beacons advertise in the range 100ms to 1000ms. Re-transmit time was considered that complicated calculations – especially as re-transmit is application specific. It wasn’t mentioned that in many mesh sensing applications, unacknowledged messages are acceptable such that there’s no re-transmit. Also, the affect of other mesh network traffic, on the round trip time, wasn’t considered – only one mesh transmission at a time was considered.
The Wiki includes information about Bluetooth LE idioms such as advertising, MAC address, Bluetooth name, GATT, transmit power, measured power, range, RSSI, mesh and the new direction finding feature. It also has links to hardware and programming information.
There’s a recent story at LA Times on how Newport Beach will monitor drivers’ Bluetooth data to analyze traffic, congestion.
It’s a traffic monitoring system that receives signals from Bluetooth-enabled equipment such as cellphones and in-car hands-free devices, building a real-time picture of motorists’ routes and travel times.
This is a simple example of a real time locating system using Bluetooth devices that are already out there as opposed to, more focused, Bluetooth beacons that are specifically being tracked.
Mouser has a free ezine called ‘Methods’ (pdf) that has in-depth articles on the latest advances in Bluetooth.
Steven Hegenderfer, Director of Developer Programs at Bluetooth SIG explains how Bluetooth 5 will enable design engineers to pioneer innovative solutions. Steven Keeping shows how Bluetooth has evolved and Barry Manz explains Bluetooth Mesh Networking and beacons.
If you take a look at the recently announced Bluetooth SIG mesh, it’s described by three specifications with around 1000 pages! It took three years to create. So what’s the rationale that caused it to be so complex?
For some answers, take a look at Szymon Slupik’s personal blog. Szymon is the Chair Mesh Working Group at Bluetooth SIG and his posts give a fascinating insight into the thinking behind the Bluetooth SIG mesh.