EmbeddedPathashala · BLE Mesh Series
From single BLE links to a self-healing, multi-hop wireless mesh — understand how Bluetooth Mesh works from the ground up.
What You Will Learn
What is Bluetooth Mesh?
Classic BLE is a point-to-point technology — one phone talks to one sensor. That works perfectly for a heart rate monitor or earbuds. But imagine a smart building with 500 lights, 200 occupancy sensors, and 100 thermostats. You cannot pair your phone to every single device.
Bluetooth Mesh (defined in the Bluetooth Mesh Profile specification) solves this by forming a many-to-many network where every device is both a communicator and a relay. A message travels across the network by hopping from node to node until it reaches its destination — even if the sender and receiver are not in direct radio range.
The entire stack is built on top of the Bluetooth Low Energy Core Specification, meaning existing BLE hardware can participate in a mesh network with a firmware update.
Understanding the core difference before diving into the stack.
| Feature | Traditional BLE | Bluetooth Mesh |
|---|---|---|
| Network Topology | Point-to-Point (Star) | Many-to-Many (Mesh) |
| Message Range | Direct radio range only | Extended via relay nodes |
| Connection Model | Requires pairing/bonding | Provisioning (no pairing) |
| Fault Tolerance | Single link failure = broken | Routes around failed nodes |
| Node Scalability | Limited (few devices) | 32,767 unicast addresses |
| Security | Link-layer encryption | Network + Application keys |
| Use Cases | Earbuds, wearables, HID | Smart buildings, lighting, IoT |
🌐 The Layered Architecture
Bluetooth Mesh is defined as a strict layered stack, sitting on top of the BLE Core Specification. Each layer has one job and hands off to the layer above or below it.
Figure: BLE Mesh Layered Architecture (Bluetooth SIG Mesh Profile Spec)
📄 Layer-by-Layer Quick Reference
Defines standardised models for real-world use cases — a Light Lightness Server, a Temperature Sensor, etc. This is the layer your application code lives in.
Provides models needed to configure and manage the mesh network itself — adding/removing nodes, distributing keys, setting publication addresses.
Formats application data for the transport layer. Controls application-level encryption/decryption and verifies incoming messages are using the correct application keys.
Encrypts, decrypts, and authenticates application data. Also handles the Friend feature — buffering messages for low-power nodes that sleep most of the time.
Handles segmentation and reassembly (SAR). BLE advertising payloads are small (~29 bytes usable). Large messages are split here and reassembled at the destination.
Addresses messages toward one or more elements, applies network-layer encryption, and decides whether to relay, accept, or reject each incoming PDU.
Defines how network messages physically travel between nodes. Two bearers are defined: the Advertising Bearer (all devices) and the GATT Bearer (for legacy devices).
The foundation. Bluetooth Mesh reuses the BLE radio, advertising channels (37, 38, 39), and packet formats — making it compatible with existing BLE chips like nRF52, ESP32, etc.
Bluetooth Mesh uses two separate encryption layers. The Network Key (NetKey) protects all network traffic and controls who can relay messages. The Application Key (AppKey) protects the actual application data and controls who can decode the payload. A relay node can forward a message without ever seeing its content — because it only holds the NetKey, not the AppKey.
Ready to Go Deeper?
Part 2 covers each mesh layer in detail — including how PDUs are built, where encryption happens, and how BlueZ maps to each layer.
