Bluetooth & BLE · Study deck

BLE Mesh Networking

Picture one switch asking every corridor light to turn off while some nodes sleep and one relay fails.

Radio Remi is your guide for this deck.

mesh
Radio Remi, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Design and deploy BLE Mesh networks for building automation use cases
  • Analyze Bluetooth Mesh node roles and assign them correctly to deployment scenarios
  • Calculate TTL values for mesh networks based on network diameter and relay spacing
  • Explain the Friend/Low Power Node relationship and when to use it for battery-powered devices
iotclass.org

Major section

In 60 Seconds

Bluetooth Low Energy (BLE) means the low-power radio family on which Bluetooth Mesh builds its managed message network.

  • Relays forward messages while TTL remains, Low Power Nodes sleep and poll a Friend, and publish/subscribe addressing lets one command reach subscribed devices in a group when delivery succeeds.

Picture one switch asking every corridor light to turn off while some nodes sleep and one relay fails.

iotclass.org

Major section

In Plain English

BLE Mesh is like a bucket brigade for data - instead of one device trying to reach another across a building, messages get passed from neighbor to neighbor until they arrive.

  • Each "helper" device (relay node) passes the message along, so you can cover an entire office building with one network.

Why it matters: A smart building might have 500+ sensors, lights, and switches.

iotclass.org

Major section

For Kids: The Sensor Squad and the Message Relay Race

But I can only shout to lights that are nearby!".

  • You tell ME your message, and I'll pass it to my neighbor, and they'll pass it to THEIR neighbor, until it reaches the 1st floor!".
  • the battery nodded. "That's exactly what BLE Mesh does!
iotclass.org

Major section

BLE Mesh Networking

BLE Mesh uses managed flooding rather than a single fixed route.

  • Nodes relay messages only while the message still has TTL remaining, and subscribers act on messages addressed to their group.
  • BLE Mesh sits above ordinary BLE advertising or GATT bearers.
  • Troubleshooting is easier if you move from the application model downward to the bearer.

Why it matters

BLE Mesh (Bluetooth Mesh Profile 1.0, 2017) enables many-to-many device communication for building automation and large-scale IoT deployments.

iotclass.org

Major section

Interactive: BLE Mesh TTL and Propagation Calculator

Illustrative hop-delay budget: TTL × assumed 10 ms per hop = 9 × 10 ms = 90 ms; this excludes contention and retries and is not a measured settling time.

  • An office floor (40m x 30m = 1,200 m^2^) needs BLE Mesh lighting control for 120 LED fixtures plus 20 wall switches and 10 occupancy sensors.

Try it: Interactive: BLE Mesh TTL and Propagation Calculator in the chapter

Configure the geometric assumptions to get a candidate TTL and illustrative hop-delay budget; measured paths and retransmissions still determine delivery.

iotclass.org

Major section

Putting Numbers to It

In this full-size-packet example, transmission on all three primary advertising channels costs 3×0.376=1.1283\times0.376=1.1283×0.376=1.128 ms per advertising event.

  • For 135 baseline relay forwards, the sum is 135×1.128=152.28135\times1.128=152.28135×1.128=152.28 ms of radio airtime across transmitters.
  • 15 LPNs (5 switches + 10 sensors) need Friend nodes.
iotclass.org

Major section

Case Study: 500-Light Office Building

Scenario: A 10-floor office building needs unified lighting control with occupancy sensing.

  • These figures require measured baseline energy, device current, and site latency; the topology calculation alone cannot establish them.
iotclass.org

Major section

Mesh Provisioning Workflow

The NetKey protects network traffic, AppKeys protect application messages, and the DevKey protects device configuration.

  • A GATT proxy connection may use BLE link encryption if the peers pair, but mesh packet security does not depend on that link pairing.
Beacon discovery

Unprovisioned device advertises that it is ready to join

Provisioner can find the new device.

Invite and capabilities

Provisioner starts the link and reads supported authentication methods

Prevents using a method the device cannot support.

Public key exchange

Devices establish cryptographic material

Protects the provisioning session.

iotclass.org

Major section

Start With the Story

BLE Mesh works because managed flooding, TTL, provisioning, keys, models, and publication rules make that shared space governable.

  • A mesh message sounds easy until a light switch, relay, group address, battery sensor, and gateway all share the same air.

Read this chapter from one command outward. Ask how the message joins the network, who is allowed to relay it, how far it should travel, and what evidence shows the mesh can survive real placement.

iotclass.org

Major section

Deep Dive: Mesh Relay Evidence and Key Boundaries

BLE Mesh commissioning evidence should prove that managed flooding is bounded, not just that one test command worked.

  • Friend/LPN evidence is different.
  • A battery sensor can sleep only if a nearby Friend buffers messages while the sensor radio is off.
  • Mesh key evidence should separate forwarding from reading.
iotclass.org

Major section

Deep Dive: Mesh Relay Evidence and Key Boundaries (continued)

