Date: October 26, 2017
After a few years of being "around the corner" Bluetooth Mesh is finally here. Several product designers and developers have made their own meshes based on Bluetooth LE in the long wait for a standard (indeed we have also developed our own). However, we no longer need to rely on custom requirements. The new specification aims to be another contender in the Smart Home and Industrial Automation IoT markets, which are currently dominated by a plethora of other protocols (e.g. ZigBee, Z-Wave, WiFi, Thread). Shortly after its release earlier this year major players in the Bluetooth Special Interest Group (Bluetooth SIG) had software ready to go. With all the hype we are sure that the mesh will be implemented across various industries and applications. But what exactly is this new mesh, and why would you want it implemented in your products over other wireless protocols?
Traditional communication is often point to point, whether it be a direct connection from your phone to a wireless headset, or a more complex connection from your laptop to a server which runs through various routers, switches, and adapters. Data often travels through a set route that is determined by central controllers and gateways in the network. Mesh networks tend to move away from the dedicated router approach. Devices themselves are allowed to act as relays of information. When data needs to travel between points in a network, the data will move through other untargeted devices to get to the final destination. This is the world of IoT. Below is a diagram of a mesh network when compared with a more traditional point to point system:
Figure 1. A very simplistic view of a mesh system compared to a more standard point to point protocol. In the mesh nodes will re-transmit data to other nodes that are further away.
Figure 2. Point to point, or point to multi-point systems will often just be a one to one or one to many connection, such as a connection from your wireless mouse, keyboard, or headset to a central laptop.
The Bluetooth Mesh implements a new form of mesh protocol, and it does it well through existing Bluetooth LE hardware. This means it's very likely your Smart Phone will implement some aspects of the new mesh in the near future. You'll likely be able to connect to your Bluetooth Smart Home devices without the need for a central hub. However, from a more technical point of view, this means implementing a Bluetooth Mesh has a fair bit of complexity attached when it comes to laying out a network. With IoT also comes the concern of security which is handled much like the traditional Bluetooth security features that we're used to with "authentication" and "pairing" protocols, among new "provisioning" protocols.
If you're just curious about the new technology and how it fits into the IoT landscape, skip ahead to the "Comparison with Alternative Technologies" section. However, for the more technical readers we'll now get to the nuts and bolts of the mesh, where we'll take a slightly more in depth look at 1. The mesh topology in general, 2. The communication protocol between nodes, and 3. Some of the security features in place.
The Bluetooth Mesh is a flood mesh. When a message is transmitted across the network, all devices (nodes) that are configured as relays will re-transmit the message. A message will only have a limited number of "hops", or re-transmissions, before it stops. This extends the range of Bluetooth LE to incredible distances, where the specification gives a theoretical limit of up to 127 hops, otherwise known as a message's Time To Live (TTL). The network can be described by the following diagram:
*Figure 2. An example Bluetooth Mesh network topology. It is fairly complex, with various features that could be supported, or not supported by any one node.
Every node can send or receive messages across the mesh, but there are also additional mesh related features that a node could support. The four features are:
Proxy nodes include a standard Bluetooth LE GATT service with two Proxy Data attributes. A Smart Phone could connect to any Proxy node to transmit messages to the rest of the network through these attributes via a "Proxy Protocol".
Low-power nodes require friend nodes in the mesh. A "friendship" is negotiated when a friend node sees a friendship request being advertised by a low power node on the network. If a friendship is established a friend will hold messages for the low power node until it asks for them. This allows a low-power node to turn off its receiver a majority of the time and achieve very low power consumption. However, other nodes on the network are expected to receive messages in real time, requiring higher power. This means they would likely require continuous external power, or much more regular battery replacement.
The mesh network moves away from the well-known GATT model for Bluetooth LE. It implements unique data structures called "elements". Every element must have one or more models, where the models determine and implement the behaviour of a node, while the states inside them define the current condition of the element.
*Figure 3. Pictorial representation of the new element model. Nodes can have multiple elements with multiple models. States within these models define the current state of a device.
E.g. A lightbulb:
- Will have a generic "lightbulb" element, but could also have temperature elements, and so on.
- The lightbulb element could have an "On/Off" model, and a "Brightness" model.
- Each of these models will have their own unique states, where the On/Off would have a boolean "on" or "off" state, whereas the brightness could have a state value of 0 to 10.
Figure 4. Example lightbulb node.
The mesh also supports composite states, where two or more values can make up a state, allowing you to define data structures. States can also be bound together by a model, where in the example above, setting a brightness could also turn on the lightbulb.
The network communicates via the same client-server architecture Bluetooth developers are used to. Devices acting as clients can read states or write messages to elements on servers. Models will determine whether there is an action taken for a given message, and whether a state change will occur. A publish-subscribe mechanism is in place, where devices can publish messages to certain addresses. If another device is subscribed to messages on that address, it will receive the message. These messages are allowed to be either acknowledged or unacknowledged.
The mesh network communicates via two different messages.
For addressing of messages, there are a few options in place.
Previous to setup, elements will generally have unassigned addresses. Elements with an unassigned address are banned from communicating with the network. When a mesh connection is established, a provisioner will assign appropriate addresses (see the next section for a brief overview of provisioning).
Devices can be added to or removed from a mesh via a new process called "provisioning." Devices that can be added to a mesh will act as beacons and advertise their intent to join a network. Nodes acting as provisioners will scan for these beacons and extend an invite to the network. A pairing process similar to standard Bluetooth LE is followed, where keys are exchanged and an authentication protocol is chosen based on the input and output capabilities of the device. The standard example is having a screen on one device display a number that is entered as a passkey on another device.
There are three types of keys present in the network, giving multiple layers of security
Overall the Bluetooth Mesh is expected to be a very secure network. In addition to the keys mentioned above which keep data private and secure from listeners, the specification also provides protection against:
Bluetooth Mesh targets the Smart Home lighting market with its first release. Much like it did for many services and characteristics in Bluetooth LE, the Bluetooth SIG has released specifications for exactly how a lightbulb, among other devices, should look and act on a mesh network. This ensures interoperability between devices, and also future-proofs products, as a lightbulb made 20 years from now will likely look like it currently does on the mesh.
However, the Smart Home market is already dominated by ZigBee and Z-Wave products. Wi-Fi products also exist, Google supports its own Thread protocol, and other lesser known protocols can also be found floating around. With all these options already in place it's somewhat difficult to see how the Bluetooth Mesh will fit in. Below is a brief overview of some of the benefits and down-sides of the various technologies
ZigBee
Pros:
Cons:
Z-Wave
Pros:
Cons:
WiFi
Pros:
Cons:
Bluetooth Mesh
Pros:
Cons:
The Bluetooth Mesh looks like it will be a solid contender in the IoT market. The protocol provides security and scalability for a range of home and industrial applications. However, the Smart Home market is already largely dominated by ZigBee and Z-wave devices, among other protocols. At a first glance, the complexity of the mesh topology can be off-putting for a new automation system, where a user would likely require some understanding of the various node features and requirements. Nevertheless, perhaps the main advantage for Bluetooth Mesh is that Bluetooth devices are already everywhere, and the mesh can be applied to existing hardware with software updates. Support for the mesh has already started, with modules and software updates already available from major players in the Bluetooth market. It should only be a matter of time until a software update comes along to allow your Smart Phone to implement and control some mesh related features. With all the hype it will be interesting to see how widely this new protocol will be adopted in new as well as existing products.
We'd be excited to hear how this new technology can be used in your Smart Home or other ideas. If you're interested in bringing your product idea to life, please do get in touch via our contact page or give us a call.