PROSJEKTER
Del artikkel
Skrevet av: Markus Rud (Senior Development Engineer) og Niklas Strømsnes (Development Engineer)
PROSJEKTER
Del artikkel
Skrevet av: Markus Rud (Senior Development Engineer) og Niklas Strømsnes (Development Engineer)
After making the Bluetooth-name almost synonymous with wireless communication, it might not come as a surprise that the Bluetooth Special Interest Group (SIG) want to join in on the Internet of Things (IoT) adventure. After all, IoT is at its core all about electronic devices talking to each other wirelessly with great flexibility and possibilities.
The first classic Bluetooth devices were released in 1999, enabling simple, secure and efficient connections between everything like telephones, earpieces, speakers and more. Fast forward around ten years, when the need for battery-driven devices had started to increase, they released Bluetooth Low Energy (BLE) as a part of Bluetooth 4.0. Building on the foundation of BLE, the third and latest protocol from the SIG was released in 2017: Bluetooth Mesh.
In contrast to the one-to-one communication in the classical Bluetooth devices and the added one-to-many broadcasting in BLE, Bluetooth Mesh provides many-to-many communication between potentially thousands of devices. Built with security in mind, it allows for effectively designing systems with strict power budgets, easy deployment and scalable performance [1].
For this article, we will focus on giving a general introduction to the Bluetooth Mesh technology with some examples of use cases, our selection of basic functionality, and a brief comparison of existing alternatives such as Zigbee and Thread. In case this sparks your interest in learning more, please refer to the Bluetooth SIG website [2] and the technical protocol itself [3].
As mentioned, Bluetooth mesh is Bluetooth SIG’s latest protocol intended for the IoT market. But IoT is quite a generic term which can include many systems and devices, so what is Bluetooth Mesh used for these days? One of the key use-cases is wireless lighting control and sensor network solutions [4]. Bluetooth Mesh is in these implementations used for connecting devices such as light bulbs, switches and sensors together wirelessly without the need of a third-party device such as a router. The picture below shows an example of how the different devices in a home can be connected in a mesh-network and in this way interact with each other. By connecting these devices wirelessly, you can get individual control of lights, easy rearranging of switches and much more without complex wiring around the building. Lighting control is such an important feature that a special protocol on top of the Bluetooth Mesh standard is created, called Bluetooth Networked Lighting Control (NLC) [5].
Even though Bluetooth Mesh was mainly created for lighting control and IoT purposes, it can be used for a number of other applications. As further described in the next section, the functionality of Bluetooth Mesh allows for communication across many devices in a large area without the need for each device to have radio range to each other. Each device’s possibility to forward messages, or relay as it is called, gives the possibility to share data over long distances where devices are placed regularly spread out. An example of such a use case is an earlier Data Respons project on implementing a sensor system for monitoring of power cables [6]. In this case, the sensors were placed on a regularly basis along the power cable, and Bluetooth Mesh was considered as a way for them to communicate with each other and relay messages back and forth along the cable without the need for a reliable mobile network connection. Naturally, it would depend on how close the sensors are mounted and the achievable radio range in such an installation, but it is a good example of a possible use case.
One of the considerations with Bluetooth Mesh, and other IoT mesh networks in general is that they have a limited bandwidth and are therefore not intended for media streaming or applications with a large amount of data sharing. The actual number for the bandwidth or throughput is dependent on multiple factors. An upper throughput of 1 Mbps is often reported since this is a common data rate for BLE which Bluetooth Mesh is built upon. However, due to smaller packet sizes around 11 bytes and more overhead in mesh communication, the actual throughput for Bluetooth Mesh is more often in the range of a few kilobits per second [7]. But for systems with a low requirement for data transfer where it is desirable to have many-to-many communication without the need of a third-party system or a custom communication protocol, Bluetooth Mesh can give a lot of possibilities to the system.
All Bluetooth Mesh networks consist of two roles: the provisioner and the provisionee, the latter taking the role of a node when added to the network. The provisioner is responsible for sending the necessary information to a provisionee, giving it a network key and a unique address so that it can receive secure messages over the mesh. At this stage, the provisioner will also configure the node, telling it which group addresses to subscribe and publish to, and how often to publish messages. Typically, a smartphone is used to do the provisioning through GATT messages to a proxy node, since the phone in most cases won’t have the Bluetooth Mesh stack built in. After all desired devices are added to the mesh network, the provisioner can be removed without affecting further communication. In some applications, it might be desirable to have a device acting as both provisioner and node, so that it can both add new nodes and communicate with them itself.
As a node in a Bluetooth Mesh network might have multiple roles and purposes, each node can have several elements consisting of one or more models, as illustrated in the figure below. As an example, each member of a Bluetooth Mesh network needs to have a health model on its first element, giving it the facility needed to send and receive heartbeats, fault reports and diagnostics. The health model, as well as the configuration model enabling configuration as previously mentioned, are examples of standard models from the Bluetooth SIG, while developers also can add their own vendor models. This is where functionality can be implemented for lighting states, switch messages, chat messages, and anything else within the limitations of the network throughput.
One aspect of Bluetooth Mesh that sets it apart from its competitors, as we will discuss later, is that it is using a flooding-based approach for messaging. This means that while other mesh systems typically plan a route for the message from node A to node Z, Bluetooth Mesh sends its message to all nodes in its proximity. If one of the nodes receiving the message is configured as a relay node, it will retransmit the message to all nodes in its proximity. This way, the network will be flooded with messages and yield a high chance that the message is received by the nodes it was intended for.
More specifically, the Bluetooth Mesh uses a managed flooding approach to its messaging. Every message is transmitted with a maximum number of hops it will do before being laid dead – a time to live (TTL). When each node relaying the message increments a counter packed into the message, the message will have a limitation to how long it will exist in the network. Using information about how many hops messages have done before reaching their destination, the TTL and relay functionality of nodes can be set during runtime to optimize the communication.
As a closure of the basic functionality, nodes may be assigned one of the two roles: low power node (LPN) or friend node. IoT devices often have strict requirements for power usage, as many applications would have batteries as the only source of power. In this case, a node can be configured as an LPN, only waking up from sleep to send or receive messages. To make sure that the LPN gets messages sent to it while it was asleep, a nearby node can be configured as a friend node that temporarily stores messages for the LPN.
One of the exciting things about working with technology this fresh, is that new features are added all the time. While the first version of the Bluetooth Mesh Profile was released by the Bluetooth SIG in 2017, a major update to the specifications came as recently as September 2023 [8]. Now renamed the Bluetooth Mesh Protocol, the updated version features a set of new functionalities and enhancements.
A highly practical improvement is the introduction of remote provisioning. While the provisionee previously had to be within the radio range of the provisioner for the provisioning process, provisioning packages can now be transported through already provisioned nodes. This means a person provisioning devices through a smartphone doesn’t have to move around a large building to get all nodes connected, or even better, the entire process can be done from a stationary device operating as both a node and a provisioner. And the new certificate-based provisioning functionality allows for automatic authentication of remote devices making the entire process a breeze.
The list goes on for new capabilities of Bluetooth Mesh, including directed forwarding of messages, software upgrades over the mesh, subnet bridging and secure beacons. The former is perhaps of particular interest when we go on to discuss similar technologies, as the direct forwarding allows for a more efficient direction-tuned approach to relaying messages.
When developing a system with the need of a mesh network, there are naturally multiple technologies to choose from. Other technologies are for instance Zigbee, Thread and Wi-Fi Mesh, but many more exist, and they have some different use cases. Wi-Fi Mesh is the one differing most from the ones mentioned as it is typically used for a different use case even if it also is a mesh-network. Wi-Fi does have a higher bandwidth than the other technologies but is dependent on having a router, typically from a third-party, and devices connecting to it. It is also a more expensive and more power consuming technology. The other three, on the other hand, provide fully local and independent communication between each node.
Zigbee is perhaps the most established protocol for home automation systems with a lot of producers of IoT devices using this protocol. Like Bluetooth Mesh, Zigbee and Thread mesh networks also consist of devices which communicate in a many-to-many way and relay messages between the devices. The different devices can also have different roles in the networks based on their power budget. Some of their different characteristics are outlined in the following table from Silicon Labs [7].
Bluetooth Mesh | Thread | Zigbee | |
Market Focus | Lighting and Home Automation | Commercial/Industrial | Home Automation, Lighting, Metering |
Maturity | Established 2017 | Established 2015 | Established 2003 |
Application Layer | Native Mesh Model | Flexible support for IP-based application layers like Dotdot, OCF and Nest Weave | Comprehensive Zigbee Cluster Library (ZCL) |
IPv6 | No | Yes | No |
Cloud Connectivity | Smartphone (Temporary) Gateway | Border Router Gateway | Gateway |
Ecosystems | None | Nest | Amazon, IKEA, Phillips HUE, Samsung SmartThings, Lowes Iris, Wink, Cox, Rogers, Deutsch Telekom (Qivicon) and others |
Routing | Managed Flooding | Full Routing | Full Routing |
Additional Notes | Beaconing, Direct Phone Connectivity | — | Most Mature |
In addition to the differences presented in the table above, there are many more elements to consider when choosing which protocol to use, such as bandwidth, range, and radio frequency. For instance, based on the routing mechanism, Bluetooth Mesh could be more suitable for devices moving around due to its managed flooding of messages, while the more advanced routing in Zigbee may make it better to use for large networks [9]. Zigbee is currently one of the most popular communication protocols for IoT, potentially making it the preferred one if it is desirable to connect the device to other third-party IoT devices. Bluetooth Mesh, however, uses the standard BLE communication protocol, making it easier to connect to cellphones and tablets. Many microcontrollers include support for multiple communication protocols, for instance the nRF52840 chip from Nordic Semiconductors, which supports all the three mentioned protocols. So, choosing the perfect mesh protocol is difficult without the exact use-case and requirements for a system.
During its seven-year lifespan, Bluetooth Mesh has joined the club of promising standards for a growing IoT market. It includes a wide span of functionalities and possibilities for creating flexible communication systems across both large and small areas and many devices. Whether Bluetooth Mesh is the best choice for your application, like all other things, depends on your application, but it is for sure a technology to consider.
Data Respons R&D Services has gathered hands-on experience with developing and testing Bluetooth Mesh, and is continuously working to stay up to date on the rapid development of the Internet of Things.
[1] https://www.bluetooth.com/learn-about-bluetooth/feature-enhancements/mesh/
[2] https://www.bluetooth.com/
[3] https://www.bluetooth.com/specifications/specs/mesh-protocol/
[4] https://www.bluetooth.com/learn-about-bluetooth/feature-enhancements/mesh/mesh-faq/
[5] https://www.nordicsemi.com/Products/Wireless/Bluetooth-mesh/what-is-bluetooth-mesh-and-nlc
[6] https://rd-datarespons.no/no/heimdall-power/
[7] https://www.silabs.com/wireless/multiprotocol/mesh-performance
[8] https://www.bluetooth.com/mesh-feature-enhancements-summary/
[9] https://www.linkedin.com/pulse/how-choose-between-zigbee-ble-mesh-your-iot-rahul-yadav/
R&D Manager