29  Zigbee Knowledge Checks

Practice problems and interactive quizzes to test your Zigbee understanding

In 60 Seconds

Test your Zigbee knowledge with interactive exercises and knowledge checks covering device roles, network formation, routing, security, and application profiles. This chapter includes multiple-choice quizzes with explanations, design exercises for real-world scenarios, and troubleshooting problems that reinforce concepts from earlier Zigbee chapters.

29.1 Learning Objectives

By completing these exercises, you will:

  • Classify Zigbee device roles and justify topology decisions for residential and commercial deployments
  • Calculate battery life budgets by decomposing active, polling, and sleep energy contributions
  • Evaluate Wi-Fi coexistence strategies and select optimal Zigbee channels using spectrum overlap analysis
  • Design secure commissioning procedures that prevent default-key vulnerabilities in multi-device networks

These exercises test your understanding of Zigbee technology through practical questions and scenarios. Each problem is designed to reinforce key concepts – network formation, device roles, routing, and security. Use them to check your knowledge before moving on to hands-on labs or real deployments.

29.2 Knowledge Checks

Test your understanding with these interactive questions covering key Zigbee concepts.

29.3 Practice Exercises

29.3.1 Exercise 1: Smart Home Network Design

Objective: Design a Zigbee network topology for a residential deployment.

Scenario: Plan a 25-device Zigbee network for a 2-story house (200 m²): - 10 smart light bulbs (mains-powered, ceiling fixtures) - 8 door/window sensors (battery-powered, 5-year life expected) - 5 motion detectors (battery-powered) - 1 smart thermostat (wired to HVAC 24V power) - 1 Zigbee coordinator (SmartThings hub, plugged in)

Tasks:

  1. Classify each device as Coordinator, Router, or End Device based on power source
  2. Draw the network topology showing mesh backbone and parent-child relationships
  3. Calculate mesh coverage with 15-meter router range
  4. Identify single points of failure

Device Classification:

  • 1 Coordinator: Hub
  • 11 Routers: 10 bulbs + 1 thermostat (mains-powered)
  • 13 End Devices: 8 door sensors + 5 motion sensors (battery)

Coverage Calculation:

  • 200 m² house with 11 routers
  • Each router covers ~707 m² (15m radius, per spec)
  • 11 routers provide heavily overlapping coverage across 200 m²
  • Multiple redundant paths available – excellent mesh backbone

Single Points of Failure:

  • Coordinator (hub) - if it fails, no network management
  • Solution: Regular backup of coordinator config

29.3.2 Exercise 2: Wi-Fi Coexistence Planning

Objective: Optimize Zigbee channel selection for minimal Wi-Fi interference.

Scenario: Your Wi-Fi router uses channel 6. Your neighbor’s Wi-Fi uses channel 1. Microwave oven operates during lunch hours.

Tasks:

  1. Map Wi-Fi channel overlap with Zigbee channels
  2. Identify safe Zigbee channels
  3. Recommend primary and backup channels
  4. Describe interference mitigation for microwave

Wi-Fi-Zigbee Overlap:

Wi-Fi Ch 1 (2.401-2.423 GHz) → Zigbee Ch 11-14 ❌
Wi-Fi Ch 6 (2.426-2.448 GHz) → Zigbee Ch 15-20 ❌

Safe Channels:

  • Channels 25-26 (2.475-2.480 GHz) - above both Wi-Fi networks

Recommendation:

  • Primary: Channel 26
  • Backup: Channel 25

Microwave Mitigation:

  • Microwaves blast entire 2.4 GHz (uncontrolled emissions)
  • Accept brief outages during cooking (1-3 minutes)
  • Use Zigbee retry mechanisms
  • Consider Sub-GHz Zigbee (868/915 MHz) for critical applications

29.3.3 Exercise 3: AODV Routing Simulation

Objective: Understand AODV route discovery through manual simulation.

Scenario: Network topology:

Coordinator (0x0000) ← → Router1 (0x0001) ← → Router2 (0x0002)
                    ↑                              ↑
               EndDevice (0x0003)           Router3 (0x0004)

EndDevice 0x0003 sends temperature reading to Coordinator 0x0000.

Tasks:

  1. Trace RREQ broadcast from EndDevice
  2. Show RREP return path
  3. Calculate route: source → destination
  4. Simulate Router1 failure and re-routing

RREQ Broadcast:

1. 0x0003 broadcasts RREQ "Looking for 0x0000"
2. 0x0001 (Router1) receives, forwards
3. 0x0000 receives directly from 0x0001

RREP Return:

1. 0x0000 sends RREP to 0x0001 "I'm 0 hops away"
2. 0x0001 forwards RREP to 0x0003 "Route via me, 1 hop"

