IoT(Internet Of Things)
802.15.4 is one MAC over many PHYs. The standard defines several physical layers, and each one fits a different band, data rate or region. This page starts from the constants and the PIB attributes that the PHYs share. Then it lists the PHY models with their bands and data rates, compares their PPDU formats, and goes through the transmitter chain of each PHY. The MAC side is on the 802.15.4 MAC page.
- Physical Layer Constraints
- Physical Layer Attibutes
- PHY Model, Frequency, Data Rate
- PPDU, PHY Protocol Data Unit
- OQPSK PHY
- BPSK PHY
- ASK PHY
- CSS PHY
- UWB PHY
- GFSK PHY
Physical Layer Constraints
Let's start with the two numbers that every 802.15.4 PHY must respect, whatever its band or modulation. The MAC design depends on both of them, so they come before the PHY models.
Based on 802.15.4 Table 70—PHY constants
|
Item |
Description |
Value |
|
Max PHY Packet Size |
The maximum PSDU size the PHY shall be able to receive |
127 Octats |
Turnaround Time |
RX-to-TX or TX-to-RX turnaround time |
12 Symbol Periods |
The first constant sets the size of everything above the PHY. The constant aMaxPHYPacketSize is 127 octets, and it covers the whole PSDU. That is the complete MAC frame, including its header and its FCS. The frame length field in the PHR is 7 bits long, and 7 bits count exactly up to 127. So the limit comes directly from the size of that field.
The second constant, aTurnaroundTime, is 12 symbol periods. A device needs this time to switch its radio from receive to transmit, or back. The MAC needs this switch before it can send an acknowledgment, so the acknowledgment timing is built on this constant. In the 2450 MHz O-QPSK PHY one symbol lasts 16 microseconds, so 12 symbol periods are 192 microseconds.
Both constants are counted in octets or symbols, not in seconds. Their duration in time therefore changes from PHY to PHY, because each PHY has its own symbol rate.
127 octets comes from the 7 bit length field : the PSDU, and so the whole MAC frame, can never be longer.The turnaround time is 12 symbols : its duration in microseconds depends on the symbol rate of the PHY.
Physical Layer Attibutes
The constants above are fixed. The PHY PIB attributes below are variables, and the MAC reads or sets them through the PLME SAP. Many rows apply to one PHY only, so a device keeps only the attributes of the PHYs it implements.
Based on 802.15.4 Table 71—PHY PIB attributes
|
Item |
Description |
Value/Range |
|
Current Channel |
The RF channel to use for all following transmissions and receptions |
|
|
Channels Supported |
Each entry in the list consists of a channel page and a list of channel numbers supported for that channel page |
|
|
TX Power Tolerance |
The tolerance on the transmit power setting, plus or minus the indicated value. |
1 dB, 3 dB, 6 dB |
|
TXPower |
The transmit power of the device in dBm. |
|
|
CCA Mode |
The CCA mode |
1~6 |
|
Current Page |
This is the current PHY channel page. This is used in conjunction with phyCurrentChannel to uniquely identify the channel currently being used. |
|
|
Max Frame Duration |
The maximum number of symbols in a frame |
|
|
SHR Duration |
The duration of the synchronization header (SHR) in symbols for the current PHY |
|
|
Symbols Per Octet |
The number of symbols per octet for the current PHY |
0.4, 1.3, 1.6, 2,5.3, 8 |
|
Preamble Symbol Length |
Zero indicates preamble symbol length is 31, and one indicates that length 127 symbol is used. Present for UWB PHY |
0, 1 |
|
UWB Data Rates Supported |
A list of the data rates available in the operating channel |
|
|
CSS Low DataRate Supported |
TRUE indicates that 250 kb/s is supported. Present for CSS PHY |
TRUE, FALSE |
|
UWB CoU Supported |
TRUE if CoU pulses are supported, FALSE otherwise |
TRUE, FALSE |
|
UWB CS Supported† |
TRUE if CS pulses are supported, FALSE otherwise |
TRUE, FALSE |
|
UWB LCP Supported |
TRUE if LCP pulses are supported, FALSE otherwise |
TRUE, FALSE |
|
UWB Current Pulse Shape |
Indicates the current pulse shape setting of the UWB PHY |
MANDATORY, COU, CS, LCP |
|
UWB CoU pulse |
Defines the slope of the frequency chirp and bandwidth of pulse. CCh.3–CCh.6 are valid only for wideband UWB channels, e.g., 4, 7, 11, or 15, |
CCh.1, CCh.2, CCh.3, CCh.4,CCh.5, CCh.6 |
|
UWB CS pulse |
Defines the group delay of the continuous spectrum filter. No.3–No.6 are valid only for wideband UWB channels, e.g., 4, 7, 11, or 15 |
No.1, No.2, No.3, No.4, No.5, No.6 |
|
UWB LCP Weight1 |
The weights are represented in twos-complement form. A value of 0x80 represents –1 while a value of 0x7F represents 1 |
0x00–0xff |
|
UWB LCP Weight2 |
The weights are represented in twos-complement form. A value of 0x80 represents –1 while a value of 0x7F represents 1 |
0x00–0xff |
|
UWB LCP Weight3 |
The weights are represented in twos-complement form. A value of 0x80 represents –1 while a value of 0x7F represents 1 |
0x00–0xff |
|
UWB LCP Weight4 |
The weights are represented in twos-complement form. A value of 0x80 represents –1 while a value of 0x7F represents 1 |
0x00–0xff |
|
UWB LCP Delay2 |
The range is from 0 to 4 ns with a resolution is 4/255 = 15.625 ps. For example, a value of 0x00 represents 0 while 0x02 represents 31.25 ps |
0x00–0xff |
|
UWB LCP Delay3 |
The range is from 0 to 4 ns with a resolution is 4/255 = 15.625 ps. For example, a value of 0x00 represents 0 while 0x02 represents 31.25 ps |
0x00–0xff |
|
UWB LCP Delay4 |
The range is from 0 to 4 ns with a resolution is 4/255 = 15.625 ps. For example, a value of 0x00 represents 0 while 0x02 represents 31.25 ps |
0x00–0xff |
|
Ranging |
TRUE if ranging is supported, FALSE otherwise |
TRUE, FALSE |
|
Ranging Crystal Offset |
TRUE if crystal offset characterization is supported, FALSE otherwise |
TRUE, FALSE |
|
Ranging DPS |
TRUE if DPS is supported, FALSE otherwise |
TRUE, FALSE |
|
Current Code |
This value is zero for PHYs other than UWB or CSS. For UWB PHYs, this represents the current preamble code index in use by the transmitter. For the CSS PHY, the value indicates the subchirp, |
0~24 |
|
Native PRF |
For UWB PHYs, the native PRF. Zero is for non-UWB PHYs; one is for PRF of 4; two is for a PRF of 16; and three is for PHYs that have no preference. |
0~3 |
|
UWB Scan Bins Per Channel |
Number of frequency intervals used to scan each UWB channel (scan resolution). Set to zero for non-UWB PHYs |
0–255 |
|
UWB Inserted Preamble Interval |
The time interval between two neighboring inserted preamble symbols in the data portion, for UWB PHYs operating with CCA mode 6. The resolution is a data symbol duration at a data rate of 850 kb/s for all channels. Set to four for UWB PHY in CCA mode 6; otherwise, set to zero. |
0,4 |
|
TXR MARKER Offset |
A count of the propagation time from the ranging counter to the transmit antenna. The LSB of a time value represents 1/128 of a chip time at the mandatory chipping rate of 499.2 MHz |
0x00000000–0xffffffff |
|
RXR MARKER Offset |
A count of the propagation time from the receive antenna to the ranging counter. The LSB of a time value represents 1/128 of a chip time at the mandatory chipping rate of 499.2 MHz. |
0x00000000–0xffffffff |
|
RFRAME Processing Time |
A count of the processing time required by the PHY to handle an arriving RFRAME. The LSB represents 2 ms. The meaning of the value is that if a sequence of RFRAMEs arrive separated by phyRFRAMEProcessingTime, then the PHY can keep up with the processing indefinitely |
0x00–0xff |
|
CCA Duration |
The duration for CCA, specified in symbols. This attribute shall only be implemented with PHYs operating in the 950 MHz band |
0-1000 |
Let's sort the rows by the PHY they belong to. The general rows at the top, such as Current Channel, Current Page, TX Power and CCA Mode, apply to every PHY. The rows that start with UWB, and the ranging rows, exist only for the UWB PHY. CSS Low DataRate Supported exists only for the CSS PHY, and CCA Duration only for PHYs in the 950 MHz band.
Current Page and Current Channel identify the channel together : the same channel number can mean a different frequency on a different channel page.Symbols Per Octet links size and time : the MAC uses it to turn a frame length in octets into an air time in symbols.
PHY Model, Frequency, Data Rate
Now let's see which PHYs exist. Each PHY model below pairs a modulation with one or more frequency bands, and the band decides the data rate. A few rows have no data rate in the table, and the paragraphs after the table fill in the ones that matter.
|
PHY Model |
Frequency band |
Data Rate |
|
OQPSK |
2450 MHz, 915 MHz, 780 MHz |
250 kb/s |
|
868 MHz |
100 kb/s |
|
|
BPSK |
868 Mhz, 950 MHz |
20 kb/s |
|
915 MHz |
40 kb/s |
|
|
ASK |
868 MHz |
|
|
915 MHz |
|
|
|
CSS |
2450 MHz |
1 Mb/s, 250 kb/s(optional) |
|
UWB |
249.6 MHz ~ 749.6 MHz |
|
|
3.1 GHz ~ 4.8 GHz |
|
|
|
6.0 GHz ~ 10.6 GHz |
|
|
|
GFSK |
|
100 kb/s |
The table follows the history of the standard. The 2003 edition had only two PHYs, O-QPSK at 2450 MHz and BPSK at 868 MHz and 915 MHz. Later editions and amendments added the other rows. The 2006 edition added ASK and an O-QPSK option for 868 MHz and 915 MHz. 802.15.4a added CSS and UWB, 802.15.4c added the 780 MHz band for China, and 802.15.4d added the 950 MHz BPSK and GFSK PHYs for Japan.
Both ASK rows run at 250 kb/s, and the ASK PHY section shows how. The UWB PHY supports several data rates, and its PHR alone is sent at 850 kb/s or 110 kb/s. The GFSK row has no band in the table, and it belongs to the 950 MHz band.
The 2450 MHz band is the one that most products use, because it is available worldwide. The sub-GHz bands are regional. 868 MHz is for Europe, 915 MHz is for North America, 780 MHz is for China and 950 MHz is for Japan. A lower band gives a longer range for the same power, but in most rows it also gives a lower data rate.
O-QPSK at 2450 MHz is the common case : 250 kb/s in a worldwide band, and the PHY under most ZigBee and 6LoWPAN products.The sub-GHz PHYs are regional : 868, 915, 780 and 950 MHz serve Europe, North America, China and Japan.
PPDU, PHY Protocol Data Unit
Every PHY wraps the MAC frame in a PPDU, and the PPDU is what goes on the air. The diagram below puts the PPDU formats of all six PHYs on top of each other, so you can compare them field by field.

