This KBA is about the 15.4 API provided by RAIL. However, if you need a 15.4 MAC layer, you should probably consider Connect's MAC mode, see UG235.03 for details.
802.15.4 PHY support by the hardware
All bands are supported, except 1427, 2380, 770, 4965 and 5800MHz
OQPSK (not SUN O-QPSK or MR-OQPSK) and FSK/GFSK modulations are supported
MSK modulation will be supported soon
The protocol specific API
The RAIL library includes protocol specific API for 15.4. It's strongly recommend to use at least version 1.4.x, which is supplied with Flex SDK 1.0.x.
Setting up the PHY
Some PHYs are supported in RAIL as embedded configuration. E.g. the 2.4GHz OQPSK phy (which is the most common) can be configured by calling RAIL_IEEE802154_2p4GHzRadioConfig() instead of RAIL_ConfigChannels().
If the PHY you want to use is supported by RAIL, it is recommended to use it from there, as these are validated and fine tuned through config options that are might not available on the radio configurator.
If the PHY you want is not supported in RAIL, you should set it up in the radio configurator.
Frequency and modulation
To set up the base of the config, follow these steps:
Disable all advanced options
Set up modulation and frequencies as per the requirements of the standard
Configure channel spacing and channel numbering according to the standard
Frame format
Preamble and Sync word (SFD) depends on the PHY format, set it up accordingly.
Endianness
Use LSB first everywhere unless stated otherwise.
SUN-FSK defines the length field MSB first. The length can be handled by the hardware, but you have to keep in mind that you have to reverse the endianness of these bytes for both RX and TX in application. I've used the following code to set and get the length of the packet:
The hardware does support address and frame filtering, Auto-ACK, and support to handle the frame pending bit in the ACK , which can be turned on in RAIL. To enable it, use the RAIL_IEEE802154_Init() API call, and the other calls related to address filtering or frame pending.
Proprietary Knowledge Base
IEEE 802.15.4 and RAIL/Flex SDK
Preface
Connect MAC mode
This KBA is about the 15.4 API provided by RAIL. However, if you need a 15.4 MAC layer, you should probably consider Connect's MAC mode, see UG235.03 for details.
802.15.4 PHY support by the hardware
The protocol specific API
The RAIL library includes protocol specific API for 15.4. It's strongly recommend to use at least version 1.4.x, which is supplied with Flex SDK 1.0.x.
Setting up the PHY
Some PHYs are supported in RAIL as embedded configuration. E.g. the 2.4GHz OQPSK phy (which is the most common) can be configured by calling RAIL_IEEE802154_2p4GHzRadioConfig() instead of RAIL_ConfigChannels().
If the PHY you want to use is supported by RAIL, it is recommended to use it from there, as these are validated and fine tuned through config options that are might not available on the radio configurator.
If the PHY you want is not supported in RAIL, you should set it up in the radio configurator.
Frequency and modulation
To set up the base of the config, follow these steps:
Frame format
Preamble and Sync word (SFD) depends on the PHY format, set it up accordingly.
Endianness
Use LSB first everywhere unless stated otherwise.
SUN-FSK defines the length field MSB first. The length can be handled by the hardware, but you have to keep in mind that you have to reverse the endianness of these bytes for both RX and TX in application. I've used the following code to set and get the length of the packet:
Variable length setup for 1Byte PHR with 7bit length
On 2.4GHz OQPSK, this is covered by the embedded config. Otherwise:
Variable length setup for 2Byte PHR and 11 bit length (SUN FSK)
Note: The default RX fifo size is 512B, you might want to increase that through RAIL_SetRxFifo(), or use FIFO mode to download the packet in chunks. See the tutorial on special data modes for more details.
CRC (or FCS)
2Byte (CCIT-16):
4Byte (ANSI X3.66-1979):
Whitening (2B PHR only)
Using MAC acceleration
The hardware does support address and frame filtering, Auto-ACK, and support to handle the frame pending bit in the ACK , which can be turned on in RAIL. To enable it, use the RAIL_IEEE802154_Init() API call, and the other calls related to address filtering or frame pending.
If you use a 2B PHR phy, you will also need to call RAIL_IEEE802154_ConfigGOptions(railHandle, RAIL_IEEE802154_G_OPTION_GB868, RAIL_IEEE802154_G_OPTION_GB868). Though the name is a bit misleading, this enables all the 15.4g available.