Established Route:

0x0003 → 0x0001 → 0x0000 (2 hops)

Router1 Failure Scenario:

1. 0x0003 sends data to 0x0001
2. No ACK received (3 retries, 300ms)
3. Mark route invalid, broadcast new RREQ
4. If Router2 (0x0002) or Router3 (0x0004) in range:
   0x0003 → 0x0002 → 0x0000
5. If not in range: Device orphaned, rejoin needed

Scenario: An office building has Wi-Fi access points on channels 1, 6, and 11 (standard 2.4 GHz deployment). You need to deploy a 50-device Zigbee sensor network with minimal interference. Calculate the optimal Zigbee channel.

Given:

  • Wi-Fi: Channels 1, 6, 11 (20 MHz bandwidth each)
  • Zigbee: Must select one of 16 channels (11-26) in 2.4 GHz band
  • 802.15.4 channel bandwidth: 2 MHz (plus guard bands)
  • Packet error rate target: <1% (acceptable for sensor network)

Step 1: Map Wi-Fi Channels to Frequencies

Wi-Fi Channel Mapping (center frequency ± 10 MHz):
Channel 1:  2.401 - 2.423 GHz (center: 2.412 GHz)
Channel 6:  2.426 - 2.448 GHz (center: 2.437 GHz)
Channel 11: 2.451 - 2.473 GHz (center: 2.462 GHz)

Step 2: Map Zigbee Channels to Frequencies

Zigbee 802.15.4 Channels:
Channel 11: 2.405 GHz (2.404 - 2.406 GHz with guard bands)
Channel 12: 2.410 GHz
Channel 13: 2.415 GHz
Channel 14: 2.420 GHz
Channel 15: 2.425 GHz
Channel 16: 2.430 GHz
Channel 17: 2.435 GHz
Channel 18: 2.440 GHz
Channel 19: 2.445 GHz
Channel 20: 2.450 GHz
Channel 21: 2.455 GHz
Channel 22: 2.460 GHz
Channel 23: 2.465 GHz
Channel 24: 2.470 GHz
Channel 25: 2.475 GHz
Channel 26: 2.480 GHz

Step 3: Calculate Overlap with Wi-Fi Channels

Wi-Fi Channel 1 (2.401-2.423 GHz) overlaps:
- Zigbee 11 (2.405) ✗ CONFLICT
- Zigbee 12 (2.410) ✗ CONFLICT
- Zigbee 13 (2.415) ✗ CONFLICT
- Zigbee 14 (2.420) ✗ CONFLICT

Wi-Fi Channel 6 (2.426-2.448 GHz) overlaps:
- Zigbee 15 (2.425) ⚠ Marginal (edge overlap)
- Zigbee 16 (2.430) ✗ CONFLICT
- Zigbee 17 (2.435) ✗ CONFLICT
- Zigbee 18 (2.440) ✗ CONFLICT
- Zigbee 19 (2.445) ✗ CONFLICT

Wi-Fi Channel 11 (2.451-2.473 GHz) overlaps:
- Zigbee 20 (2.450) ⚠ Marginal
- Zigbee 21 (2.455) ✗ CONFLICT
- Zigbee 22 (2.460) ✗ CONFLICT
- Zigbee 23 (2.465) ✗ CONFLICT
- Zigbee 24 (2.470) ✗ CONFLICT

Step 4: Identify Safe Channels

Clear channels (no overlap with any Wi-Fi):
- Channel 25 (2.475 GHz) ✓ SAFE (above Wi-Fi Ch 11)
- Channel 26 (2.480 GHz) ✓ SAFE (above Wi-Fi Ch 11)

Marginal channels (edge of Wi-Fi, may work):
- Channel 15 (2.425 GHz) - edge of Wi-Fi Ch 6
- Channel 20 (2.450 GHz) - edge of Wi-Fi Ch 11

Step 5: Test with Spectrum Analyzer (Simulated)

Measured Interference Levels:

Channel 25 (2.475 GHz):
- Background noise: -95 dBm
- Wi-Fi spillover: -85 dBm (weak, from Ch 11 tail)
- Microwave oven: -70 dBm (when running)
- Signal-to-Noise: 15 dB (acceptable)

Channel 26 (2.480 GHz):
- Background noise: -95 dBm
- Wi-Fi spillover: -88 dBm (very weak)
- Microwave oven: -65 dBm (when running)
- Signal-to-Noise: 23 dB (good)

Channel 15 (2.425 GHz):
- Background noise: -95 dBm
- Wi-Fi Ch 6 spillover: -75 dBm (moderate)
- Signal-to-Noise: 20 dB (marginal)