Four of the six formats share one layout: O-QPSK, BPSK, ASK and GFSK. Each has an SHR, a one octet PHR and the PSDU. The PHR holds a 7 bit FrameLength and 1 reserved bit, and the PSDU is the MAC frame. What changes between the four is the SHR. The O-QPSK preamble is 8 symbols, while the BPSK and GFSK preambles are 32 symbols. The ASK PHY uses a special SHR format, which the ASK PHY section explains.
CSS and UWB use a different layout, and their PHRs are not one octet long. The UWB PHR has 19 bits and carries the data rate, the frame length and error protection bits. The CSS row labels a block after the PHR as SHR. The CSS SHR is the preamble and the SFD at the front, so this label does not match the CSS frame format, where the PSDU follows the PHR.
The SFD, Start of Frame Delimiter, marks the end of the preamble. When the receiver finds the SFD, it knows that the next bits are the PHR.
The PSDU is always the MAC frame : the PHY carries it without looking inside it.The preamble length depends on the PHY : a slow or low-SNR PHY uses a longer preamble to give the receiver time to synchronize.The PHR is short : in most PHYs it only tells the receiver how many PSDU octets follow.
OQPSK PHY
O-QPSK at 2450 MHz is the PHY under most 802.15.4 products, so let's go through its transmitter chain first. The same chain, with a shorter chip sequence, also serves the 780, 868 and 915 MHz bands. The diagram below follows one PPDU from the bits down to the modulated signal.

