802.15.4 Protocol Workbench

Connect MAC frame size, channel access, airtime, beacon timing, and GTS capacity in one visual path

animation
802.15.4
mac-layer
protocols
wsn
interactive
Interactive IEEE 802.15.4 protocol workbench showing frame construction, addressing overhead, CSMA-CA access, PHY airtime, beacon superframe timing, GTS allocation limits, formulas, and quick reference material.

802.15.4 Protocol Workbench

IEEE 802.15.4 MAC + PHY Frame path Beacon mode

802.15.4 protocol workbench

Build one MAC transaction and watch how byte overhead, CSMA-CA access, PHY airtime, beacon timing, and GTS reservations change the same packet journey.

0 B MAC frame size against the 127-byte PSDU limit
0 ms Approximate 2.4 GHz PHY burst airtime
0 ms Active superframe duration from SO
Ready Frame, CAP, and GTS checks
Layer 802.15.4 is the low-power MAC and PHY layer.

Zigbee, Thread, and 6LoWPAN build on top of it, but the radio frame, channel access, ACK, and beacon timing are handled here.

Frame The 127-byte PSDU limit is tight.

Addressing, sequence, security, payload, and FCS all compete for the same MAC frame budget.

Access Most data waits for channel access first.

CSMA-CA tries random backoff and clear channel assessment. A GTS skips contention only during its assigned CFP slot.

Timing Beacon mode turns time into 16 active slots.

BO sets beacon interval, SO sets active duration, and GTS reservations take capacity from the end of the active superframe.

Scenario
Playback
Frame builder
36 bytes
Channel access CSMA-CA mode
Superframe and GTS
BO 5
SO 3
1 descriptor
1 slot

Frame fields

The MAC frame is assembled before the device can attempt channel access.

Stage 1 of 6
802.15.4 protocol path animation A packet is assembled, waits for channel access, transmits to a coordinator, and is placed into a beacon superframe with GTS capacity checks.
Frame bytes CSMA-CA access GTS / CFP Limiting condition
Frame: 0 B MAC PSDU budget check.
CSMA: idle NB, BE, and CCA outcome.
Beacon: BO 5 / SO 3 Active and inactive timing.
GTS: 0 slots Descriptor and CAP fit check.
PSDU 0 bytes left

802.15.4 MAC frames must fit inside 127 bytes, including the FCS.

ACK ACK enabled

A short ACK helps reliability but adds turnaround and a second PHY burst.

Duty 0%

Duty cycle is active superframe duration divided by beacon interval.

CAP 0 CAP slots

GTS allocations cannot shrink CAP below the minimum CAP length.

Watch Addressing changes payload room.

Extended addresses are useful before association, but two extended addresses consume 16 address bytes before PAN IDs are counted.

Watch Security is not free.

This teaching model adds a 5-byte auxiliary security header and 4-byte MIC; other security levels can use different MIC sizes.

Watch CSMA-CA is a shared-medium compromise.

Backoff reduces collisions but does not guarantee latency. ACK loss still causes a retry even if the first transmission was heard.

Watch GTS creates determinism by reserving time.

Reserved CFP slots help periodic control traffic, but they reduce time available for ordinary CAP traffic.

Formula trace

MAC frame budget MHR + payload + FCS <= 127 B Current frame fits.
2.4 GHz PHY burst (PSDU + 6 PHY B) * 8 / 250 kbps Airtime includes preamble, SFD, and PHR.
Beacon timing BI = 960 * 2^BO symbols Active duration uses SO; symbol time is 16 us at 2.4 GHz.
GTS capacity min CAP slots = ceil(440 / slotSymbols) GTS must also respect the 7-descriptor limit.
Frame fields and byte limits

The MAC PSDU limit is 127 bytes. This includes MAC header fields, MAC payload, security overhead when used, and the 2-byte FCS.

  • Legacy ACK is 5 bytes: Frame Control, Sequence Number, and FCS.
  • Short address is 2 bytes; extended address is 8 bytes.
  • PAN ID compression saves one repeated 2-byte PAN ID when source and destination share a PAN.
CSMA-CA rules shown here

The workbench shows a teaching model of 802.15.4 CSMA-CA rather than a random live radio trace.

  • NB starts at 0 and BE starts at macMinBE, usually 3.
  • Unslotted CSMA-CA uses random backoff then one CCA attempt.
  • Slotted CSMA-CA aligns to backoff periods and needs CW = 2 idle CCAs before transmission.
Beacon, CAP, CFP, and GTS

Beacon-enabled mode divides the active superframe into 16 slots. CAP comes first; GTS allocations sit in the CFP at the end.

  • Base superframe duration is 960 symbols.
  • Each slot is 60 * 2^SO symbols.
  • GTS allocation is limited by a maximum of 7 descriptors and the minimum CAP length of 440 symbols.