Bluetooth supports three topologies: star (point-to-point or broadcast for beacons), connected (bidirectional data exchange with security), and mesh (building-scale multi-hop using managed flooding). The choice depends on power budget, range requirements, and network device count.
Key Concepts
Point-to-Point BLE: Direct connection between one central and one peripheral; simplest topology; suitable for wearables, medical devices, and consumer accessories
BLE Star: One central (gateway/smartphone) connected simultaneously to multiple peripherals; each peripheral maintains an independent connection interval
BLE Broadcast: Connectionless advertising; peripherals broadcast data to unlimited observers simultaneously; no ACK, no connection; used for beacons and public data dissemination
BLE Mesh: Many-to-many topology using publish/subscribe with managed flooding; supports thousands of nodes; requires provisioning and model configuration
Scatternet: Classic Bluetooth topology where bridge devices connect multiple piconets; adds latency proportional to bridge switching time
BLE Periodic Advertising with Responses (PAwR): BLE 5.4 feature enabling synchronized bidirectional communication with up to 32,767 devices using a single advertising train; designed for ESL (Electronic Shelf Label) networks
LE Audio Broadcast (Auracast): BLE 5.2 feature broadcasting audio streams to unlimited listeners without pairing; basis for public venue audio (airports, cinemas, hearing loops)
Connectionless vs Connection-Oriented: Broadcast/advertising topologies are connectionless (no encryption possible by default); connection-based topologies support full BLE security features
Minimum Viable Understanding
Bluetooth supports three main topologies: star (point-to-point or broadcast for beacons), connected (bidirectional data exchange with security), and mesh (building-scale multi-hop networks using managed flooding). The choice between them is driven by power budget, range requirements, and the number of devices in the network. Advertising interval is the single largest factor affecting beacon battery life.
11.1 Learning Objectives
By the end of this chapter, you will be able to:
Distinguish between star, broadcast, and mesh topologies in Bluetooth and select the appropriate one for a given scenario
Explain BLE advertising modes and configure advertising intervals for beacon and broadcast applications
Design Bluetooth Mesh networks for building-scale deployments with relay, proxy, and low-power nodes
Analyze power consumption trade-offs for different topology choices and calculate expected battery life
Implement the BLE state machine transitions for optimal power management in constrained devices
For Beginners: Bluetooth Network Topologies
Bluetooth devices can connect in different patterns. A point-to-point connection links two devices directly (like your phone to your earbuds). A star network connects multiple devices to one central hub. Bluetooth Mesh creates a web of interconnected devices that can relay messages across large areas, like smart lighting in an entire building.
Sensor Squad: The Shape of Wireless!
“Bluetooth networks come in different shapes, just like how you can arrange desks in a classroom!” Sammy the Sensor said. “A star topology is like desks arranged in a circle around the teacher – everything goes through one central device. That is how most BLE connections work, with your phone in the middle.”
“Broadcast topology is my favorite,” Lila the LED announced. “It is like a lighthouse sending light in all directions. A BLE beacon just broadcasts its signal to anyone listening – no pairing needed, no handshakes, no waiting. That is how stores know when you walk past a display!”
Max the Microcontroller rubbed his chin thoughtfully. “But the real game-changer is Bluetooth Mesh. Imagine a chain of people passing a message across a football field. Each device receives the message and relays it to the next one. That way, even if I cannot reach the gateway directly, my message can hop through other devices until it gets there. It works for entire buildings!”
“Each topology has different power needs,” Bella the Battery explained. “A simple point-to-point connection is the most efficient – just two devices talking. Broadcasting uses a bit more because the beacon never stops. And mesh uses the most energy because every device might need to relay messages for others. Choosing the right shape is key to making me last as long as possible!”
11.2 Prerequisites
Before diving into this chapter, you should be familiar with:
A central device (usually a phone) establishes a BLE connection to one peripheral (e.g., fitness band).
The peripheral sends sensor data such as heart rate and steps; the phone can also write settings such as alarms or display units.
This is full bidirectional data exchange with security, reliability and flow control on top of the radio link.
11.3.2 Advertising Power Optimization
Putting Numbers to It
Advertising power consumption scales linearly with interval frequency. Given a CR2032 coin cell battery (220 mAh capacity) and typical nRF52 BLE chip specifications:
\[
\begin{aligned}
\text{TX events per second} &= \frac{1000 \text{ ms}}{\text{interval (ms)}} \times 3 \text{ channels} \\[0.4em]
\text{Active time per event} &= 0.5 \text{ ms (TX)} + 0.1 \text{ ms (setup)} = 0.6 \text{ ms} \\[0.4em]
I_{\text{avg}} &= I_{\text{TX}} \times \text{duty cycle} + I_{\text{sleep}} \times (1 - \text{duty cycle}) \\[0.4em]
\text{Battery life (hours)} &= \frac{\text{Capacity (mAh)}}{I_{\text{avg}} \text{ (mA)}}
\end{aligned}
\]
Key insight: Increasing the advertising interval from 20 ms to 1000 ms (50x longer) extends battery life from 7 days to 316 days (45x improvement). The relationship is nearly linear because duty cycle dominates over sleep current at high advertising rates.
Note on TX current: This example uses 15 mA TX current, which corresponds to nRF52 operating at +4 dBm output power. At the more common 0 dBm setting, TX current is approximately 5–7 mA, yielding a longer 20 ms-interval life of roughly 11 days. The relative improvement from interval tuning remains the same regardless of TX power setting.
Interactive: BLE Advertising Power Calculator
Adjust the advertising interval and observe how it affects battery life for a CR2032-powered BLE beacon.
Pitfall: Using Minimum Advertising Interval (20ms) for Battery-Powered Beacons
The Mistake: Setting the BLE advertising interval to 20ms (the minimum allowed) for a battery-powered beacon because “faster discovery means better user experience,” then finding batteries drain in weeks instead of months.
Why It Happens: Developers optimize for discovery latency without calculating the power cost. At 20ms intervals, the radio transmits 50 times per second on 3 channels (150 TX events/second). This continuous activity prevents the MCU from entering deep sleep and dominates power consumption.
The Fix: Match advertising interval to your actual discovery latency requirements. For most beacon applications, 100-1000ms intervals provide acceptable discovery time with dramatically better battery life:
Power comparison (nRF52 @ 0dBm TX, 3 channels):
20ms interval (minimum):
- TX events/second: 150
- Average current: ~850 uA
- CR2032 life: 220mAh / 0.85mA = 259 hours = 11 days
100ms interval (balanced):
- TX events/second: 30
- Average current: ~180 uA
- CR2032 life: 220mAh / 0.18mA = 1,222 hours = 51 days
1000ms interval (power-optimized):
- TX events/second: 3
- Average current: ~25 uA
- CR2032 life: 220mAh / 0.025mA = 8,800 hours = 366 days
Discovery latency (typical scanner at 100ms window):
- 20ms interval: ~60ms average discovery
- 100ms interval: ~150ms average discovery
- 1000ms interval: ~1.5s average discovery
Use 100-300ms for consumer devices needing responsive discovery. Use 1-10s for asset tracking where battery life trumps discovery speed.
11.4 Mesh Topology
Bluetooth Mesh extends BLE beyond point-to-point connections to building-scale deployments.
Characteristics:
Many-to-many communication
Self-healing networks
Multi-hop range extension
Addressing up to ~32k unicast nodes (practical scale depends on airtime and relay overhead)
Use cases: Building automation, lighting, smart metering
Mesh Advantages:
Advantage
Benefit
Extended Range
Multi-hop routing beyond single connection range
Self-Healing
Automatic re-routing around failures
Reliability
Multiple paths ensure message delivery
Scalability
No single bottleneck point
Energy Efficiency
Lower transmit power with powered routers
11.4.1 Bluetooth Mesh Architecture
Bluetooth Mesh uses managed flooding for message delivery, which eliminates the need for routing tables on resource-constrained devices.
Key node types:
Relay nodes: Forward messages through the mesh (typically mains-powered)
Proxy nodes: Bridge between mesh and non-mesh BLE devices (smartphones)
Friend nodes: Store messages for low-power nodes while they sleep
Low Power Nodes (LPN): Battery-powered sensors that sleep most of the time
Worked Example: BLE Mesh Lighting Control System
Scenario: A commercial building needs to deploy 200 smart lights across 3 floors using Bluetooth Mesh. The building has concrete floors (high RF attenuation) and requires smartphone control from any location.
Given:
200 BLE mesh-capable light fixtures (relay nodes)
3 floors, approximately 2000 m^2 per floor
Concrete floor attenuation: ~15-20 dB
Smartphone app for user control (requires proxy node)
Maximum acceptable command latency: 500ms
Steps:
Calculate relay density: Each relay node covers ~10m radius indoors. For 2000 m^2 per floor, need approximately 60-70 lights per floor acting as relays. With 200 lights, coverage is adequate.
Design for floor isolation: Concrete attenuates signals significantly. Install 2-3 proxy nodes per floor at stairwells/elevators where some cross-floor signal may exist. These proxy nodes bridge BLE mesh to smartphone GATT connections.
Configure TTL (Time To Live): With average 3-4 hops to reach any light on a floor, set TTL=7 to allow cross-floor commands while preventing excessive flooding. Each hop adds ~10-20ms latency.
Plan provisioning: Use a provisioner app to add all 200 devices to the network. Assign group addresses: Floor1_All (0xC001), Floor2_All (0xC002), Floor3_All (0xC003), Building_All (0xC000).
Calculate worst-case latency: Maximum 6 hops x 50ms per hop = 300ms, well within 500ms requirement.
Result: Building-wide lighting control with smartphone access from any location. Commands propagate via managed flooding through relay nodes, with proxy nodes enabling smartphone connectivity. Group addressing allows “all off” commands for entire floors or building.
Key Insight: Bluetooth Mesh’s managed flooding eliminates the need for routing tables on resource-constrained light bulbs. Every mains-powered light becomes a relay, creating dense coverage. The TTL parameter balances network-wide reach against flooding overhead.
Worked Example: BLE Mesh Sensor Network with Low-Power Nodes
Scenario: A warehouse deploys battery-powered temperature/humidity sensors that must report every 5 minutes while achieving 2+ year battery life on a CR2032 coin cell.
Given:
50 battery-powered sensors (Low Power Nodes - LPN)
20 mains-powered access points (Friend Nodes)
CR2032 battery capacity: 220 mAh
Sensor sleep current: 2 uA
Sensor TX current: 15 mA for 5ms per transmission
Poll interval requirement: sensors wake every 10 seconds to check for commands
Analysis:
Configure Friend relationship: Each LPN establishes friendship with a nearby Friend Node. The Friend stores messages destined for the LPN while it sleeps.
Calculate LPN power budget:
Sleep current: 2 uA x 24 hours = 48 uAh/day
Sensor reading + TX (every 5 min = 288/day): 288 x 15mA x 5ms = 21.6 mAh/day… Too high!
Redesign with optimized Friend polling:
Data transmissions: 96/day (every 15 minutes)
TX: 96 x 3ms x 15mA = 4.32 mAh/day
Poll: 96 x 2ms x 15mA = 2.88 mAh/day
Total: 7.25 mAh/day -> 220mAh / 7.25 = 30 days… Still short of 2 years
Result: Analysis reveals CR2032 cannot achieve 2-year life with BLE Mesh polling overhead. Design decision: Use BLE advertising-only mode (no mesh) for sensors, with mesh-connected gateways that aggregate data.
Key Insight: BLE Mesh’s Low Power Node feature reduces power versus always-on relays, but the Friend polling overhead still consumes significant energy. For multi-year battery life with very infrequent data, advertising-only beacons to mesh-connected gateways may be more power-efficient than full mesh participation.
11.5 BLE Connection State Machine
Understanding the BLE Link Layer state machine is critical for power optimization. Devices spend most time in Standby (~1 uA) with brief bursts in active states.
States:
Standby: Initial state - radio is off, minimal power consumption
Advertising: Broadcasting presence on advertising channels (37, 38, 39)
Scanning: Listening for advertising packets from peripherals
Initiating: Central sending connection request to advertiser
Connected: Bidirectional data exchange established
State Transitions:
From
To
Trigger
Standby
Advertising
Start Advertising (peripheral)
Standby
Scanning
Start Scanning (central)
Advertising
Connected
Connection Request received
Scanning
Initiating
Matching advertiser discovered
Initiating
Connected
Connection established
Connected
Standby
Disconnect
11.5.1 Power Profile Comparison
Mode
Average Current
Battery Life (CR2032)
Classic (audio streaming)
~30 mA
~7 hours
BLE Sensor (1s updates)
~15 uA
~1.5 years
BLE Beacon (200ms interval)
~50 uA
~5 months
BLE Beacon (1s interval)
~10 uA
~2.5 years
11.5.2 Knowledge Check: BLE State Machine
11.6 Scanning and Discovery
BLE discovery involves the interplay between advertising and scanning timing.
Scanner Parameters:
Scan Interval: How often the scanner listens (e.g., every 200ms)
Scan Window: How long the scanner listens each interval (e.g., 50ms)
Discovery time depends on when the scan window overlaps with an advertisement on any of the 3 advertising channels.
Example:
- Advertising interval: 100ms
- Scan interval: 200ms
- Scan window: 50ms (25% duty cycle)
Average discovery time: 100-300ms
- Best case: Advertisement occurs during active scan window
- Worst case: Several cycles before timing aligns
11.7 Power Classes
Bluetooth defines power classes for different range requirements:
Class
Power
Range
Application
1
100 mW (20 dBm)
~100m
Industrial, long-range
2
2.5 mW (4 dBm)
~10m
Mobile devices
3
1 mW (0 dBm)
~1m
Ultra-low power
11.8 Technology Selection Guide
Use this decision framework to choose the right Bluetooth technology:
Choose BLE Advertising (Beacons) when:
One-to-many broadcast is needed
No bidirectional communication required
Receivers don’t need to pair
Simplest implementation, lowest power
Choose BLE Connected Mode when:
Bidirectional communication needed
Security/encryption required
Larger data payloads (MTU up to 512 bytes)
Reliable delivery with acknowledgments
Choose Bluetooth Mesh when:
Building-scale coverage needed
Self-healing networks required
Many-to-many communication patterns
Mains-powered relay infrastructure available
Choose Classic Bluetooth when:
Audio streaming (A2DP)
High-bandwidth file transfer
Legacy device compatibility
Continuous data streams
11.8.1 Knowledge Check: Bluetooth Mesh Architecture
11.8.2 Knowledge Check: BLE Advertising Optimization
11.8.3 Knowledge Check: BLE Topology Selection
11.9 Real-World Deployment: Bluetooth Mesh Lighting at Scale
11.9.1 Silvair Bluetooth Mesh in Commercial Buildings
Silvair (acquired by Signify/Philips in 2021) deployed one of the largest Bluetooth Mesh lighting installations at a 50,000 m2 office campus in Krakow, Poland. The deployment illustrates both the strengths and engineering constraints of Bluetooth Mesh at scale.
Deployment Numbers:
Parameter
Value
Total luminaires
1,800 Bluetooth Mesh nodes
Building area
50,000 m2 across 4 floors
Relay density
~36 relays per 1,000 m2
Proxy nodes per floor
6 (at elevator lobbies and stairwells)
Average hops per command
3.2
Command latency (p95)
180 ms
Energy savings vs static lighting
38% reduction in lighting electricity
Why Bluetooth Mesh over Zigbee or Wired DALI?
The decision framework came down to three factors:
Smartphone compatibility: Bluetooth Mesh proxy nodes allow any smartphone to control lighting – no dedicated gateway hardware. Zigbee requires a coordinator/gateway box on every floor. For a 4-floor building, this eliminated $2,400 in gateway hardware and ongoing maintenance.
Retrofit cost: DALI wiring for 1,800 fixtures would require $180,000–$250,000 in cable runs through existing ceilings. Bluetooth Mesh uses the existing mains power wiring only. Total installation was completed in 3 weeks versus an estimated 12 weeks for DALI.
Managed flooding simplicity: Each luminaire acts as a relay without needing routing tables. Zigbee’s mesh routing requires each node to maintain neighbor tables (200–500 bytes per neighbor), which is feasible for 50-node networks but creates memory pressure at 1,800 nodes.
Engineering Tradeoff – Flooding Bandwidth:
Bluetooth Mesh’s managed flooding means every message is relayed by every node within TTL range. At 1,800 nodes with TTL=5, a single group command generates roughly 1,800 relay events. Silvair solved bandwidth saturation through:
Group-based TTL limiting: Floor-level commands use TTL=4, building-wide commands use TTL=6
Publish period throttling: Sensor updates (occupancy, daylight) publish at 30-second intervals, not real-time
Relay node filtering: Only 60% of nodes enabled as relays (the remainder are leaf nodes near windows)
This kept the network utilization below 40% of theoretical airtime capacity, leaving headroom for bursty group commands during morning arrival and evening departure.
Interactive Quiz: Match Topologies to Characteristics
Interactive Quiz: Sequence Topology Selection
🏷️ Label the Diagram
💻 Code Challenge
11.10 Summary
This chapter covered Bluetooth network topologies:
Star/Broadcast topology enables one-to-many advertising for beacons and asset tracking
Mesh topology extends BLE to building-scale with managed flooding and self-healing
The BLE state machine governs device behavior and power consumption
Advertising intervals dramatically affect battery life (20ms vs 1000ms = ~45x difference)
Power classes (1, 2, 3) provide flexibility for different range requirements
Low Power Nodes in mesh can extend battery life but add polling overhead
Common Pitfalls
1. Choosing Point-to-Point for Multi-Sensor Systems
Deploying one smartphone per sensor in a point-to-point topology for a 20-sensor building monitoring system requires 20 smartphones or 20 sequential connection cycles from a single gateway. Use BLE star topology (single central, multiple peripherals) or BLE Mesh for multi-sensor deployments. A single ESP32 can maintain 10–20 simultaneous BLE connections, serving as a hub for many sensors.
2. Using BLE Mesh When BLE Star Suffices
BLE Mesh adds significant complexity: provisioning, key management, model configuration, and relay node placement. For deployments under 20 devices within a 50 m radius of a gateway, BLE star topology achieves better latency, simpler firmware, and easier debugging. Use BLE Mesh only when you need: range beyond direct gateway reach, no infrastructure (gateway-less operation), or >20 devices.
3. Broadcasting Sensitive Data in Connectionless Advertisements
BLE advertising data is transmitted in cleartext and can be received by any BLE scanner within range. Broadcasting patient vital signs, access control codes, or proprietary sensor data in advertising PDUs exposes it to passive eavesdropping. Use encrypted connection-based GATT for sensitive data; use advertising only for non-sensitive discovery metadata (device name, service UUID, TX power).
4. Not Planning BLE Mesh Relay Node Placement
BLE Mesh networks with insufficient relay nodes have coverage holes where messages cannot reach their destination. Each relay node increases network delay by one hop latency (~10–50 ms). For reliable coverage, ensure every node is within range of at least 2 relay nodes (for redundancy), and use the mesh provisioner’s network analyzer to map relay coverage before deployment.