A Brief Analysis of Bluetooth MESH Broadcasting

A Brief Analysis of Bluetooth MESH Broadcasting

Labs Guide

Bluetooth mesh technology is implemented based on low-power Bluetooth broadcast messages and is a message delivery mechanism based on flooding.

In traditional Bluetooth, the relationship between Bluetooth and devices is "one-to-one", so devices need to be "paired" first, and then a stable connection is established for data transmission. Low-power Bluetooth devices can establish a "one-to-many" topology with other devices, and send data to other devices in the network through broadcasting. Bluetooth mesh network further establishes a "many-to-many" relationship between devices based on low-power Bluetooth, and messages can be sent to any device in the network through relays.

Part 01: Network Flooding

Bluetooth mesh networks use a "managed network flooding" approach, which is to send messages through broadcasting so that all devices within the transmission range can receive the messages. Devices in the network that support relay functions can forward messages to all their associated devices, and eventually the messages spread throughout the network.

The advantage of network flooding is that it does not require a specific device to play the role of a centralized router. Once a centralized router fails, the entire network will not be able to operate, thus affecting the reliability of network communications. The network flooding method also means that messages transmitted in the network will not be transmitted along a specific path, but can reach the destination through multiple paths.

Because of the flooding technology, the relay will forward messages received from other devices. If this is not restricted, when there is a loop in the network, it may cause a network storm and have a catastrophic impact on the network. Bluetooth mesh network adopts a series of measures, among which there are two main methods, information cache queue and TTL field.

Part 02, Information Cache Queue

The network layer of each node contains a message cache queue to store the most recently received network data packets. If a newly received network data packet is already in the message cache queue, it means that the node has received the message through other paths, and the data packet can be discarded directly. If the data packet is not in the cache queue, the next message processing can be carried out.

The message cache queue does not necessarily need to store complete message data packets, but only needs to be able to identify the message. For example, it can store the unique message ID of the message. The message cache queue is a queue with a length limit. If the queue is full, the oldest message needs to be discarded and the latest message needs to be saved according to the principle of discarding the first arrived message.

Part 03, TTL field

TTL is the abbreviation of Time To Live. The role of TTL is to limit the time that an IP data packet exists in the network. In a Bluetooth mesh network, TTL is actually the maximum number of hops that a data packet can be forwarded in the network. The TTL field is set by the sender of the data. When the underlying transport layer of the forwarding node receives the information reported by the network layer, it subtracts 1 from the TTL value and then forwards the data packet. If the TTL of the information is less than 1, the information will be directly discarded.

Part 04, Broadcast Data Format

Bluetooth mesh broadcast is actually based on low-power Bluetooth broadcast. All data packet formats are also based on the data packet format of low-power Bluetooth broadcast, and are distinguished from other broadcasts by the AD Type field. It can be understood as a special BLE broadcast packet. The valid data in the Bluetooth broadcast packet consists of several AD Structure units. Each AD Structure consists of three parts: Length, AD Type, and AD Data.

There are three AD Types involved in Mesh profile messages, as shown in the following table:

Mesh Beacon is used to periodically broadcast to Bluetooth mesh nodes or unprovisioned nodes. For example, unprovisioned devices periodically send broadcast information to allow themselves to be discovered by the provisioner and thus join the Bluetooth mesh network.

Mesh Message is used to transmit network data packets between normal Bluetooth mesh nodes.

PB-ADV is usually used during equipment network distribution and is mainly used to transmit general network distribution PDU.

Part 05, Summary

Bluetooth has officially entered the field of the Internet of Things through the new protocol specification Bluetooth mesh. Bluetooth mesh technology is a flood-based information transmission mechanism that ensures that the target node can receive the message as long as it is within the network coverage. However, this mechanism also brings certain disadvantages, that is, the flooding of information in the network. The Bluetooth mesh network uses two solutions, information cache queue and TTL field, to prevent information from being forwarded indefinitely.

<<:  A brief analysis of the integration solution of Hyperscan in nDPI

>>:  Understanding Ethernet Switching Technology in One Article

Recommend

FCC votes to approve new round of 5G auction: once reserved for the US military

The Federal Communications Commission (FCC) voted...

9 killer apps for edge computing

Edge computing provides a new paradigm for runnin...

The ultimate form of 5G and its ferryman

Recently, I found that many of my friends have su...

What’s so special about Wi-Fi 6?

What is Wi-Fi 6? Wi-Fi 6 is the alias given by th...

HTTP 3 is coming soon

HTTP 3 This is a protocol that has not yet emerge...

The secrets of the mobile data war: "Unlimited" is conditional

As the deadline for the cancellation of roaming c...

The number of 5G mobile phones will reach 250 million. Is this good news?

According to a new research report released by St...

5G and AI Use Cases - How 5G Helps Implement Artificial Intelligence

Michael Baxter says 5G will unlock the potential ...

How DevOps is shaping the future of networking

Since its advent in 2009, the DevOps philosophy h...

Huawei Network Energy "Innovation" on the Road

[51CTO.com original article] Introduction: "...