%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22'}}}%%
flowchart TD
START([Thread Device<br/>Type Selection]) --> Q1{Power<br/>source?}
Q1 -->|Battery| Q2{Response<br/>latency OK?}
Q1 -->|Mains/USB| Q3{Route<br/>traffic?}
Q2 -->|Minutes OK| SED[/SED<br/>Sleepy End Device/]
Q2 -->|Seconds needed| MED[/MED<br/>Minimal End Device/]
Q3 -->|Yes routing| Q4{Leader<br/>capable?}
Q3 -->|No end device| FED[/FED<br/>Full End Device/]
Q4 -->|Yes| ROUTER[/Router<br/>or Leader/]
Q4 -->|Standby only| REED[/REED<br/>Router Eligible/]
SED --> S_EX["Door sensors<br/>10+ year battery<br/>60s poll interval"]
MED --> M_EX["Leak detectors<br/>2-5 year battery<br/>5s poll interval"]
FED --> F_EX["Smoke alarms<br/>Mains powered<br/>Always responsive"]
REED --> R_EX["Smart plugs<br/>Becomes router if needed<br/>Network resilience"]
ROUTER --> RO_EX["Light bulbs<br/>Route mesh traffic<br/>Up to 32 per network"]
style START fill:#2C3E50,color:#fff
style SED fill:#7F8C8D,color:#fff,stroke:#2C3E50,stroke-width:3px
style MED fill:#7F8C8D,color:#fff,stroke:#2C3E50,stroke-width:2px
style FED fill:#7F8C8D,color:#fff,stroke:#2C3E50,stroke-width:2px
style REED fill:#16A085,color:#fff,stroke:#2C3E50,stroke-width:2px
style ROUTER fill:#16A085,color:#fff,stroke:#2C3E50,stroke-width:3px
1019 Thread Review: Network Topology and Device Roles
1019.1 Learning Objectives
By the end of this chapter, you will be able to:
- Understand Thread’s Hierarchical Architecture: Comprehend the relationship between Border Routers, Leaders, Routers, and End Devices
- Assign Device Roles Correctly: Configure Router, REED, SED, MED, and FED roles based on power source and response requirements
- Apply the Device Type Selection Process: Use decision trees to select optimal device types for specific use cases
- Calculate Network Capacity: Plan device distributions within Thread’s 32-router and 250-device limits
Thread networks organize devices into specific roles based on their power source and functionality. Think of it like a postal delivery system:
- Border Router = Post office (connects the neighborhood to the outside world)
- Leader = Postmaster (manages operations)
- Routers = Mail carriers (always working, delivering messages)
- End Devices = Mailboxes (receive messages but don’t deliver them)
This chapter explains how to choose the right role for each device in your network.
1019.2 Prerequisites
Required Reading:
- Thread Overview - Core Thread concepts
- Thread Operation - Network formation
- 802.15.4 Fundamentals - Physical layer
Technical Background:
- Mesh networking concepts
- IPv6 addressing basics
- Power consumption considerations for IoT devices
Estimated Time: 25 minutes
1019.3 Thread Network Topology Overview
Thread’s hierarchical mesh architecture optimizes battery life and network reliability. The architecture balances three key requirements:
- Reliability: Self-healing mesh with no single point of failure
- Low Power: Battery-powered devices can sleep for extended periods
- IP Connectivity: Native IPv6 addressing for internet integration
1019.3.1 Core Architecture Components
A Thread network consists of several device types working together:
| Component | Function | Power Source | Typical Examples |
|---|---|---|---|
| Border Router | IPv6 gateway to internet | Mains (always-on) | Smart hubs, Wi-Fi routers |
| Leader | Network manager | Mains (always-on) | Any router (elected) |
| Router | Mesh backbone | Mains (always-on) | Light bulbs, switches, plugs |
| REED | Router-eligible device | Either | Smart plugs, sensors |
| SED | Sleepy End Device | Battery | Door sensors, temp sensors |
| MED | Minimal End Device | Battery | Leak detectors |
| FED | Full End Device | Mains | Smoke alarms |
1019.3.2 Network Hierarchy
The Thread network hierarchy operates as follows:
Internet/Cloud Layer:
- Cloud platforms (Matter Controller, mobile apps)
- Connectivity via Wi-Fi or Ethernet
Thread Mesh (fd00::/64 Mesh-Local):
- Border Router: Gateway providing Thread to IP translation
- Leader: Network manager with partition ID assignment
- Routers: Mesh backbone forwarding packets (20-40 mA)
- End Devices: Children attached to parent routers
Network Limits:
- Maximum 32 routers per network
- Maximum 250 total devices per network
1019.4 Device Type Selection
Choosing the correct device type is critical for network performance and battery life. The selection depends primarily on power source and response time requirements.
1019.4.1 Decision Process
Use this decision process to select the appropriate Thread device type:
Step 1: Determine Power Source
- Battery-powered: Consider SED, MED, or REED
- Mains/USB-powered: Consider Router, REED, or FED
Step 2: Evaluate Response Requirements
- Minutes acceptable: SED (best battery life)
- Seconds needed: MED (balanced)
- Instant required: FED or Router
Step 3: Consider Routing Capability
- Should route traffic: Router or REED
- End device only: SED, MED, or FED
1019.4.2 Detailed Device Type Characteristics
Sleepy End Device (SED):
- Sleeps 99%+ of time to conserve power
- Wakes periodically to poll parent for messages
- Poll intervals: 60 seconds to 5 minutes typical
- Battery life: 7-10+ years on coin cell
- Best for: Door sensors, window sensors, temperature sensors
- Trade-off: High latency for incoming messages
Minimal End Device (MED):
- Sleeps but polls more frequently than SED
- Poll intervals: 5-30 seconds typical
- Battery life: 1-5 years depending on poll rate
- Best for: Leak detectors, motion sensors needing faster response
- Trade-off: Shorter battery life than SED
Full End Device (FED):
- Always listening (radio always on)
- Zero latency for incoming messages
- Requires mains power (battery depletes in days/weeks)
- Best for: Smoke alarms, security sensors
- Trade-off: Cannot use battery power
Router-Eligible End Device (REED):
- Starts as end device
- Can promote to router if network needs more routing capacity
- Useful for devices with larger batteries or occasional mains power
- Best for: Smart plugs, devices that may be plugged in
- Trade-off: Uncertain power consumption (depends on promotion)
Router:
- Always on, always forwarding
- Forms the mesh backbone
- Requires mains power (20-40 mA continuous)
- Best for: Light bulbs, switches, plugs, smart appliances
- Trade-off: Highest power consumption
1019.5 End Device Configuration
End devices attach to routers as children and depend on their parent router for network connectivity.
1019.5.1 End Device Comparison
| Device Type | Example | Poll Interval | Battery Life | Power Source |
|---|---|---|---|---|
| REED | Router-eligible | N/A (can promote) | Varies | Mains/Battery |
| SED | Door/Window Sensor | 60s | 10 years | Battery |
| MED | Leak Detector | 5s | 2 years | Battery |
| FED | Smoke Alarm | Always listening | N/A | Mains |
1019.5.2 Poll Interval Selection
The poll interval dramatically affects battery life:
| Poll Interval | Use Case | Approximate Battery Life (CR2032) |
|---|---|---|
| 5 minutes | Temperature, humidity | 15+ years |
| 60 seconds | Door, window, motion | 10-12 years |
| 10 seconds | Leak detector | 3-5 years |
| 5 seconds | Fast-response sensor | 1-2 years |
| Always on | Critical sensors | Days-weeks (use mains) |
1019.5.3 Parent-Child Relationship
End devices maintain a parent-child relationship with routers:
- Attachment: End device discovers and attaches to a parent router
- Message Queuing: Parent queues messages for sleeping children
- Polling: Child wakes, polls parent for queued messages
- Reattachment: If parent fails, child finds new parent automatically
1019.6 Network Capacity Planning
Thread networks have specific limits that affect deployment planning.
1019.6.1 Hard Limits
- 32 routers maximum: Limited by 5-bit router ID space (2^5 = 32)
- 250 devices maximum: Protocol design limit per network
- Multiple networks: Required for deployments exceeding 250 devices
1019.6.2 Router Placement Guidelines
Optimal router placement ensures good mesh coverage:
| Deployment Size | Routers Needed | Coverage Notes |
|---|---|---|
| Small home (<1,000 sq ft) | 8-12 | 1 router per 80-125 sq ft |
| Medium home (1,000-2,500 sq ft) | 16-20 | 1 router per 50-150 sq ft |
| Large home (2,500+ sq ft) | 24-28 | Consider multiple networks |
1019.6.3 Device Distribution Example
For a 150-device deployment:
| Role | Count | Percentage | Function |
|---|---|---|---|
| Border Router | 1 | 0.7% | Internet gateway |
| Leader | 1 (from routers) | N/A | Network management |
| Routers | 20 | 13% | Mesh backbone |
| REEDs | 10 | 7% | Backup routing |
| SEDs | 100 | 67% | Battery sensors |
| MEDs | 15 | 10% | Fast-response sensors |
| FEDs | 4 | 2.6% | Critical sensors |
1019.6.4 Capacity Planning Formula
Use this formula for initial router estimation:
Recommended Routers = max(16, ceil(Total_Devices / 8))
For example:
- 50 devices: max(16, ceil(50/8)) = max(16, 7) = 16 routers
- 200 devices: max(16, ceil(200/8)) = max(16, 25) = 25 routers
1019.7 Knowledge Check
In a Thread network with 200 devices, what is the maximum number that can be routers (always-on devices that forward packets)?
Options:
- 16
- 32
- 64
- 200 (all devices can be routers)
Correct: B) 32
Thread Network Limits:
- Maximum devices: 250 per network
- Maximum routers: 32 per network (fixed limit)
- Minimum routers: 16 (recommended for good mesh coverage)
Why 32 Routers Maximum?
Router ID Space: Thread uses 5-bit router ID (part of RLOC addressing). 5 bits = 2^5 = 32 possible values (IDs 0-31).
Mesh Scalability: Each router must maintain routing table. 32 routers = manageable routing complexity.
Design Philosophy: 16-32 always-on routers form stable backbone; 218-234 sleepy end devices attach to routers.
Automatic Router Management: If you try to add 33rd router, it stays as REED (Router-Eligible End Device). If a router fails, REED automatically promotes to router.
Thread supports “software upgrade” to existing IEEE 802.15.4 hardware (Zigbee chips). What makes this possible, and what are the limitations?
Options:
- Same PHY/MAC layer (802.15.4); requires firmware update for IPv6 stack and Thread protocols; can’t run Zigbee and Thread simultaneously
- Thread uses software-defined radio to emulate 802.15.4; any 2.4 GHz radio can run Thread via firmware
- Thread and Zigbee are interoperable protocols; devices can communicate across both networks after upgrade
- Only Thread-certified hardware with dual-mode radios can switch; standard 802.15.4 chips cannot be upgraded
Correct: A) Same PHY/MAC layer (802.15.4); requires firmware update for IPv6 stack and Thread protocols; can’t run Zigbee and Thread simultaneously
Thread and Zigbee share the same physical foundation:
What’s shared (no hardware change needed):
- IEEE 802.15.4 PHY: 2.4 GHz radio, 250 kbps, DSSS modulation
- IEEE 802.15.4 MAC: CSMA/CA, frame format, addressing
What’s different (firmware change required):
- Network Layer: Thread uses IPv6/6LoWPAN; Zigbee uses proprietary network layer
- Routing: Thread uses RPL; Zigbee uses AODV/tree routing
- Application Layer: Thread uses Matter/CoAP; Zigbee uses ZCL (Zigbee Cluster Library)
- Security: Thread uses DTLS + MAC; Zigbee uses different key management
Upgrade process:
- Flash new firmware with Thread stack (replacing Zigbee stack)
- Commission device to Thread network
- Device now operates as Thread, not Zigbee
Limitations:
- Not simultaneous: Device runs Thread OR Zigbee, not both (single radio, conflicting network stacks)
- No interoperability: Thread devices can’t communicate with Zigbee devices (different protocols above MAC)
- Memory requirements: Thread needs ~100-200 KB flash, ~20-50 KB RAM for IPv6 stack - some minimal Zigbee chips lack sufficient memory
Real-world: Many vendors offer dual-firmware chips (selectable at manufacturing or via OTA).
1019.8 Key Concepts
- Thread Hierarchy: Border Router > Leader > Routers > End Devices (REED/SED/MED/FED)
- 32-Router Limit: Enforced by 5-bit router ID space in RLOC addressing
- 250-Device Limit: Maximum devices per Thread network partition
- Device Role Selection: Based on power source, response requirements, and routing needs
- Poll Interval Trade-off: Longer intervals = better battery life but higher latency
- REED Promotion: Router-eligible devices automatically promote when network needs more routers
- Mesh Backbone: Mains-powered routers form always-on network infrastructure
1019.9 Summary
This chapter covered Thread network topology and device roles:
Network Architecture:
- Thread uses hierarchical mesh with Border Router, Leader, Routers, and End Devices
- Border Router provides IPv6 gateway to internet (Wi-Fi/Ethernet)
- Leader manages network operations (elected from routers)
- 16-32 routers form mesh backbone (mains-powered)
Device Types:
- Router: Always-on, forwards packets, mains-powered
- REED: Can promote to router if needed, backup routing
- FED: Always listening, instant response, mains-powered
- MED: Polls frequently (5-30s), 1-5 year battery
- SED: Polls infrequently (60s-5min), 7-10+ year battery
Capacity Planning:
- Maximum 32 routers per network (5-bit router ID)
- Maximum 250 devices per network
- Recommended 1 router per 6-8 end devices
- Multiple networks for deployments >250 devices
Device Selection:
- Power source determines if device can be router
- Response requirements determine SED vs MED vs FED
- Poll interval directly affects battery life
1019.10 What’s Next
Continue to Thread Review: Protocol Stack and Comparison to understand how Thread’s protocol layers work and how Thread compares to Zigbee and integrates with Matter.