GET IN TOUCH

Bluetooth Mesh Network Tutorial: Technology Guide, Implementation, and Examples

November 25, 2019

Bluetooth Mesh Network Tutorial: Technology Guide, Implementation, and Examples

Anna Petrova

Marketing Manager

Would you like to know more about the real experience with mesh networks? We are happy to tell you about Bluetooth mesh network configuration, provide our own experience with this technology, and compare it with Zigbee and Thread. Also, this tutorial will help you get an idea of where this type of network is applicable.

As with every other relatively new piece of technology, Bluetooth mesh networking raises questions more often than it provides clarity. It is not a problem to find solid Bluetooth mesh documentation or a good explanation of how it works. 

However, when it comes to details and specifics such as, what is the real amount of data that can be transferred? What is the proven working distance between the nodes? How is traffic reduced in the network and is there in fact a way to manage this? The most common answer is “Well, I don’t know. No one has tried it yet, but theoretically...” At Integra Sources, we have tried, and have been successful. We are ready to provide a more practical guide to Bluetooth mesh networking based on our experience.

What Is A Bluetooth Mesh Network

What is a mesh network, broadly speaking? A mesh network (or simply meshnet) is a local network topology in which the infrastructure nodes (i.e. bridges, switches, and other infrastructure devices) connect directly, dynamically and non-hierarchically to as many other nodes as possible and cooperate with one another to efficiently route data from/to clients. Bluetooth low energy mesh network is a meshnet based on BLE technology.

As a new standard, the Bluetooth mesh network was established in 2017. There are still no out-of-the-box ecosystems based on this technology, unlike the more mature ZigBee that is used by Amazon, Samsung, IKEA, and many others; in addition, there are only a few cases of BLE mesh implementation that may be found online.

Basically, it is a standard for many-to-many communication, optimized for networks with a large number of nodes - mesh devices that broadcast messages. It targets the growing IoT market which continuously demands new solutions, more bandwidth, more communicating devices, and more flexible technologies.

How BLE Mesh Network Works

What differentiates Bluetooth LE mesh network from ZigBee/other forms of technology, in the first place is broadcasting messages. It can cover immense areas without any routing; it is scalable and still compatible with many devices that support Bluetooth 4.x and 5.0 standards.

Due to the publish/subscribe messaging system, devices connected to a BLE mesh network may be configured to form segments of different scale and purpose. As a consequence of this configuring, the technology is made even more flexible and manageable.

Why Use A Mesh Network?

All Bluetooth low energy networks have low power consumption (unlike “classic” Bluetooth networks), and BLE mesh is no exception. So, low energy, large areas, this clearly makes a substantial difference.

Compared to the connection-based Bluetooth network, mesh technology does not require the connection between two nodes or a configured route to be stable. Should the closest devices in the network be disconnected, the initial node continues to broadcast the packet with no issue, and eventually, it reaches the recipient, with just a few seconds delay. Most of the standard implementations provide no guarantee of this. However, the mesh network is different, it reconfigures itself; it is flexible – which is sometimes more important than a guaranteed speed and shorter delays.

Nodes in a Bluetooth mesh network may change their position without breaking the whole network structure and could lose some transferred data. Thus, it is possible that they might become part of an object constantly or periodically moving within the network perimeter.

Bluetooth Mesh Networks Examples

Standard Bluetooth mesh networks work with very limited amounts of data transferred. A home automation system can be a good example of a BLE mesh network. It is often used to control the light and /or the temperature in buildings. The technology was originally intended to be used in this manner. The nodes configuration can be saved as a setting (model) – enabling an operator to change the parameters of the whole network or a segment in a second. Therefore, BLE mesh is used to monitor and accumulate data that does not require any emergent reaction and may be sent in small packets - like telemetry.

One of the non-standard commercial projects based on Bluetooth mesh and realized by Integra Sources, is a network of Bluetooth devices for restaurants and bars. The standard BLE Mesh network realization fits the project well. We had to manage some compatibility issues: devices using different Bluetooth protocols, and the system backend created for Bluetooth 4.x.

BLE nodes for restaurant mesh network project
BLE node cubes for restaurant mesh network project

The devices in this network (very stylish cubes) are located on the tables with NFC tags but are not tied to them: they can be relocated in any order as the network is absolutely flexible. They are used to call a waiter, ask for the check, they also inform the waiting staff how long the guest has been kept waiting and the devices work as a table lamp.

The staff receive the data from the cubes using iOS smartphones and tablets that connect to the closest Bluetooth device so it becomes a gateway. This connection, however, does not affect the whole network configuration. Data accumulated from the devices generate the comprehensive statistics that can be used for staff optimization and improving the quality of service in the restaurants.

Since nodes can be placed arbitrarily, completely different Bluetooth mesh network configurations are possible. On the schemes below you can see just some of the situations.

Bluetooth Mesh Topology Sample #1
Restaurant mesh network - topology sample #1
Bluetooth Mesh Topology Sample #2
Restaurant mesh network - topology sample #2
Restaurant mesh network - topology sample #3
Restaurant mesh network - topology sample #3