The top of the diagram zooms into two fields of the PPDU. The SFD is one octet, and its bits from bit 0 to bit 7 are 1 1 1 0 0 1 0 1. Read as a number, this is 0xA7. The FrameLength value decides how the receiver treats the PSDU. The value 5 means an acknowledgment frame, and 9 up to aMaxPHYPacketSize means an ordinary MPDU. The values 0 to 4 and 6 to 8 are reserved.
The chain below the PPDU has three blocks. Bit to Symbol groups every 4 bits into one data symbol, so there are 16 possible symbols. Symbol to Chip replaces each symbol with a fixed chip sequence. At 2450 MHz each sequence is 32 chips long, and in the 915, 868 and 780 MHz bands it is 16 chips long. The OQPSK Modulator then sends the chips, with the Q chips offset by half a chip period against the I chips.
The numbers of the 2450 MHz case show what the spreading costs. The chip rate is 2 Mchip/s, and 32 chips carry one symbol, so the symbol rate is 62.5 ksymbol/s. With 4 bits per symbol, the data rate is 250 kb/s. The spreading uses more bandwidth, but the receiver can still decode a symbol when some of its chips are wrong.
4 bits become one symbol, and one symbol becomes 32 chips : at 2450 MHz this gives 2 Mchip/s for 250 kb/s.The small table is an excerpt : the 915, 868 and 780 MHz table in the diagram lists only data symbols 0 to 4 of the 16.One symbol lasts 16 microseconds at 2450 MHz : this is the unit behind the 12 symbol turnaround time.
BPSK PHY
The BPSK PHY is the other PHY of the original 2003 standard. It serves the 868 MHz and 915 MHz bands, and later the 950 MHz band, at much lower data rates than O-QPSK. The diagram below shows why its chain is simpler.

