Signal Chain Basics (Part 24): Basic networking using the IEEE 802.15.4 PHY/MAC protocol
Understand the basics of the physical and medium access control layers of this specification, as well as which topology configurations are effective, and why
By Brian Blum, Texas Instruments
Planet Analog
(12/02/08, 07:00:25 AM EST)
(Editor's note: There are links to all previous installments of this series at the end, below the authors' biographies.)

The last five years have been very exciting for anyone involved in the short-range, low-power RF market. For those still getting up to speed, an extensive portfolio of products focusing on short-range wireless communication operating sub 1-GHz or global 2.4-GHz industrial, scientific, and medical (ISM) bands continues to grow, with new innovations being announced readily. The most popular family of devices supports the IEEE-defined 802.15.4 standard.

As shown in Figure 1, this standard defines the physical (PHY) and medium access control (MAC) layers for low data-rate, short-range wireless communication.


Figure 1: The Traditional 7-Layer OSI Model
(Click on image to enlarge)

Although operation is defined for both sub 1-GHz and 2.4- GHz frequency bands, the majority of today's devices support the direct sequence spread spectrum (DSSS)-based 2.4-GHz solution. The 802.15.4 standard supports raw data throughput of 250 kbps and can transmit point-to-point anywhere from tens to hundreds of meters, depending on the output power and receive sensitivity of the transceiver. These chips can come as transceivers, system-on-chips (SoC), or in a network processor (NP) form factor with a pre-programmed network protocol.

The 802.15.4 PHY/MAC is the underlying protocol for ZigBee, 6LoWPAN and RF4CE. Among other things,it defines basic network startup, device discovery and joining, security, and acknowledged unicast and broadcast communication. Two device configurations, fully functional device (FFD) and reduced functional device (RFD), are defined to support a simple star topology where a single coordinator FFD supports multiple FFDs and/or RFDs (Figure 2).


Figure 2: An 802.15.4 Star Topology
(Click on image to enlarge)

The RFDs are child nodes that can optionally sleep, periodically waking up to determine from their parent FFD whether they have any pending incoming data. The FFDs are always on and can communicate peer-to-peer with other FFDs at any time.

Two configurations, beacon-based and non-beacon-based, are supported in 802.15.4. Non-beacon-based requires an always-on parent with potentially sleeping children, and beacon-based supporting both a sleeping parent and sleeping children where the children synchronize to the parent device, which broadcasts a beacon at a regular, fixed interval.

Translating this to your application, the 802.15.4 PHY/MAC is most beneficial under certain conditions. First, adding MAC protocol overhead brings the 250 kbps raw throughput down to around 120 kbps application throughput. Remember, this is potentially divided between several nodes, so 802.15.4 works best for lower data-rate applications (streaming audio is more than pushing these limits). Second, the 802.15.4 MAC is specifically defined for a star topology.

Therefore, if you only have two nodes in your system, you're adding a lot of protocol overhead and code complexity with no real benefit. Similarly, if you require multi-hop and even mesh networking, 802.15.4 is a fine base. But you're going to require something like ZigBee or 6LoWPAN to supplement what is provided.

The 802.15.4 MAC protocol works best if you have two, three, or even tens of devices (sensors/actuators) reporting to a single centralized device (possibly an Ethernet gateway or central control device), where the child devices are battery-powered and need to spend the majority of time in a low-power quiescent state to maximize device longevity.

The 802.15.4 PHY/MAC protocol can be a very powerful tool to provide a simple out-of-the-box networking solution. Keep in mind that it could be more than necessary or too simplistic, so it's important to understand its full capabilities before settling on a solution. There is, of course, much that can be discussed about the IEEE 802.15.4 PHY/MAC protocol, beyond this basic introduction about the standards (ZigBee, 6LoWPAN, RF4CE) that build on it, but this is a first step.

About the Author
Brian M. Blum is a Zigbee Product Marketing Engineer with Texas Instruments where he is responsible for the 802.15.4 LPRF product line including standards such as ZigBee and RF4CE. He received his Master's of Computer Science with a focus on Wireless Sensor Networking from the University of Virginia. In his spare time he enjoys rock climbing, volleyball, yoga, and nature.

Previous installments of this series: