A brief discussion on Bluetooth mesh technology and its application in smart home field

A brief discussion on Bluetooth mesh technology and its application in smart home field

Part 01

Bluetooth mesh technology features

- Support many-to-many topology

Bluetooth mesh networks use a method called "network flooding" to publish and relay messages, which can realize the connection and message exchange between multiple nodes in the mesh network.

- Expanded physical area coverage

Bluetooth mesh network breaks free from the constraints that nodes can only be hung under the gateway or main router. It can also act as a relay node or friend node, support the relay and forwarding of terminal device messages, realize "relay transmission", and overcome the difficulties of WiFi technology such as message exchange and coverage of devices over long distances.

- Remove the central node dependency

Bluetooth mesh networks transmit messages without routing them through a specific route, device, or process, thus eliminating the need for a central node (e.g., gateway, master router, etc.).

- Support self-repair

If a single node in a Bluetooth mesh network fails or is abnormal and cannot communicate, it will automatically self-configure and pass or relay messages through other normally working nodes, thereby achieving self-repair of single-point failures.

Part 02

Bluetooth mesh technology principle  

The principles and design of Bluetooth mesh technology are mainly reflected in three aspects: network architecture, topology and nodes, and address division. The following will use these three aspects as entry points to analyze the principles of Bluetooth technology.

1️⃣ Bluetooth mesh technology network architecture

In the network architecture, Bluetooth mesh works on top of the BLE protocol stack, using the same physical layer and link layer.

Figure 1 Schematic diagram of the Bluetooth mesh protocol stack

From top to bottom, the Bluetooth mesh protocol stack is: Model Layer, Foundation Model Layer, Access Layer, Upper Transport Layer, Lower Transport Layer, Network Layer, Bearer Layer. The functions of each layer of the Bluetooth mesh protocol stack are: the model layer defines user scenarios/applications, the foundation model layer configures and manages mesh, the access layer defines how applications use context data, the upper transport layer encrypts and decrypts application data, the bottom transport layer segments and reassembles data, the network layer performs network management, and the bearer layer performs broadcast/GATT bearer.

2️⃣ Bluetooth mesh topology and nodes

Figure 2 Bluetooth mesh network topology

Bluetooth mesh supports many-to-many communication. Therefore, in scenarios with many devices, Bluetooth mesh is generally a mesh structure. As shown in the figure above, there are generally four types of nodes in the Bluetooth mesh network topology:

(1) Blue nodes represent ordinary terminal nodes, which cannot relay messages in the Bluetooth mesh network and directly receive and send messages from the Bluetooth mesh network;

(2) Red nodes are relay nodes, which are used to relay messages and realize long-distance transmission of network messages;

(3) Purple nodes represent friend nodes, which are used to transmit messages between low-power nodes and the network;

(4) Yellow nodes represent low-power nodes, which receive or forward messages through friend nodes. These nodes are generally low-power sensors that are battery-powered, so they have a sleep mechanism.

Bluetooth mesh technology is based on the information transmission mechanism of network flooding. Once all information is released by a node, it will be broadcast to the network instead of being transmitted to one or more nodes through routing. WiFi networks revolve around a central node (such as gateways, routers and other devices) to transmit messages up and down. All network traffic will pass through here. If the central node fails, the entire network will be shut down. Bluetooth mesh technology can effectively remove centralization and get rid of dependence on central nodes.

3️⃣ Bluetooth mesh address division

The Bluetooth mesh network layer defines four basic types of addresses: unassigned address, unicast address, virtual address, and multicast address, where the address length is 16 bits. The detailed classification of addresses is shown in the following table:

(1) Unassigned address

An unassigned address is an address of a node element that has not been configured or an unassigned address. The value of an unassigned address is 0x0000. For example, you can disable the model's message publishing by setting the model's publishing address to an unassigned address. An unassigned address must not be used for the source or destination address field of a message.

(2) Unicast address

The unicast address is a unique address assigned to each element. The value of the unicast address cannot be 0x0000, and the possible value range is 0x0001 to 0x7FFF. During the network configuration phase, the configurator will assign a unicast address to each element of the node during the life cycle of the network node. The address can be unassigned by the configurator to allow reuse.

(3) Virtual address

A virtual address represents a set of target addresses. Each virtual address logically represents a tag UUID. One or more elements can be configured to publish or subscribe to the same tag UUID. The tag UUID will not be transmitted and should be used as an additional data field for the message integrity check value in the upper transport layer. The value range of the virtual address is 0x8000 to 0xBFFF.

(4) Multicast address

Configure the address of 0 or more elements to the same address, and the address becomes the multicast address. Multicast addresses from 0xFF00 to 0xFFFF are reserved for fixed purposes, and 0XC000 to 0xFEFF are used for other purposes. Multicast addresses can only be used in the target address field of a message, and messages sent to a multicast address will be received by all model entities that subscribe to this multicast address.

Part 03

Application of Bluetooth mesh in smart home

In the smart home market, the application of Bluetooth mesh is mainly concentrated in two scenarios: networking smart home devices and managing smart home devices.

The so-called Bluetooth mesh configuration is to add devices to the network through configuration, making them part of the Bluetooth mesh network. Bluetooth mesh configuration mainly involves three roles: unprovisioned device, provisioner, and mesh node. As shown in the figure below, after the unprovisioned device goes through the five stages of beaconing, invitation, public key exchange, identity authentication, and distribution of configuration data, it can be connected to the Bluetooth mesh network to achieve message interconnection.

Figure 3 Bluetooth mesh network configuration flow chart

For the management and control of smart home devices, multiple smart home devices can be managed simultaneously through message transmission and broadcasting between nodes, and both remote control and local control are supported. Compared with the simultaneous management and control of multiple devices under the WiFi network, the Bluetooth mesh management and control method has a faster response speed and a smaller network load.

Figure 4: Control of multiple devices in a Bluetooth mesh network

As described in Part 1 to Part 3, Bluetooth mesh technology has the characteristics of supporting multi-point to multi-point connection, wide physical coverage area, and removing the dependence on central nodes. It not only meets the growing demand for interconnection and interoperability of smart home devices, but also overcomes the difficulties that existing WiFi technology cannot solve, and provides a new solution for the Internet of Things to adapt to different scenarios.

<<:  Soul-searching question: Do you fully understand TCP&UDP?

>>:  5G Capacity Expansion Benchmark Study Based on User Service Perception

Recommend

A comprehensive guide to IP addresses

IP address is a term that everyone is familiar wi...

6G brings an innovative revolution, but also hides many crises and challenges

Although 6G will not be implemented until 2030, t...

Analysis of SpringCloud Gateway routing configuration and positioning principles

[[409660]] Environment: springcloud Hoxton.SR11 T...

Five pictures to solve FTP

FTP Principle and Configuration FTP is a protocol...

5G or WiFi 6? Tips for choosing the best wireless network solution

Over the past five years, IT professionals who fo...

What functions and advantages does 5G technology bring to enterprises?

As carriers pilot fifth-generation cellular netwo...

HTTP connection management diagram

The HTTP protocol is very important to us program...