Recommendation:

Primary: Channel 25 Backup: Channel 26 Avoid: Channels 11-14 (Wi-Fi Ch 1), 16-19 (Wi-Fi Ch 6), 21-24 (Wi-Fi Ch 11)

Rationale:

  • Channel 25 provides best balance: above all Wi-Fi channels, good SNR even with microwave interference
  • Channel 26 is viable alternative but slightly more microwave impact
  • Channel 15 is marginal (Wi-Fi Ch 6 edge) – use only if 25/26 unusable

Result: Configuring Zigbee network on channel 25 achieves <0.5% packet error rate in field testing (50-device deployment, 3-month trial). No interference from Wi-Fi channels 1/6/11. Microwave oven usage during lunch causes brief 5-10% PER for 1-3 minutes, acceptable for sensor network with retry mechanisms.

Key Insight: In dense Wi-Fi environments, Zigbee channels 25-26 are the only reliable choices when Wi-Fi uses the standard 1/6/11 configuration. Some Zigbee products default to channel 15 or 20 for historical reasons – these should be manually changed to 25 during installation to avoid 2-5% packet loss from Wi-Fi interference. Always verify channel selection with a spectrum analyzer or packet capture during site survey.

29.3.4 Exercise 4: Battery Life Calculation

Objective: Calculate expected battery life for a Zigbee sensor.

Scenario: Temperature sensor specifications: - Battery: CR2450 (620 mAh) - Reporting interval: 5 minutes - Active current: 20 mA for 10ms transmission - Sleep current: 5 µA - Parent poll interval: 30 seconds, 15ms at 18mA

Tasks:

  1. Calculate daily energy consumption
  2. Estimate battery life in years
  3. Identify the dominant power consumer
  4. Propose optimization to extend battery life

Daily Energy Calculation:

Transmissions: 24 hours × 12/hour = 288 transmissions
TX energy: 288 × 10ms × 20mA = 57.6 mAs = 0.016 mAh/day

Polls: 24 hours × 120/hour = 2,880 polls
Poll energy: 2,880 × 15ms × 18mA = 777.6 mAs = 0.216 mAh/day

Sleep: ~86,400 seconds × 5µA = 432,000 µAs ÷ 3,600 = 0.120 mAh/day

Total: 0.016 + 0.216 + 0.120 = 0.352 mAh/day

Battery Life:

620 mAh / 0.352 mAh/day = 1,761 days = 4.8 years

Parent polling dominates Zigbee end device power consumption. Total daily energy: \(E_{total} = E_{tx} + E_{poll} + E_{sleep}\). With \(n_{tx}=288\) transmissions/day, \(t_{tx}=10\) ms, \(I_{tx}=20\) mA: \(E_{tx} = 288 \times 0.01s \times 0.02A = 0.0576\) As = \(0.016\) mAh. For \(n_{poll}=2{,}880\) polls, \(t_{poll}=15\) ms, \(I_{poll}=18\) mA: \(E_{poll} = 2{,}880 \times 0.015s \times 0.018A = 0.7776\) As = \(0.216\) mAh. Sleep: \(86{,}400s \times 5\mu A = 432{,}000\;\mu As \div 3{,}600 = 0.120\) mAh. Worked example: Polling contributes \(0.216/(0.016+0.216+0.120) = 61.4\%\) of total energy. Battery life with 620 mAh capacity: \(T = 620/0.352 = 1{,}761\) days \(\approx 4.8\) years. Doubling poll interval to 60s: \(n_{poll}=1{,}440\), \(E_{poll}=0.108\) mAh, \(E_{total}=0.244\) mAh/day, giving \(T = 620/0.244 = 2{,}541\) days \(\approx 7.0\) years, a \(44\%\) battery life increase.

Dominant Consumer: Parent polling (61% of consumption)

Optimization: Increase poll interval from 30s to 60s: - Polls: 1,440/day - Poll energy: 0.108 mAh/day - New total: 0.244 mAh/day - New battery life: 7.0 years

Adjust the parameters below to explore how reporting interval, poll interval, and sleep current affect battery life.

29.3.5 Exercise 5: Security Deployment

Objective: Plan a secure Zigbee deployment.

Scenario: Commercial office with 50 sensors. Requirements: - High security (sensitive data) - No default keys - Auditable device management

Tasks:

  1. Choose commissioning method and justify
  2. Describe secure joining procedure
  3. Plan key backup strategy
  4. Design monitoring/alerting approach

Commissioning Method: Install Codes (High Security) - Each device has unique pre-shared secret - No default keys used over-the-air - Per-device authentication

