Bluetooth Low Energy

How does Bluetooth Mesh (the SIG standard) work?

Bluetooth Mesh is a Bluetooth SIG specification that turns Bluetooth LE devices into a many-to-many network for control, monitoring, and automation, such as building lighting. Devices join through provisioning, which gives them shared network keys, and application keys then separate one application's messages from another's. Messages are broadcast and relayed hop by hop, by managed flooding limited by a TTL and a message cache, or along set paths with directed forwarding.

TL;DR

Bluetooth Mesh carries small control and monitoring messages among many devices, such as networked lighting, not media streams. Devices join through provisioning, and separate keys decide who can relay a message and who can read it. Messages spread by managed flooding, limited by a TTL and a message cache, or by directed forwarding since version 1.1.

Learning objectives

After reading this article you will be able to:

  • Describe how provisioning turns an unprovisioned device into a mesh node
  • Distinguish the network, application and device keys in Bluetooth Mesh
  • Explain how managed flooding uses a TTL and a message cache to relay messages

Bluetooth Mesh use cases

The Bluetooth SIG positions Bluetooth Mesh for control, monitoring, and automation systems in which many devices talk to each other, with networked lighting control as the leading example. Its Mesh Protocol specification defines the requirements for an interoperable mesh network built on Bluetooth Low Energy. The SIG’s FAQ is just as clear about what it is not for: it is optimised for small messages between many devices, not for media streaming.

A light switch does not address a light directly. Devices publish messages to addresses, often group addresses such as “reception”, and other devices subscribe to the addresses they care about. Adding a new light means provisioning it and subscribing it to the right group; nothing else in the network has to change. The SIG also stresses that such systems need no central controller.

Bluetooth Mesh provisioning

A new device joins through provisioning: it starts as an unprovisioned device, and provisioning turns it into a node. Provisioning is usually run by an app on a phone or tablet acting as the Provisioner. The primer describes five steps:

  1. Beaconing. The device advertises an Unprovisioned Device beacon.
  2. Invitation. The Provisioner invites it, and the device replies with its capabilities.
  3. Public key exchange. The two exchange public keys, directly or out of band.
  4. Authentication. The user confirms the device, for example by entering a number it displays or by counting LED flashes.
  5. Distribution. Both sides derive a session key and use it to deliver the network key, the IV Index, and a unicast address. The device key is calculated independently on each side and never sent over the air.

Optional features add remote provisioning, for devices out of the Provisioner’s direct radio range, and certificate-based provisioning with X.509 certificates, so devices need not be in sight.

Bluetooth Mesh network, application and device keys

Bluetooth Mesh separates who can relay a message from who can read it.

  • Network key (NetKey). Holding it makes a node a member of the network or of a subnet. It lets a node decrypt and authenticate up to the network layer, enough to relay, but not to read application data.
  • Application key (AppKey). Secures application data in the upper transport layer. The lighting application’s key is held by lights and switches, not by the thermostats, which hold the heating system’s key.
  • Device key (DevKey). Unique to each node and known only to that node and the Provisioner, it secures configuration.

Keys can be replaced during the life of the network with the Key Refresh procedure, so a device removed from the network is left holding keys that no longer work. Against replay, each element increments a sequence number with every message it publishes, and receivers discard a message whose sequence number is not higher than the last valid one from that element.

Bluetooth Mesh managed flooding

Bluetooth Mesh messages travel by default through managed flooding: a published message is broadcast, every node in radio range hears it, and nodes with the relay feature enabled then retransmit it. Most nodes send and receive mesh messages over the advertising bearer, which uses ordinary BLE advertising and scanning. Managed flooding is the default way messages cross the network, and flooding in a mesh network explains the general technique.

Two rules keep it under control:

  • TTL. Each message carries a time to live that limits how many times it can be relayed. The primer’s example: a TTL of 3 means at most two relays, and a TTL of 0 means the message is not relayed at all.
  • Message cache. Relays remember messages they have handled and discard a copy they have already seen instead of sending it again.

Managed flooding, defined in version 1.0, sends messages in every direction, whether or not a destination lies that way. Version 1.1, which the SIG announced in 2023, added directed forwarding as an option: a relay retransmits only if its forwarding table shows it lies on a path between the message’s source and destination, which can make more efficient use of the network and radio channels.

Relay, proxy, friend and low power features

Relay, proxy, friend and low power are four optional Bluetooth Mesh features, each of which can be enabled or disabled, that give some nodes extra roles beyond the sending and receiving every node can do:

FeatureWhat it does
RelayRetransmits received messages so they can make multiple hops
ProxyRuns a GATT service so a device without the mesh advertising bearer can send and receive mesh messages through it
FriendStores messages for a low-power node and hands them over when asked
Low powerSleeps most of the time and polls its Friend for waiting messages

The proxy feature is the way in for devices such as smartphones. A Proxy node acts as a GATT server with the Mesh Proxy Service, and the phone, as a provisioned Proxy client, exchanges mesh messages with it over a GATT connection. The SIG’s FAQ recommends the advertising bearer for smartphone apps where the operating system allows it and the proxy protocol where it does not. Is a phone mesh over BLE the same as Bluetooth Mesh? looks at that difference.

Friendship suits devices such as a coin-cell temperature sensor, which cannot listen all the time but still needs to receive the occasional configuration change. A mains-powered neighbour holds those messages until the sensor wakes and asks for them.

Frequently asked questions

Does Bluetooth Mesh need a central hub?

No. The Bluetooth SIG describes control systems built on it as needing no central controller, because intelligence is distributed to the devices, and says installers can commission nodes from a phone or tablet app without internet or cloud platforms.

Can Bluetooth Mesh stream audio?

No. The Bluetooth SIG's FAQ says it is optimised for exchanging small messages between many devices, not for media streaming.

Can a node that relays a Bluetooth Mesh message read it?

Not without the right application key. The network key lets a node decrypt and authenticate up to the network layer, enough to relay, but application data is secured in the upper transport layer with an application key.

What does the TTL do in Bluetooth Mesh?

It limits how many times a message can be relayed. In the primer's example, a TTL of 3 means at most two relays, and a TTL of 0 means the message is not relayed at all.

What did Bluetooth Mesh version 1.1 add?

Version 1.1, which the SIG announced in 2023, added directed forwarding as an option. A relay then retransmits only if its forwarding table shows it lies on a path between the message's source and destination.

How does a smartphone connect to a Bluetooth Mesh network?

The SIG's FAQ recommends the advertising bearer where the operating system allows it and the proxy protocol where it does not. With the proxy protocol, the phone exchanges mesh messages over a GATT connection with a Proxy node running the Mesh Proxy Service.

Sources

Build it with Offline Protocol

Offline Protocol's forwarding over BLE is its own application protocol between devices running the SDK, not Bluetooth SIG Mesh, and it does not promise interoperability with SIG Mesh devices. The transport and routing page describes how it routes over BLE and other paths.

Read the transport and routing docs