The PPDU at the top has the same SFD and FrameLength values as the O-QPSK PHY. The difference is the preamble, which is 32 symbols long. In BPSK one symbol carries one bit, so the preamble is 32 bits long.
The chain has three blocks. The Differential Encoder combines each raw data bit with the previous encoded bit, En = Rn XOR En-1. The receiver then decides each bit from a phase change rather than from an absolute phase, so it needs no phase reference. Bit to Chip replaces each encoded bit with one of two 15 chip sequences, and the sequence for 1 is the inverse of the sequence for 0. The BPSK Modulator then sends the chips.
The data rate follows from the chip rate. At 868 MHz the chip rate is 300 kchip/s, and 15 chips per bit give 20 kb/s. At 915 MHz the chip rate is 600 kchip/s, which gives 40 kb/s. These are the 20 kb/s and 40 kb/s rows of the PHY model table.
One bit becomes 15 chips : BPSK spreads each single bit rather than a group of bits, so its data rate is low.Differential encoding removes the phase reference : the receiver compares the phases of two neighbouring bits.
ASK PHY
The ASK PHY was added in 2006 to raise the rate in the 868 MHz and 915 MHz bands to 250 kb/s. It uses parallel sequence spread spectrum, PSSS, and it sends its SHR in a different way from the rest of the frame. The diagram below shows the two paths.

The left path carries the SHR, which the diagram calls Special Format. The SHR goes to a BPSK Modulator, not to the ASK Modulator, and it is a chip sequence that is repeated. The two tables at the top left show sequence number 0, repeated 2 times at 868 MHz and 6 times at 915 MHz. The numbers 12.2.5, 12.2.6, 12.1.1 and 12.1.2 in the diagram are the clauses of the standard that define this format.
The right path carries the PHR and the PSDU. Bit to Symbol groups the bits into symbols, and Symbol to Chip is where PSSS works. Each data bit, as a value of +1 or -1, multiplies its own sequence from the PSSS code table, Table 81 and 82 in the diagram. All these sequences are then added column by column into one multilevel chip sequence. The number of sequences is n = 20 at 868 MHz and n = 5 at 915 MHz. The ASK Modulator sends the summed chips as amplitude levels.
This is how ASK reaches 250 kb/s in both bands. PSSS sends many bits in parallel in one symbol, 20 bits at 868 MHz and 5 bits at 915 MHz. The PHY model table leaves the ASK data rates empty, but both ASK rows run at 250 kb/s.
The SHR and the rest of the frame use different modulations : BPSK for the SHR, and ASK for the PHR and the PSDU.PSSS adds many spread bits into one symbol : 20 bits at 868 MHz and 5 bits at 915 MHz.
CSS PHY
CSS, Chirp Spread Spectrum, came with 802.15.4a for the 2450 MHz band. It sends each symbol on a set of frequency chirps, and its PPDU fields differ from the O-QPSK ones. The diagram below shows the fields at the top and the DQCSK transmitter at the bottom.

