Understanding Zigbee MAC Layer Frames

zigbee
mac layer
frame format
data frame
protocol

As mentioned in the Zigbee protocol stack, the Zigbee MAC layer frame is composed of a MAC header, MAC payload, and FCS (Frame Check Sequence). The diagram below depicts the generic MAC frame format adopted in Zigbee technology at the MAC layer. This part is also referred to as MPDU (MAC Protocol Data Unit). This gets embedded into the PPDU (Physical Protocol Data Unit) frame of Zigbee.

Generic MAC Frame Format

Octets:210/20/2/80/20/2/8Var2
Frame controlSequence numberDestination PAN IDDestination AddressSource PAN IDSource AddressFrame PayloadFCS
MHRMAC PayloadMFR
Addressing fields

The generic MAC layer frame has a frame control field of 2 octets. It carries useful information such as frame type, source and destination addressing modes. Frame type specifies whether the frame is a beacon frame, data frame, ACK of data, MAC command frame, etc. The same is outlined in the ‘Frame type subfield’ table below with 3 bits.

Frame Control Field

Bits:0-234567-910-1112-1314-15
Frame typeSecurity enabledFrame pendingAck. RequestIntra PANReservedDest. Addressing modeReservedSource Addressing mode

Frame Type Subfield

Frame type value (b2,b1,b0)Description
000Beacon frame
001Data frame
010Acknowledgement
011MAC command
100-111Reserved

As shown below, the beacon frame carries the frame control field and addressing fields along with the sequence number. It is broadcasted to obtain the PAN ID of nearby Zigbee devices.

Beacon Frame Format

Octets:214/102varvarvar2
Frame controlSequence numberAddressing fieldsSuperframe specificationGTS fieldsPending address fieldsBeacon payloadFCS
MHRMAC PayloadMFR

Once a connection is established, the data frame carries data. The format of the data frame is similar to the generic MAC frame format and is shown in the table below.

Data Frame Format

Octets:21Section 7.2.2.2.1 IEEE 802.15.4Variable2
Frame controlSequence numberAddressing fieldsData PayloadFCS
MHRMAC PayloadMFR

Acknowledgement Frame Format

Octets:212
Frame controlSequence numberFCS
MHRMFR

MAC Command Frame Format

Octets:21Section 7.2.2.4.1 IEEE 802.15.41Variable2
Frame controlSequence numberAddressing fieldsCommand Frame IdentifierCommand PayloadFCS
MHRMAC PayloadMFR

Zigbee protocol supports different command frames for different use cases as mentioned below in the table.

MAC Command Frames

Command Frame IDCommand frame
0x01Association request (Tx)
0x02Association response (Rx)
0x03Disassociation notification (Tx,Rx)
0x04Data request (Tx)
0x05PAN ID conflict notification (Tx)
0x06Orphan notification (Tx)
0x07Beacon request (Tx)
0x08Coordinator realignment (Rx)
0x09GTS Request
0x0a-0xFFReserved

Zigbee Interview Questions and Answers

Prepare for your Zigbee interview with this comprehensive guide. Covers key topics like network architecture, protocols, and comparisons with WiFi.

zigbee
interview
wireless
Understanding SigFox Protocol Stack Layers

Understanding SigFox Protocol Stack Layers

Explore the SigFox protocol stack architecture, including RF, PHY, MAC, and Application layers, and their roles in efficient IoT communication within the SigFox network.

sigfox
protocol
iot
Zigbee AODV Protocol Basics

Zigbee AODV Protocol Basics

An overview of the Zigbee AODV routing protocol, including address discovery, route discovery, broadcast transmissions, unicast transmissions, and the AODV algorithm.

zigbee
aodv
routing

Zigbee Physical Layer Frame Format (PPDU)

Explore the Zigbee physical layer frame format, focusing on the components of the PPDU, including the preamble, SFD, frame length, and PSDU.

zigbee
physical layer
frame format