Zigbee, Thread & Matter · Study deck

Zigbee Protocol Stack

A wall switch sends an On command and receives a radio acknowledgement, yet the lamp stays dark.

Radio Remi is your guide for this deck.

zigbeeprotocol-stacknetwork-layer
Radio Remi, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: Beacon-enabled slotted CSMA/CA aligns the process to superframe backoff boundaries and uses a contention-window check before transmission; do not apply unslotted timing numbers to a beacon capture.
  • Explain: It then names the deployment boundary, records just enough lower-layer evidence to support or clear each layer, and avoids using one successful observation as proof for unrelated behaviors.
  • Explain: At 2.4 GHz, the IEEE 802.15.4 PHY maps each four-bit data symbol to a 32-chip direct-sequence pattern and transmits chips using O-QPSK.
  • Explain: and four bits per symbol gives.
iotclass.org

Major section

Start With the Mesh Job · Overview: What the Zigbee Stack Separates

The lamp may be joined to the mesh yet still ignore the command.

  • A useful review keeps radio delivery, route choice, service delivery, and the meaning of "turn on" as separate claims.
  • A protocol means agreed rules for exchanging messages.
  • APS evidence explains endpoints, binding, groups, and service delivery.

Key terms

IEEE 802.15.4
IEEE 802.15.4 is the local radio and frame foundation used here.
Zigbee
Zigbee is a system built above it for forming the network, routing, discovery, and application behavior.

Why it matters

The stack is useful only when it prevents overclaiming.

iotclass.org

Major section

Stack and Superframe Walkthroughs

The: EVIDENCE rail keeps command, route, and frame proof distinct.

  • APS, ZDO, and ZCL Application evidence covers endpoints, binding, groups, discovery, clusters, attributes, commands, reports, and response behavior.
  • Operations Operations evidence names the owner, logs, gateway mapping, firmware boundary, support workflow, known gaps, and retest trigger.
Zigbee stack with application, APS and ZDO, network, MAC, and PHY jobs beside a five-item evidence rail.
Zigbee stack with application, APS and ZDO, network, MAC, and PHY jobs beside a five-item evidence rail.
iotclass.org

Major section

Practitioner: Build the Stack Evidence Record

Firmware, coordinator replacement, gateway update, binding change, route movement, endpoint revision, cluster behavior, and application mapping can all invalidate different parts of the stack evidence.

  • A practical stack record starts from the symptom or approval claim.
  • The record should be specific enough that support can tell what changed.
  • The safest decision is narrow.
iotclass.org

Major section

Practitioner: Build the Stack Evidence Record (continued)

It then names the deployment boundary, records just enough lower-layer evidence to support or clear each layer, and avoids using one successful observation as proof for unrelated behaviors.

  • "The radio worked once, so every command path is approved.".
  • Coordinator or Trust Center custody, join state, parent, route, address scope, rejoin behavior, and path-change evidence.
  • "The inventory has a device name, so routing and recovery are proven.".
iotclass.org

Major section

Practitioner: Build the Stack Evidence Record (continued)

"Network delivery means the application target was correct.".

  • "The protocol label is enough for future support.".
  • Worked Review: Reachable Device, Missing Behavior A device joins successfully, reports presence, and appears in a coordinator inventory.
  • A controller command still does not change the expected device behavior.
iotclass.org

Major section

Under the Hood: Handoffs, Owners, and Retest Triggers

Link evidence becomes network evidence only after joining and path behavior are proven.

  • Network evidence becomes application evidence only after endpoint and service delivery are proven.
  • Application evidence becomes product evidence only after cluster behavior, gateway interpretation, and operations ownership are recorded.
  • This separation keeps a diagnosis from jumping to the wrong fix.
iotclass.org

Major section

Under the Hood: Handoffs, Owners, and Retest Triggers (continued)

Replacing an antenna will not repair a wrong endpoint.

  • Changing a binding table will not fix a weak installed path.
  • Updating a gateway can invalidate a controller mapping even when native Zigbee traffic is healthy.
  • The device can exchange frames and move into Zigbee network behavior under tested conditions.
iotclass.org

Major section

Under the Hood: Handoffs, Owners, and Retest Triggers (continued)

Channel, antenna, enclosure, placement, interference, router position, or firmware change.

  • The joined device can use a supportable network path toward a service endpoint.
  • Parent change, route change, coordinator replacement, permit-join change, binding change, or group change.
  • The endpoint, discovery, cluster, command, attribute, report, and response evidence match the reviewed behavior.
iotclass.org

Major section

Under the Hood: Handoffs, Owners, and Retest Triggers (continued)

Gateway update, bridge replacement, app rule change, security custody change, or support-owner change.

  • That every gateway, app, automation, or future firmware will preserve the same meaning.
  • Endpoint revision, cluster behavior change, attribute reporting change, firmware update, or command mapping change.
  • If only native Zigbee was proven, say bridge behavior still needs evidence.
iotclass.org

Major section

Under the Hood: Handoffs, Owners, and Retest Triggers (continued)

The protocol behavior has a named owner, diagnostic record, known scope, and supportable retest path.

  • That untested device types, rooms, bridges, controller apps, or future ownership changes inherit the approval.
  • Diagnosis Pattern Preserve the symptom.: Record what failed, the device state, current parent or route evidence, endpoint target, gateway path, and recent changes.
  • Clear only the necessary lower layer.: If command meaning is wrong, preserve join and path evidence, then inspect APS and ZCL before blaming RF.
iotclass.org

Major section

IEEE 802.15.4 DSSS and Beacon-Superframe Mechanics

At 2.4 GHz, the IEEE 802.15.4 PHY maps each four-bit data symbol to a 32-chip direct-sequence pattern and transmits chips using O-QPSK.

  • The chip rate is 2 Mchip/s, so.
  • and four bits per symbol gives.
  • An acknowledgement is optional per data frame.

Key terms

If the channel
If the channel is idle, transmit the frame.

Numbers to remember

2.4 GHzFor the 2.4 GHz PHY, the base duration is 960 symbols

Why it matters

This random delay reduces repeated collisions among devices that became ready together.

iotclass.org

Major section

IEEE 802.15.4 DSSS and Beacon-Superframe Mechanics (continued)

Logs should preserve CCA failures, transmissions, missing ACKs, and retry exhaustion separately.

  • Spreading does not make interference disappear; it gives the detector processing structure and resilience to limited chip errors.
  • Beacon-enabled slotted CSMA/CA aligns the process to superframe backoff boundaries and uses a contention-window check before transmission; do not apply unslotted timing numbers to a beacon capture.
  • The active superframe contains 16 equal slots.
iotclass.org

Major section

IEEE 802.15.4 DSSS and Beacon-Superframe Mechanics (continued)

When the ACK-request bit is set, the sender waits for the short MAC ACK and may retry if it does not arrive.

  • Channel-access backoffs and frame retries are different counters: a clear channel followed by a lost frame is not a CCA failure.
  • The beacon starts the active period.
  • A contention access period (CAP) follows, where devices use slotted CSMA/CA.
iotclass.org

Major section

IEEE 802.15.4 DSSS and Beacon-Superframe Mechanics (continued)

An optional contention-free period (CFP) follows the CAP and contains Guaranteed Time Slots allocated by the PAN coordinator; at most seven GTS descriptors may be allocated.

  • If $SO<BO$, an inactive interval follows, allowing sleepy devices and the coordinator--if its application permits--to reduce power.
  • Each active slot is $SD/16=7.68$ ms in this example.
  • The CAP must also retain enough room for management and contention traffic.
iotclass.org

Major section

Separate a Clear Channel from a Completed Lamp Command · Summary

A valid frame does not prove the correct endpoint acted.

  • For a timing calculation, use the chapter's beacon-enabled example with beacon order 6 and superframe order 3.
  • The beacon interval is 983.04 ms and the active period is 122.88 ms.

Numbers to remember

983.04 msThe beacon interval is 983.04 ms
122.88 msthe active period is 122.88 ms.

Why it matters

This module's layered review prevents a mesh join or good signal level from standing in for useful lighting control.

Zigbee stack with application, APS and ZDO, network, MAC, and PHY jobs beside a five-item evidence rail.
Zigbee stack with application, APS and ZDO, network, MAC, and PHY jobs beside a five-item evidence rail.
iotclass.org

Deck summary

Key takeaways

The lamp may be joined to the mesh yet still ignore the command.

  • The: EVIDENCE rail keeps command, route, and frame proof distinct.
  • Firmware, coordinator replacement, gateway update, binding change, route movement, endpoint revision, cluster behavior, and application mapping can all invalidate different parts of the stack evidence.
  • It then names the deployment boundary, records just enough lower-layer evidence to support or clear each layer, and avoids using one successful observation as proof for unrelated behaviors.
  • "Network delivery means the application target was correct.".
iotclass.org

Retrieval practice

Recall check 1 of 3

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

Q1A Zigbee device joins the intended network and appears in the coordinator inventory, but a command does not produce the expected behavior. What should the reviewer do first?

ASeparate network reachability from APS endpoint, binding, group, ZDO discovery, and ZCL command evidence before assigning the fault.
BStart with antenna placement and channel measurements, because Zigbee command failures are traced from PHY and MAC upward.
CApprove the command anyway, because a device that joins and appears in the coordinator inventory has proven the full stack.
DClose the protocol-stack review and hand the fault to the application vendor, because command behavior sits outside Zigbee evidence.
Show answer

Answer: A Join and inventory evidence support a lower-layer claim, but the command behavior needs application-layer evidence.

iotclass.org

Retrieval practice

Recall check 2 of 3

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

Q2A stack record proves join state and a valid route, but it does not show endpoint, binding, cluster-command, or response evidence. What is the correct release decision for a command behavior?

AAccept the network reachability evidence, but keep the command behavior unapproved until APS and ZCL evidence is recorded.
BApprove the command behavior, because a proven route means APS delivery and cluster handling have already been exercised.
CRepeat the join and route tests first, so the review contains a fresh network baseline before collecting command evidence.
DApprove the command once the gateway lists the matching cluster name, since discovery output is the strongest release evidence.
Show answer

Answer: A Lower-layer evidence can be valid while application behavior still needs endpoint, binding, cluster, command, and response proof.

iotclass.org

Retrieval practice

Recall check 3 of 3

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

Q3A Zigbee device remains joined and shows link activity, but after a gateway update the automation toggles the wrong behavior. Which boundary should be reviewed first?

AThe APS, ZCL, gateway-mapping, and controller-rule handoff, while preserving the already observed join and link evidence.
BThe PHY and MAC boundary, because interference or antenna faults remain the usual cause even when an automation misfires after an update.
CThe joining and address records, because a device-address change could leave the automation pointing at an outdated destination.
DNo boundary yet, because sustained link activity shows the stack still matches the record approved before the update.
Show answer

Answer: A The symptom changed at the application interpretation boundary, not necessarily at the radio or join boundary.

iotclass.org

Print reference

Answers

Answer key.

  1. A · Join and inventory evidence support a lower-layer claim, but the command behavior needs application-layer evidence.
  2. A · Lower-layer evidence can be valid while application behavior still needs endpoint, binding, cluster, command, and response proof.
  3. A · The symptom changed at the application interpretation boundary, not necessarily at the radio or join boundary.
iotclass.org