This network is automatically configured with the algorithms we had to find over the course of several experiments performed on about 100 Bluetooth nodes. In the restaurants, the cubes are constantly relocated, some of them may be off, they may be used in facilities with several rooms, and the human factor has a constant effect on the physical topology of the network. Integra Sources had to spend several hundred hours creating methods and rules for the graph to be built and rebuilt in real time. That was very worthwhile - now the system is reliable and flexible at the same time. Using our deep experience in mesh networks, we can develop the required mesh architecture and build a BLE mesh network of diverse complexity for your system.

Challenges and Pitfalls of Bluetooth Mesh Network Setup

As long as there is no routing, the total number of nodes and data transfer operations between them decreases the mesh network performance. The nodes broadcast all data they receive from the beacons - and receive all the packets - and rebroadcast them, and so on. Even with a low message TTL, it is easy to imagine the broadcast storm that could be generated by a 1000-node mesh network in its standard implementation. The delays and latency only grow with the number of nodes and the number of packets sent between them. The technology allows more than 30 thousand devices to be connected, but in our experience, even a mere hundred of them can create the amount of spam that could seriously threaten the whole ecosystem.

Latency over Four Hops
Latency over Four Hops (from Silicon Labs)

For the restaurant cubes project, we had to find a way to reduce the effect of this storm. Depending on the network and the node status, each node sends the packet only to a number of selected devices, and each packet has a certain TTL. This has decreased the traffic in the network but also increased the load on the nodes themselves; as a consequence we were dangerously close to their RAM limit.

In addition to this, with a maximum speed of 1 Mbit per second (in theory for Bluetooth 5.0 devices, but impossible to reach in practice) and with a packet size limited to 30 bytes, including the service data on the beacon, packet type, etc, the potential of using the Bluetooth mesh networks is still not that great yet. Although some enthusiasts have managed to transfer voice and even video - in the laboratory, over a short distance, and using only two nodes. There are still too many variables which need to be dealt with: the number of devices, the distance between them and the topology of the network, and whether it needs to reconfigure itself automatically.

Throughput for 100-Byte Payload
Throughput for 100-Byte Payload (from Silicon Labs)

One of our customers wanted to implement a mesh network for an industrial company to track employees and transport movement within a facility. However, they needed a high bandwidth and the highest reliability at the same time while transferring data for quite a long distance, about one kilometer. All the devices aside from one gateway were battery powered.

Long distance network topology
Long distance network topology

Taking this into account, we were unable to guarantee reliable data delivery and high throughput by implementing a BLE mesh. As a consequence, we recommended using non-mesh Bluetooth network technology that would not cause a broadcast storm. A direct connection between the neighboring nodes and routing the data to the gateway proved to be more effective for guaranteed message delivery in this complicated industrial space, with a good deal of transport and equipment coursing around it, and many beacons used.

Best Chips for Bluetooth Mesh Networks

Mesh networks can be created using literally any low energy Bluetooth chip or microcontroller that supports the technology. The hardware is now produced by all the major manufacturers - Nordic Semiconductors, Texas Instruments, STMicroelectronics, Silicon Labs, and others.

The main challenge now is not choosing hardware but creating a viable network graph which is still difficult due to the lack of practical experience in commercial implementation.

BLE 5.0 Mesh Compared to Similar Technologies

For one of the projects, we have compared the main characteristics of BLE 5.0 Mesh, ZigBee, Thread, and our own Integra BLE networks. BLE mesh network had the lowest bandwidth, less than 1.5 kbit/sec for 100 bytes packet on six hops, and the largest delay (640 ms for the same packet and four hops). It has no guaranteed data delivery, unlike ZigBee or Thread.

Small Network with Moderate Payload
Small Network with Moderate Payload (from Silicon Labs)

However, for a mesh network, one will need no routers, and the security of the technology is high. So for a low amount of data that does not require fast and guaranteed delivery it might be a very good option.

Bluetooth LE transceivers are generally cheaper than their analogs for the other technologies. As Bluetooth is widely supported by consumer electronics (smartphones, tablets, etc.), Bluetooth networks are easily integrated into the existing environment. These two factors make the implementation costs lower; the prototyping and obtaining an MVP could be performed faster. But, not always for every single project.

Note that for all wireless technologies, the distance between the devices can be crucial. If you build a mesh network based on Bluetooth 5.0, for the guaranteed packet delivery, proper bandwidth and the network flexibility, you may require more than a minimal calculated number of devices. In case of one or several nodes being down, if the distance between network segments is too big, the network will be unable to deliver the information, though in each of the new segments all the nodes will continue broadcasting.

Conclusion: Yes or No for BLE Mesh?

With the Bluetooth network projects realized, we have completed all the necessary types of tasks: creating firmware for the nodes and the gateway, providing a gateway developed by the Integra Sources team, creating a Bluetooth mesh network topology and optimizing it and making it compatible with the existing devices and system. So if you need a low power wireless system with scalable connectivity and secure data transfer, we will create a BLE mesh network for your particular project.

Our experience proves that Bluetooth mesh networks technology is perspective, especially for the Internet of Things solutions, though it is far from universal. Its scope of use is limited and even if it fits the company needs the system requires a fine setup and much experimentation and tests. If you have doubts about using BLE mesh technology for your product, we`ll be happy to get details and give our professional advice.

Share this article

We use cookies to improve your experience on our website. Our Cookies Policy explains what cookies are, how we use cookies and how third-parties we may partner with may use cookies. Please find more information here.