Basic concept and development prospect of Bluetooth Mesh protocol

2022.11.29

Basic concept and development prospect of Bluetooth Mesh protocol


Mesh network is an independently developed network technology that can use Bluetooth devices as signal relay stations to cover a very large physical area and is compatible with Bluetooth 4 and 5 series protocols. Traditional Bluetooth connections are achieved through the "pairing" of one device to another, establishing a "one-to-one" or "one-to-many" micro-network relationship. The Mesh network enables devices to achieve a "many-to-many" relationship. This article will introduce the Bluetooth Mesh protocol starting from the history of Bluetooth, the development prospect of Mesh and the basic concepts.

Each device node in the Mesh network can send and receive information. As long as a device is connected to the gateway, the information can be relayed between nodes, allowing the message to be transmitted to a location farther than the normal transmission distance of radio waves. In this way, Mesh networks can be distributed in manufacturing plants, office buildings, shopping malls, business parks, and wider scenarios, providing a more stable control solution for lighting equipment, industrial automation equipment, security cameras, smoke detectors, and environmental sensors.

Part 01. Development history

Bluetooth technology began as a project created by Ericsson in 1994 to research low-power, low-cost wireless communication links between mobile phones and other accessories. The inventor hopes to create a set of unified rules (standardized protocol) for wireless communication between devices to solve the communication problem of incompatible mobile electronic devices between users, and to replace the RS-232 serial communication standard.

On May 20, 1998, Ericsson joined forces with five well-known manufacturers including IBM, Intel, Nokia and Toshiba to establish the Special Interest Group (SIG), the predecessor of the Bluetooth SIG, with the goal of developing a low-cost, Bluetooth technology standard with high efficiency and free wireless connection within a short range. Bluetooth launched the 0.7 specification that year, supporting two parts of the Baseband and LMP (Link Manager Protocol) communication protocols.

Bluetooth version 1.0 appeared in 1999, but it was not until the launch of version 1.2 in 2003 that it met the basic requirements for functions such as wireless voice and audio transmission.

The Bluetooth 2.0 version launched in 2004 and the 2.1 version launched in 2007 increased the transmission rate of Bluetooth to 3Mbit/s and improved the pairing experience of Bluetooth devices.

Bluetooth 3.0 released in 2009 added the High Speed ​​function, making the transmission rate up to 24Mbit/s. However, the application scope of this function is relatively narrow, and it has only appeared on computers.

In 2010, the Bluetooth 4.0 version was released, adding Bluetooth Low Energy (Bluetooth Low Energy) technology. Bluetooth has made its way into IoT products.

In 2016, the Bluetooth 5.0 protocol was released, which has faster and farther transmission capabilities in low power consumption mode. The upper limit of the speed reaches 2Mbit/s, and the effective transmission distance can theoretically reach 300m.

In 2017, the Bluetooth Mesh 1.0 protocol was released. Bluetooth has officially entered the field of the Internet of Things through this agreement.

Part 02. Development prospects

Advantages of Bluetooth Mesh:

1. Low chip cost. Basically everyone has a smart phone with bluetooth, which is very popular. In low power mode, the power consumption is low, and the battery can be used for power supply.

2. The network capacity is large, theoretically it can support network access to 60,000 devices. The popular os implementation (Android, linux) has a stable protocol stack and smart phone control, with great potential in the future.

At present, Xiaomi, as a major domestic smart home manufacturer, is currently promoting the Bluetooth Mesh protocol, continuously launching smart home products with the Bluetooth Mesh protocol, and clearly stated in the development document that it will no longer promote the ZigBee access solution. As the chairman of the Smart Home Special Group of the SIG International Bluetooth Organization, Alibaba continues to promote the implementation of Bluetooth Mesh protocols in various fields such as smart lighting, electrician, and home appliances. Tmall Genie AI smart speakers are also actively promoting the access of Bluetooth Mesh devices, and Ali has also launched Pingtouge Bluetooth Mesh chips.

Foreign technology giants such as Amazon, Google, and Apple are also actively investing in the Bluetooth Mesh ecosystem. So far, among the top 6 smart speakers in the global sales list, five have built-in Bluetooth Mesh gateway function.

Part 03. Basic concepts

- broadcast and flood

Bluetooth Mesh technology is implemented based on low-power Bluetooth broadcast messages. This is a messaging mechanism based on flooding. When a node needs to send a message to another node, it will broadcast a message, and all nodes that receive the message will receive and forward the message to ensure that the target node can receive the message.

- Nodes and devices

In a Bluetooth Mesh network, we usually call a device that has not yet joined a Bluetooth Mesh network an Unprovisioned device, and an unprovisioned device that joins a Bluetooth Mesh network is called a Node.

The process of adding an unconnected device to the Bluetooth Mesh network to become a node is called provisioning. In a Bluetooth Mesh network, a Provisioner is usually used to configure an unprovisioned device to become a node in the Bluetooth Mesh network.

Some nodes play different roles, exhibiting the following four node characteristics (Features):

  • Low-Power Features

Power-constrained nodes may take advantage of low-power features to reduce radio on-time and save power consumption. At the same time, the low-power node (LPN) can work together with the Friend node.

  • Friend feature

A node with unlimited power is suitable as a friend node. Friend nodes can store messages and security updates sent to low-power nodes (LPN);

  • Relay Features

Relay nodes can receive and forward messages, and realize a larger-scale network by relaying messages between nodes. Whether a node is capable of this feature depends on its power and computing power.

  • Proxy Features

The proxy node can realize the sending and receiving of Mesh messages between GATT and Bluetooth Mesh nodes. Nodes in this role require fixed power and computing resources.

- element

A node is composed of elements. A node must contain at least one primary element (Primary Element), and can also contain multiple elements. The number and structure of elements contained in each node are fixed, and each element has its own address. , the unicast address of the main element is issued by the network distributor during the network distribution process, and the addresses of the other elements in the node increase sequentially.

- state

State (State) is used to represent a specific state of the elements in the node. The state of an element is accessed through a client-server mechanism. For example, an element in a certain node (such as a socket) has a switch server of the general switch model, which is used to represent the switch state of this element; an element of another node (such as a switch button) has a switch client of the general switch model, so Then the switch client on the switch button can send a message defined by the switch model to access or control the switch status of the switch server on the socket.

- information

Communication between Bluetooth Mesh network nodes is realized through messages. Each state is associated with a series of messages. The client will send these messages to the server to read or set the state of the server. The server will also send a message to notify the clients of other nodes when the state changes.

The message definition of Bluetooth Mesh includes message message format and message interaction mechanism. The message format consists of opcodes and related parameters.

Messages are divided into messages that require a reply and messages that do not require a reply.

- Model

The model (Model) defines the basic functions of the node, including the necessary status and operation status messages and other behaviors necessary to realize this function. A node can contain multiple models. In the Bluetooth Mesh model, a client-server architecture is used for communication. Therefore, the application in the Bluetooth Mesh network is also defined as these three models: server model, client model and control model.

- publish and subscribe

In a Bluetooth Mesh network, nodes can publish messages to unicast addresses, multicast addresses, and virtual addresses when needed, and other nodes can obtain these messages by subscribing to these addresses. For example, the lamps in the living room can subscribe to the multicast address of the living room.

- Network distribution process

1) The unconfigured device broadcasts its existence to the outside world.

2) Establish a link between the undistributed device and the distributor.

3) Securely establish a shared key for later transmission of distribution network data.

4) Verify whether the unconfigured device can join the Bluetooth Mesh network through the OOB information.

5) Encrypted transmission of distribution network data.

picture