Common 802.15.4 MAC Processes#
ACK Process#
If a device sends a data or command frame with the ACK request bit set, the device which receives it should respond with an ACK frame. The ACK frame includes the same sequence number as the frame that it responds to. ACK frames only include FCF, sequence number, and FCS from the MAC fields, and have no payload. This means that the PSDU of an ACK frame is five bytes.
Data Polling Process#
A device can poll messages from another device. Typically, an end device that normally does not have the radio enabled would poll a coordinator. This process starts with the end device sending a data request command to the coordinator. The coordinator responds with an ACK with the frame pending bit set in the FCF. The end device must then wait for the next frame (or a timeout) with its radio on which the coordinator will send.
Association Process#
To join a network, a device should go through an association process. The process can be described as in the following table (where "E" (end device) would like to join to "C" (PAN coordinator)). All the command frames above are MAC command frames.
Step | Direction | Frame Type | Source Address | Destination Address | PAN Addressing | Other Fields |
---|---|---|---|---|---|---|
1 | E → C | Beacon request command | — | broadcast | broadcast destination | — |
2 | C → E | Beacon | short | — | source specified | Superframe specification (1) |
3 | E → C | Association request command | long | short | destination specified | Capability information (2) |
4 | C → E | Acknowledgement | — | — | — | — |
5 | E → C | Data request command | long | short | intra-pan | — |
6 | C → E | Acknowledgement | — | — | — | Frame pending bit set |
7 | C → E | Association request command | long | short | intra-pan | Given short address and status (3) |
8 | E → C | Acknowledgement | — | — | — | — |
Notes:
(1) Superframe specification lets E know that C is a PAN coordinator and if it permits joining (among other things).
(2) Capability info tells the coordinator how to handle the new device. For example, does it need a short address assigned to it, does it have the radio on when in idle, and so on.
(3) The association response includes a status (that is, success or reason of failure) and the assigned short address. If a short address was not assigned, it is set to the special 0xfffe address. After association, E can communicate with its short address in the PAN. If E did not request a short address, it can still communicate within the PAN using its long address.