Secure Joining Procedure:

1. Verify Permit Join is CLOSED
2. Enter device Install Code into Coordinator
3. Open Permit Join for 60 seconds
4. Activate device pairing mode
5. Verify correct device joined (check MAC)
6. Close Permit Join
7. Log join event with timestamp and admin

Key Backup Strategy:

Backup items:
- Network Key (encrypted, HSM if available)
- PAN ID and Extended PAN ID
- Device table export
- Install Code documentation

Storage:
- Encrypted backup file
- Offsite secure storage
- Access limited to 2+ admins
- Test restoration quarterly

Monitoring/Alerting:

Monitor:
- Unauthorized join attempts
- Device offline events
- High retry rates (interference)
- Frame counter anomalies (replay attempts)

Alert thresholds:
- Join attempt when Permit Join closed → Immediate alert
- Device offline > 1 hour → Warning
- > 5% packet loss → Investigate

Sammy the Sensor is ready for a challenge: “It’s quiz time! Let’s test what we’ve learned about Zigbee!”

Max the Microcontroller sets up the first puzzle: “Imagine you’re designing a smart home with 30 devices. How many should be Routers? Where should you place the Coordinator? What channel avoids your Wi-Fi?”

Lila the LED adds: “And don’t forget troubleshooting! What do you do when a device won’t join? Or when messages keep getting lost? Being a good engineer means solving mysteries!”

Bella the Battery encourages: “Don’t worry if you don’t get everything right the first time. Each question teaches you something new. Think about what you learned in the earlier chapters and apply it here!”

Key ideas for kids:

  • Network design = Planning where to put devices for the best coverage
  • Troubleshooting = Being a detective to find and fix problems
  • Channel selection = Picking the right radio frequency to avoid interference
  • Device roles = Deciding which devices should be Coordinators, Routers, or End Devices
How It Works: Zigbee AODV Route Discovery

When an End Device needs to send data to the Coordinator for the first time, here’s how it discovers the route:

  1. RREQ Broadcast: Source broadcasts Route Request (RREQ) with destination address
  2. Flooding: Intermediate routers forward RREQ, incrementing hop count
  3. Reverse Path: Each router records “source is N hops via previous sender”
  4. Destination Reached: Coordinator receives RREQ, now knows path back to source
  5. RREP Unicast: Coordinator sends Route Reply (RREP) back along recorded path
  6. Route Establishment: Each router on path stores “destination is M hops via next hop”
  7. Data Flow: Source can now send data packets using the established route

Self-healing: If a router fails (no MAC ACK after 3 retries), the sender broadcasts a new RREQ to discover an alternate path. Convergence typically takes 1-5 seconds.

29.4 Concept Relationships

Concept Relationship to Exercises Learning Objective
Device Roles Coordinator/Router/End Device classification Exercise 1: Smart home topology
Wi-Fi Coexistence Channel overlap analysis Exercise 2: 2.4 GHz spectrum planning
AODV Routing On-demand route discovery Exercise 3: Path establishment simulation
Battery Life Sleep mode optimization Exercise 4: Power budget calculation
Trust Center Security Key distribution & authentication Exercise 5: Secure commissioning design

29.5 See Also

Common Pitfalls

Zigbee exercises covering packet analysis, network formation, and binding appear theoretical but build the diagnostic skills needed for real deployment troubleshooting. Do not skip exercises even when the concepts seem already understood.

Zigbee exercises generating packet captures are most valuable when the captures are analyzed post-exercise. Save all packet captures with exercise notes for later review and comparison across exercises.

Single-device exercises miss mesh networking behaviors. Always include at least 3–4 devices in exercises to observe routing decisions, path selection, and recovery behaviors.

29.6 Summary

These exercises covered practical Zigbee scenarios:

  • Network Design: Device role classification, topology planning
  • Wi-Fi Coexistence: Channel selection, interference mitigation
  • AODV Routing: Route discovery, self-healing
  • Power Management: Battery life calculation, optimization
  • Security: Commissioning, key management, monitoring

Use these exercises to prepare for real-world Zigbee deployments. The concepts apply whether you’re deploying a small smart home or a large commercial installation.

29.7 Knowledge Check

29.8 What’s Next

Chapter Focus
Zigbee Common Mistakes Frequent deployment errors and real-world troubleshooting strategies
Zigbee Industrial Deployment Scaling Zigbee to large commercial and industrial installations
Zigbee Hands-On Lab Guided practical lab exercises with simulated Zigbee hardware
Zigbee Security Trust Center key management, Install Code commissioning, and frame counters
Zigbee Routing AODV protocol mechanics, many-to-one routing, and source routing details