The fields at the top depend on the data rate. The preamble is a run of ones, 32 symbols long at 1 Mb/s and 80 symbols long at 250 kb/s. The SFD is a 16 bit sequence, and each data rate has its own SFD, so the receiver learns the data rate from the SFD. The PHR has 12 bits. Bits 0 to 6 give the length of the payload, bits 7 and 8 are not used, and bits 9 to 11 are reserved.
The diagram also labels a block after the PHR as SHR. As in the PPDU section, the CSS SHR is the preamble and the SFD at the front, and the PSDU follows the PHR.
In the transmitter, the 1:2 DEMUX splits the bits into an I branch and a Q branch. Each branch has a Symbol Mapper, with a code rate of 3/4 at 1 Mb/s or 6/32 at 250 kb/s, and an Interleaver. The QPSK Mapper combines the two branches into QPSK symbols. A feedback path with a delay of z-4 makes the QPSK symbols differential. The CSK Generator produces one of four sub-chirp sequences, I, II, III or IV, and the QPSK symbols modulate those chirps. The output is DQCSK, differential quadrature chirp shift keying.
The SFD tells the data rate : 1 Mb/s and 250 kb/s use different SFD sequences.The low rate gives more range : 250 kb/s uses the stronger 6/32 code and a longer preamble.
UWB PHY
The UWB PHY, also from 802.15.4a, spreads its pulses over a very wide band. Beyond data transfer, its main feature is precise ranging. The diagram below shows that its PPDU has three parts, and that each part is modulated in a different way.

At the top, the SHR splits into SYNC and SFD. The SHR duration Tpre is the sum of TSYNC and TSFD. The receiver uses the SYNC part to find and track the pulses, and it uses the SFD to find the start of the PHR.
The PHR has 19 bits, and they carry more than a length. Bits R1 and R0 give the data rate of the Data Field. Bits L6 to L0 give the frame length. Bit 9, RNG, marks a ranging packet, and bit 10, EXT, marks a header extension. Bits P1 and P0 give the preamble duration. The last six bits, C5 to C0, are SECDED check bits. They correct a single bit error in the PHR and detect a double bit error.
The modulation follows the same order. The SHR is coded at the base rate. The PHR is BPM-BPSK coded at 850 kb/s or 110 kb/s. The Data Field is BPM-BPSK coded at the rate that the PHR indicates. BPM-BPSK combines burst position modulation with BPSK. So the receiver must decode the PHR first, because only the PHR tells it the rate of the Data Field.
The PHR carries the rate of the Data Field : the receiver cannot decode the data before it decodes the PHR.The PHR has its own error protection : six SECDED bits protect the 13 information bits.
GFSK PHY
The GFSK PHY came with 802.15.4d for the 950 MHz band in Japan. It keeps the O-QPSK PPDU layout, but it replaces spreading with frequency shift keying. The diagram below shows a chain with only two blocks.

The PPDU has the same SFD and FrameLength values as the O-QPSK PHY. The preamble is 32 symbols of alternating 0 and 1. This pattern changes the frequency at every bit, which helps the receiver to recover the bit timing.
The first block is Data Whitening. Each raw data bit is combined with one bit of a PN9 sequence, En = Rn XOR PN9n. Whitening breaks long runs of the same bit value. Without it, a run of many zeros would keep the signal on one frequency for a long time.
The second block is the GFSK Modulator. The nominal frequency deviation is 50 kHz, and the allowed deviation is 70% to 130% of that value. The limits also depend on the bit pattern. For the pattern 0101 the deviation must be 70% to 110%, and for 00001111 it must be 80% to 130%. A fast changing pattern gets the lower range, because the Gaussian filter smooths each short bit.
There is no spreading in this chain. One bit is one GFSK symbol, so the 100 kb/s rate in the PHY model table is also the symbol rate.
GFSK has no spreading : one bit is one symbol, which makes this the simplest chain on the page.Whitening keeps the bit pattern balanced : the PN9 sequence breaks long runs of equal bits before the GFSK Modulator.