2311 views|0 replies

6609

Posts

0

Resources
The OP
 

ZigBee frame structure [Copy link]

The design principle of the IEEE 802.15.4/ZigBee frame structure is to minimize the complexity of the network while ensuring that the network can transmit with sufficient robustness on a noisy channel. Each subsequent protocol layer is formed by adding or stripping the frame header and frame trailer of the previous layer. The MAC layer of IEEE 802.15.4 defines four basic frame structures.
  • Beacon frame: used by the coordinator to transmit beacons.
  • Data frame: used to transmit data.
  • Response frame: used to confirm that the frame has been successfully received
  • MAC command frame: used to handle control transmissions of all MAC layer peer entities.
Beacon frame
The beacon frame MPDU is generated by the MAC sublayer. In the beacon network, the coordinator sends beacon frames to all slave devices in the network to ensure that these devices can synchronize with the coordinator (synchronous work and synchronous sleep) to achieve the lowest network power consumption (non-beacon mode only allows ZE to sleep periodically, and ZC and all ZRs must be in working state for a long time). Its frame structure is shown in the figure below. The beacon frame consists of three parts: MAC service data unit (MSDU), MAC header (MHR) and MAC tail (MFR). MSDU contains superframe field, unprocessed data address field, address list field, beacon payload field; MHR contains frame control field, beacon sequence number and addressing information field. MFR contains 16-bit frame check sequence.
When the MAC layer protocol data unit (MPDU) is sent to the physical layer (PHY), it becomes a physical layer service data unit (PSDU). If a physical layer frame header (PHR) is added in front of the PSDU, it can form a physical layer protocol data unit (PPDU). If a synchronization frame header (SHR) is added, this data packet becomes the data packet that is finally transmitted in the air.
MSDU = Superframe field + Processing data address field + Address list field + Beacon payload field
MHR = Frame control field + Beacon sequence number + Addressing information field
MFR = 16BIT frame check sequence FCS
MPDU = MHR + MSDU + MFR
MAC protocol data unit = MAC frame header + MAC service data unit + MAC frame trailer
PPDU = PHR + PSDU + PFR
Physical layer protocol data unit = physical layer frame header + physical layer data unit + physical layer frame trailer
The final data packet transmitted in the air = PPDU + synchronization frame header SHR
Data frame
The data frame is initiated by the high layer (application layer). When data is transmitted between ZigBee devices, the data to be transmitted is generated by the application layer, and is sent to the MAC layer after layer-by-layer data processing to form a MAC layer service data unit (MSDU). By adding the MAC layer frame header information and frame tail, a complete MAC data frame MPDU is formed, and its frame structure is shown in the figure below. The data payload transmitted to the MAC sublayer is called MSDU. Adding MHR in front of MSDU and MFR in the back constitutes a MAC data frame, that is, MPDU. Among them, MFR contains the frame control field, sequence number and addressing information field. MFR is composed of 16-bit FCS. After the MPDU is transmitted to the physical layer, it becomes the static payload of the physical layer data, namely the PSDU. The PSDU is preceded by the SHR and PHR to form the PPDU, where the SHR contains the preamble and SFD field; the PHR consists of the length value of the PSDU (expressed in bytes).
The application layer generates data to be transmitted -> layer-by-layer data processing -> MSDU -> add MHR, MFR -> MPDU -> PSDU -> add SHR, PHR -> PPDU
SHR = preamble sequence + SFD field
PHR = PSDU length value
Response frame
The response frame is initiated by the MAC sublayer. In order to ensure the reliability of communication between devices, the sending device usually requires the receiving device to return a response frame after receiving the correct frame information, indicating to the sending device that the corresponding information has been correctly received. The frame structure is shown in the figure below. The MAC sublayer response frame consists of MHR and MFR. MHR includes the MAC frame control field and data sequence number; MFR is formed by a 16-bit FCS group.
When the MPDU is transmitted to the physical layer, it forms the net load of the physical response frame, namely the PSDU. Adding SHR and PHR in front of the PSDU forms the PPDU. The SHR consists of the preamble sequence and the SFD field; the PHR consists of the length value field of the PSDU.
MAC command frame
The MAC command frame is initiated by the MAC sublayer. In the ZigBee network, in order to control the working status of the device and communicate with other devices in the network, the MAC layer will generate the corresponding command frame according to the command type. Its frame structure is shown in the figure below. The MSDU consists of the command class field and the command data field (command payload). Adding MHR in front of MSDU and MFR at the end forms a MAC command frame, also known as MPDU. Among them, MHR contains the MAC frame control field, data sequence number and addressing information field; MFR contains 16-bit FCS. Then MPDU is transmitted to the physical layer to form a physical layer command frame static payload, also known as PSDU. Adding SHR and PHR in front of PSDU forms a physical layer command frame, also known as PPDU. Among them, SHR contains the leading sequence (to ensure the synchronization of the receiver and the symbol) and the SFD field; PHR contains the length value of PSDU (expressed in bytes).
MSDU = Command type field + Data field (command payload)
MHR = MAC frame control field + Data sequence number + Addressing information field
MFR = 16bitFCS MPDU = MHR + MSDU + MFR
Super frame structure
The super frame structure is allowed in the LR-WPAN standard. The superframe format is defined by the coordinator. The superframe is sent by the coordinator and is limited by the network beacon (as shown in the figure below), and it is divided into 16 equally sized time slots. The first time slot of the superframe is used to transmit the beacon frame. If the coordinator does not want to use the superframe structure, it does not send a beacon. Beacons are used in the network for synchronization between devices, distinguishing PANs, and describing the superframe structure. Any device that wants to communicate during the contention access period (CAP) between two beacons must compete with other devices using the slotted collision-free carrier sense multiple access CSMA-CA mechanism, and all processing must be completed before the arrival of the next network beacon. The superframe has active and inactive parts (network sleep area and network active area). During the inactive part, the coordinator cannot communicate with the PAN and enters a low-power mode.
For applications with low latency or where a specific data bandwidth is required, the PAN coordinator can use a portion of the active superframe to implement it, which is called the Guaranteed Time Slot (GTS). The guaranteed time slot (there can be multiple) forms a non-contention period (CFP), which always appears after the CAP and before the active superframe. The PAN coordinator can allocate seven GTSs, and each GTS time is not less than one time slot. However, the valid part of the CAP should be reserved to enable other network devices and new devices based on contention to access the network. All contention-based transmissions should be completed before the start of the CFP, and each device working in the GTS period should ensure that its transmission is completed before the start of the next GTS and the end of the CFP. GTS: Guaranteed Time Slot: It is a part of the active superframe and is used to implement some special applications. CAP: Contention Access Period: Any device that wants to communicate at this time must use the CSMA-CA contention mechanism. CFP: Non-contention Period: It is composed of GTS and no contention is required during this period.63)] The LR-WPAN standard allows the use of superframe structure. The superframe format is defined by the coordinator. The superframe is sent by the coordinator and is limited by the network beacon (as shown in the figure below), and it is also divided into 16 equally sized time slots. The first time slot of the superframe is used to transmit the beacon frame. If the coordinator does not want to use the superframe structure, it does not send a beacon. Beacons are used in the network to synchronize devices, distinguish PANs, and describe the superframe structure. Any device that wants to communicate in the contention access period (CAP) between two beacons must compete with other devices using the slotted collision-free carrier sense multiple access CSMA-CA mechanism, and all transactions must be completed before the arrival of the next network beacon. The superframe has active and inactive parts (network dormant area and network active area). During the inactive part, the coordinator cannot communicate with the PAN and enters a low power mode.
For applications with low latency or where a specific data bandwidth is required, the PAN coordinator can be implemented using a portion of the active superframe, which is called the Guaranteed Time Slot (GTS). The guaranteed time slot (there can be multiple) forms a non-contention period (CFP), which always appears after the CAP and before the active superframe. The PAN coordinator can allocate seven GTSs, and each GTS time is not less than one time slot. However, the active part of the CAP should be reserved to allow other network devices and new devices based on contention to access the network. All contention-based transmissions should be completed before the start of the CFP, and each device working in the GTS period should ensure that its transmission is completed before the start of the next GTS and the end of the CFP. GTS: Guaranteed Time Slot: It is a part of the active superframe and is used to implement some special applications. CAP: Contention Access Period: Any device that wants to communicate at this time must use the CSMA-CA contention mechanism. CFP: Non-contention Period: It is composed of GTS and no contention is required during this period.63)] The LR-WPAN standard allows the use of superframe structure. The superframe format is defined by the coordinator. The superframe is sent by the coordinator and is limited by the network beacon (as shown in the figure below), and it is also divided into 16 equally sized time slots. The first time slot of the superframe is used to transmit the beacon frame. If the coordinator does not want to use the superframe structure, it does not send a beacon. Beacons are used in the network to synchronize devices, distinguish PANs, and describe the superframe structure. Any device that wants to communicate in the contention access period (CAP) between two beacons must compete with other devices using the slotted collision-free carrier sense multiple access CSMA-CA mechanism, and all transactions must be completed before the arrival of the next network beacon. The superframe has active and inactive parts (network dormant area and network active area). During the inactive part, the coordinator cannot communicate with the PAN and enters a low power mode.
For applications with low latency or where a specific data bandwidth is required, the PAN coordinator can be implemented using a portion of the active superframe, which is called the Guaranteed Time Slot (GTS). The guaranteed time slot (there can be multiple) forms a non-contention period (CFP), which always appears after the CAP and before the active superframe. The PAN coordinator can allocate seven GTSs, and each GTS time is not less than one time slot. However, the active part of the CAP should be reserved to allow other network devices and new devices based on contention to access the network. All contention-based transmissions should be completed before the start of the CFP, and each device working in the GTS period should ensure that its transmission is completed before the start of the next GTS and the end of the CFP. GTS: Guaranteed Time Slot: It is a part of the active superframe and is used to implement some special applications. CAP: Contention Access Period: Any device that wants to communicate at this time must use the CSMA-CA contention mechanism. CFP: Non-contention Period: It is composed of GTS and no contention is required during this period.
This post is from RF/Wirelessly
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

快速回复 返回顶部 Return list