Frame Format#
IEEE 802.15.4 specifies every field in the frame that are used in Silicon Labs Connect as Least Significant Bit (LSB) first.
Physical Protocol Data Unit (PPDU)#
SHR: Synchronization Header
Preamble: Required for bit synchronization (clock recovery) on the receiver.
SFD: Start of Frame Delimiter (often called sync word)—required for byte synchronization on the receiver.
PHR: Physical Header
Frame Length: the length of the PSDU, because it is 7 bits, this limits the PSDU size to be a maximum of 127 bytes.
Connect also has limited support for the PHR defined by IEEE 802.15.4 for SUN-OFDM and SUN-FSK PHYs. However, these are only supported with configurations from the Connect OFDM profile and the SUN-FSK PHYs under the Connect profile.
SUN-FSK dynamic features are not supported. It always uses whitening and the 4 Byte FCS.
SUN-OFDM allows configuration of the MCS (Modulation Coding Scheme) via the
emberSetMacParams()
API.
PHY Payload
PSDU (Physical Service Data Unit): The payload of the PPDU.
MAC Protocol Data Unit (MPDU)#
MHR: MAC Header
Frame Control Field (FCF): see Frame Control Field below.
Sequence Number: sequentially increasing number, used to pair ACK frames with normal frames.
Addressing fields
Aux. Security header: see MAC Security below.
MAC payload: the payload of the Medium Access Control Protocol Data Unit (MPDU).
MFR (MAC footer): has a single field—Frame Check Sequence (FCS), which is a 2-byte Cyclic Redundancy Check (CRC) of the MHR and the payload.
Frame Control Field#
Frame Type: Sets the frame type to one of these:
0 – Beacon. used to advertise a PAN
1 – Data. data used by an upper layer
2 – Acknowledgement (ACK)
3 – MAC Command which is the frame intended for the MAC layer (for example, part of the join process
Security Enabled: the Auxiliary Security Header is enabled when this bit is set to 1.
Frame Pending: used for data polling.
Acknowledgement Request (AR): frame should be ACKed by the receiver.
Addressing modes: As the table above shows, IEEE 802.15.4 frames are both source and destination addressed. However, both fields can be configured for various addressing modes:
0 – no address. For example, both addresses are missing from ACK frames. For data and command frames only one (either source or destination) field can be omitted: If the source address is omitted, it means the PAN coordinator sent the frame. If the destination address is missing, it means it should be received by the PAN coordinator.
2 – short address: The address field includes a short address and a PAN ID (total of 32 bits).
3 – long address: The address field includes a long address and a PAN ID (total of 80 bits).
PAN ID Compression: If both source and destination addresses are present and the PAN ID is the same for both (intra-PAN message), this bit should be set and the source PAN ID should be omitted. This shortens the addressing fields for short-addressed intra-PAN messages to 48 bits (one 16-bit source address, one 16-bit destination address, and one 16-bit PAN ID).
Frame Version: Selects the frame version for compatibility with other versions of IEEE 802.15.4.
MAC Security#
IEEE 802.15.4 supports the following security services:
Data confidentiality
Data authenticity
Replay attack protection
The Auxiliary Security Header can have various arrangements, depending on the security and key setup available. However, with Silicon Labs Connect, when security is enabled it:
Always uses a 128-bit key, which was set by the application (that is, there is no IEEE 802.15.4 key identifier field).
Uses all three of the above services.
This means that the Auxiliary Security Header is five bytes long as in the following figure:
Only the lowest three bits are used from Security Control, which selects the security mode (always 5).
The Frame Counter is a counter on each device that enables replay protection: The counter is part of the authenticated data (that is, MIC is calculated over it) and a receiver should not accept frames with the same/lower The Frame Counter must be valid even if the device reboots.
To guarantee data authenticity, a 4-byte MIC will be added at the end of the MAC payload (before the FCS). In the security mode supported by Silicon Labs Connect, the security headers and footers use nine bytes of the MAC payload.