Every frame that is received has, as we know, a header prepended. This page documents the format of said header.
RX frame format
When a frame is received (via DMA), it has one of the two following structures:
Type 1 |
Bytes |
0-29 |
30-36 |
37-... |
4 last bytes |
Contents |
RX header |
PLCP header |
payload |
FCS |
Type 2 |
Bytes |
0-29 |
30/31 |
32-38 |
39-... |
4 last bytes |
Contents |
RX header |
unknown |
PLCP header |
payload |
FCS |
When receiving via PIO, the RX header has to be built manually by receiving 20 bytes from the PIO queue and storing them into the 30 byte area starting at offset 2, the length is not sent explicitly.
Everything from byte 30 on (in both types) is then part of the rest of the data.
RX header format
The RX header consists of 16-bit values in little endian. The following table lists the meaning of each such value.
Index |
Meaning |
0 |
frame length, not including the RX header length |
2 |
flags1 |
3 |
unsigned lower byte RSSI (see RSSIProcessing)/upper byte signal quality (cf. prism monitor mode) |
4 |
PHY info 2 |
5 |
flags3 |
6 |
flags2 |
7 |
MAC time |
8 |
RX Channel |
The meaning of the other fields is not known (yet).
flags1
Bit |
15 |
14 |
13-8 |
7 |
6-4 |
3 |
2-1 |
0 |
Meaning |
|
2053 Radio RSSI adjustment |
|
frame received with short preamble |
|
related to signal? |
|
received with ERP-OFDM/OFDM modulation |
flags2
Bit |
15-5 |
4-3 |
2 |
1 |
0 |
Meaning |
|
WEP related |
Type 2 frame |
|
frame invalid |
flags3
Bit |
15-11 |
10 |
9 - 0 |
Meaning |
|
2050 Radio RSSI adjustment |
|
PHY info 2
Mask |
Meaning |
0xC000 |
LNA gain |
MAC time
Lower 16 bits of the TSF at the time the frame started.
RX Channel
Mask |
Meaning |
0xFFF8 |
Unknown |
0x0007 |
PHY Type |