For example, if a door sensor polls every 30 seconds, a configuration update sent while it sleeps should arrive on the next poll instead of disappearing into the flood.

  • A hallway relay needs the NetKey so it can authenticate and forward network traffic, decrement TTL, and reject malformed packets.
  • It should not need the lighting AppKey unless it actually controls a lighting model.
  • A useful commissioning record lists which AppKeys each model is bound to and includes a test where a relay forwards an application message it cannot decrypt at the application layer.
iotclass.org

Major section

Quick Reference Card

Home: fewer than 50 devices; use roughly 10-20% relays.

  • Office: 50-200 devices; use roughly 15-25% relays.
  • Building: 200-1000 devices; use roughly 10-20% relays, with relay placement checked per floor.
iotclass.org

Deck summary

Key takeaways

Bluetooth Low Energy (BLE) means the low-power radio family on which Bluetooth Mesh builds its managed message network.

  • BLE Mesh is like a bucket brigade for data - instead of one device trying to reach another across a building, messages get passed from neighbor to neighbor until they arrive.
  • But I can only shout to lights that are nearby!".
  • BLE Mesh uses managed flooding rather than a single fixed route.
  • Illustrative hop-delay budget: TTL × assumed 10 ms per hop = 9 × 10 ms = 90 ms; this excludes contention and retries and is not a measured settling time.
iotclass.org

Retrieval practice

Recall check 1 of 6

Radio Remi says: answer from memory, then check your reasoning.

Q1In Bluetooth Mesh, a sensor publishes temperature readings to address 0xC001 and all ceiling displays subscribe to 0xC001. What messaging model does this describe?

AThe publish/subscribe model, with a group address shared by displays.
BThe unicast request/response model, querying each display separately.
CThe unaddressed flooding model, broadcasting to every mesh node.
DThe Friend polling model, with each display requesting new readings.
Show answer

Answer: A Bluetooth Mesh uses a publish/subscribe model.

iotclass.org

Retrieval practice

Recall check 2 of 6

Radio Remi says: answer from memory, then check your reasoning.

Q2For a first TTL planning test in a 3-story BLE Mesh building, assume the longest intended relay path has eight forwarding steps; the 80 m span and 10 m spacing are only a geometric estimate. Which candidate TTL range includes margin before field measurement?

ATTL = 3 (minimum hops)
BTTL = 8 (exact hop count)
CTTL = 10-16 (safety margin)
DTTL = 127 (maximum possible)
Show answer

Answer: C Eight steps are an explicit planning assumption, not a fact inferred from straight-line distance.

iotclass.org

Retrieval practice

Recall check 3 of 6

Radio Remi says: answer from memory, then check your reasoning.

Q3A battery-powered motion sensor needs to receive occasional configuration updates from a controller in a BLE Mesh network. Which node role should the sensor use with a nearby Friend?

AMotion sensor as Relay Node
BMotion sensor as Low Power Node
CMotion sensor as Proxy Node
DMotion sensor as Provisioner
Show answer

Answer: B LPN + Friend is the correct pattern for battery-powered sensors that need to receive messages.

iotclass.org

Retrieval practice

Recall check 4 of 6

Radio Remi says: answer from memory, then check your reasoning.

Q4A 3-story BLE Mesh deployment uses an eight-relay-hop path as its initial planning estimate; 80 m node span and 10 m nominal relay spacing do not establish the installed path. Which TTL candidate includes a margin for field testing?

ATTL 3, minimizing packets despite the estimated eight relay hops.
BTTL 8, matching the estimate exactly without any path margin.
CTTL 12–16, allowing safety margin beyond the eight-hop estimate.
DTTL 127, maximizing scope and treating it as guaranteed delivery.
Show answer

Answer: C Correct as a planning range.

iotclass.org

Retrieval practice

Recall check 5 of 6

Radio Remi says: answer from memory, then check your reasoning.

Q5A battery-powered motion sensor in a BLE Mesh network needs to receive occasional configuration updates. Which node type combination is correct?

AA Relay Node that stays awake to forward traffic despite the battery limit.
BA Low Power Node with a nearby Friend buffering configuration messages.
CA Proxy Node that bridges other devices instead of sleeping for updates.
DA standalone sleeping node with no Friend to retain incoming messages.
Show answer

Answer: B The sensor can sleep as an LPN while a nearby Friend buffers messages until it polls.

iotclass.org

Retrieval practice

Recall check 6 of 6

Radio Remi says: answer from memory, then check your reasoning.

Q6Complete the code to set up BLE notifications for real-time sensor data:

Atemp = int.from_bytes(data, byteorder='little') / 100.0
Btemp = float(data.decode('utf-8'))
Ctemp = struct.unpack('f', data)[0]
Dtemp = int(data[0]) + int(data[1]) / 100
Show answer

Answer: A BLE notifications allow a device to push data updates.

iotclass.org

Print reference

Answers

Answer key.

  1. A · Bluetooth Mesh uses a publish/subscribe model.
  2. C · Eight steps are an explicit planning assumption, not a fact inferred from straight-line distance.
  3. B · LPN + Friend is the correct pattern for battery-powered sensors that need to receive messages.
  4. C · Correct as a planning range.
  5. B · The sensor can sleep as an LPN while a nearby Friend buffers messages until it polls.
  6. A · BLE notifications allow a device to push data updates.
iotclass.org