Eeny, Meeny, Miney Moe: choosing a low power wireless network protocol - Part 1
Wireless network protocol basics
By Miguel Morales and Kevin Belnap
Embedded.com
(06/09/08, 06:04:00 PM EDT)
One of the biggest trends in the electronics market is adding wireless functionality and connectivity to products. Products as varied as electric, gas or water meters, home security systems, TV remote controls or exercise equipment have added wireless functionality.

This is partly due to convenience for the user such as a wireless remote control that can operate anywhere in a house as opposed to a line of sight (LOS) infrared remote.

Another driving factor is avoiding the expensive rewiring that would be required to retrofit a home with a security system. Other trends such as automated meter reading (AMR) or advanced metering infrastructure (AMI) rely on low power protocols where battery lifetime can be measured in years.

In this three part series we will provide an overview of wireless network protocols, but will focus on ZigBee, 802.15.4 and compare it with one example proprietary protocol, SimpliciTI, all designed for low power applications.

In Part 1, here, we will review network basics including common networking terminology, the Open Systems Interconnect (OSI) network model and considerations to keep in mind when deciding on a network for a particular application.

In Part 2, a set of network selection criteria will be presented upon which the comparison of the three protocols will be framed. Finally, in Part 3, the 802.15.4, ZigBee and the proprietary SimpliciTI protocols will be described in detail and some specific examples will be described,  using these selection criteria to determine the optimum network for particular applications.

The list of released wireless network protocols is a long one. The following is just a partial list of network protocols that are available:

* Standards-based protocols such as WiFi (802.11b), Bluetooth, ZigBee, ZigBee Pro, 802.15.4, RFID and Wireless USB

* Proprietary protocols from silicon vendors, third parties, or what this paper calls "do-it-yourself" networks, built and controlled completely by the company that uses the network in their own products.

Figure 1 below shows a table with various protocols, the applications these are focused on, typical resource requirements and so forth. When comparing the low power networks such as ZigBee/802.15.4 against other protocols, it is important to focus on the key features of a low power wireless network that distinguishes it from its peers: low data rates, reduced operating range, a low frame overhead, power management considerations built directly into the protocol, and low complexity.

Each design consideration serves as a basis for the end goal of reducing the power consumption per individual node on the network. As the figure shows, this is a perfect fit to the applications within environmental monitoring and control markets in which the devices would be optimally battery powered and be offered at price points considerably lower than hardware capable of supporting larger, more complex protocols.

Figure 1--Wireless protocols parameters and focus applications (courtesy of ZigBee Alliance)

Low power networks were designed chiefly to provide wireless connectivity between products with battery lifetime in months or years. In most low power wireless systems, the element that uses the most power is the radio transmitting and receiving data. It is, therefore, extremely important to minimize the power used by the radio to maximize battery life.

Since the distance a signal can be transmitted and received is a function of the power input to the antenna, the wireless network range between individual nodes is typically limited. Wireless protocols also tend to be less complex to reduce computational overhead and the need for larger memories, resulting in lower cost.

Network basics
Figure 2 below shows a block diagram of a typical low power network node. In general there is a sensor (or sensors) collecting data or status and/or providing a user interface to the system. A microcontroller interfaces the sensor and controls the radio (the CC1100 or CC2500 in this particular case) while the radio transmits and receives status.

Figure 2--a typical low power network block diagram, shown for an automatic meter reading application

All networks on which these nodes communicate, wired or wireless, can be conceptually described by what is referred to as the Network Open Systems Interconnect (OSI) Basic Reference Model, depicted in Figure 3 below.

Developed in the late 1970's by the International Organization for Standardization (the ISO), this model separates the components of a network protocol implementation into software layers. For two applications on separate devices to communicate, a message must travel down from the application layer, across the physical layer, and up the other side. Each layer communicates only with the layers above and below it.

Figure 3--Elements of a network

One way to conceptualize a layered software architecture cold be by describing the mailing of a letter by mail. The letter itself can be considered application data. The individual drops it off to be picked up by the mailman in the post-office box so that it may be transported to the post office.

The post office separates all mail according to its destination before shipping it, by sea, air and land to its final destination. For the letter to arrive to the recipient, it must work its way back up the other side, being dropped off at the post office, sorted by destination, transported to the recipient's mailbox, to be interpreted by the reader.

This is a four-tiered communication protocol where the individual writing the letter represents a single layer, the transport to and from the local post office represents the second layer, the post office sorting the mail represents the third layer, and the shipping methodologies represent the fourth.

Each layer concerns itself only with its own task, and communicates only with its adjacent layers. Only by working its way down one side and up the other will the contents of the letter (or application data ) be successfully communicated between individuals.

The OSI model services seven separate layers. An application layer services the direct interface to the user. The presentation layer formats the message to or from a network format, oftentimes implemented as message encryption and/or encoding.

The session layer creates and manages the logical link between any two devices on the network. The transport layer is responsible for providing reliable end-to-end communication. If the transport layer fails too often, perhaps the channel is too noisy or the link is bad, and it should inform the session layer to create a new link between the failing nodes.

The network layer is responsible for network routing mechanisms, leaving the responsibility of message transmission between individual devices to the data link layer. The data link layer assures peer-to-peer delivery of a message, but leaves the actual transmission of messages across the physical medium to be managed by the physical layer. And so, a message is transmit down one side of the OSI model and up the other.

A designer has the option to select protocols that have different numbers of layers implemented, and can choose to customize the remaining layers to his or her application as needed.

Most networking implementations today do not actually implement these layers wholesale, and may mix the functionality of certain layers according to the requirements of the protocols.

In fact, the OSI model is best to consider as a framework for conceptualizing the complexity and functionality of a protocol's architecture The designer should always be aware of what functionality his or her solution implements and which functionality it is consciously leaving out.

Giving structure to a wireless network
To give structure to selecting a wireless protocol when deciding between ZigBee, 802.15.4, or a proprietary network, the following criteria are helpful to keep in mind.

1. Application considerations
2. Robustness and reliability
3. Ease of use
4. Hardware and RF considerations

Application considerations
The initial steps in network design, much like any other system design, are to define the high-level requirements for the application. The following list captures some of the most important network parameters that should be defined before considering any wireless protocol as the solution of choice.

The possible implementations addressing these application considerations can then be traced throughout the paper, as the detailed explanation of the selection criteria and the protocols themselves require further elaboration.

1. Network topology
    a. How many nodes and in what general organization within the network does the application require?
2. Reliability of communications
    a. How critical is the reception of each data packet within the network?
3. Network security
    a. Does the data need to be secure? If so, how critical is the absolute security of the network data transmissions?
4. Customization and design freedom
    a. How customized does the networking protocol solution need to be to fit the application, and does the protocol offer the design freedom to do so?
5. Development time and protocol complexity
    a. Along the same lines of #4, what complexity exists within the protocol in question?
    b. How much time will be spent learning and integrating the protocol in question to the existing application versus the time that would be spent developing a more customized solution?
6. Interoperability
    a. Would the end product benefit from interoperability with other vendors, or will it be a completely proprietary solution?

Figure 4 below presents four of the most common wireless network topologies available for implementation.

Figure 4--low power network topologies

A peer-to-peer network topology is one that supports either uni- or bi-directional links between individual nodes on the network. Nodes will only communicate if they are within range of each other, as they must maintain direct physical links for communication; the only exception being a broadcast message, which could be re-broadcast and propagated through the network.

A tree network topology is one each node in the network associates itself to a parent node, and the network addressing is reflected as such, much like an IP internet address. This allows for more efficient routing algorithms to be implemented, as the more significant digits of a node's network address can identify the node's location in relation to its peers.

A star network identifies a single node as the network coordinator, responsible for a variety of possible network management controls, such as node associations, network join and linking permissions, message forwarding, and security exchanges. A star network depends upon the coordinator to keep the network communicating and is susceptible to disruption if the coordinator node goes down.

A mesh network, in its most general sense, is defined as a network in which there are at least two pathways to each node and a fully meshed network means that every node has a direct connection to every other node in the network.

The latter case somewhat unreasonable in many cases, as this would quickly limit the size of a network to the minimum range of the weakest device, and the former is perhaps too strict a requirement.

Instead, one tends to see interpretations that exist somewhere in between the two cases, where a central node is responsible for starting the network, and a tree addressing technique is used to locate nodes and manage the associations between them.

Range extenders, or routing nodes, exist to route messages throughout the network and if one node or the coordinator goes down, the network can still continue to function, sacrificing some degree of operability. Additional features such as self-healing route discovery and route expiration can make such routing algorithms increasingly reliable and efficient.

Another important factor to consider may be the financial cost of using a certain protocol. It is not uncommon that a membership or royalty fee must be paid to the organization representing a proprietary solution.

ZigBee, for example, does not have royalties but does require membership in the ZigBee Alliance for a nominal, yearly fee. There can also be a cost, both in time and money, resulting from a certification process. Silicon vendor proprietary protocols typically require that their devices be used in lieu of a royalty.

Robustness and reliability
The extent of the implemented robustness and reliability of a low power wireless network protocol can be summarized into three categories: message delivery, physical layer considerations, and the messaging protocol.

Message delivery concerns routing methodologies that assure a successful packet transmission and the security of network transactions. Physical layer considerations address the interference of noise or other transmissions within the channel of operation.

The messaging protocol then defines the division of the channel so that all devices can use the physical medium without packets colliding mid-transmission. All three contribute to the improved quality of service (QOS) for a network, defined as a set of network metrics used to gauge the efficiency, transmission rate and error rate for package communication.

Channel scanning, or the ability to sense the amount of activity or noise on a channel, is a physical layer consideration that network protocol can use to find the channel within the specified frequency band of operation that is least likely to impede communication between nodes.

Frequency agility is the ability of a network to change the channel of operation for all nodes on the network, so that if a channel is bombarded with interference operation of the network may continue without concern.

Improved message delivery can be achieved through acknowledgement schemes, where the receiving node will transmit an ACK to the original sender after the successful reception of the packet. Peer to peer acknowledgements, partnered with a defined number of message retries will highly decrease the possibility of a packet transaction being lost.

End to end acknowledgements will provide a second layer of security that a packet transaction will not be lost, and are especially important in large, multi-hop networks supported by complex routing algorithms.

The messaging protocol defines how the network bandwidth is contended for or partitioned. Different wireless protocols will define different partitioning of the bandwidth, and the possibilities include division in frequency, space, time, or code.

A division in frequency parallels to a room of people talking at a different pitch of voice; a division in space parallels to a room of people talking in different directions; a division in time to a room with people contending for the right to speak but backing off if someone beats them to speak first; and a division in code to a room of people speaking different languages in all different pitches of voice.

The protocols presented in this paper discuss only the division in time, or Time Division Multiple Access protocol, for which there are two possible implementations: synchronous and asynchronous communication.

Synchronous communication is enabled by the coordinating node broadcasting a periodic network beacon and partitioning the resulting time in between the beacons into equal-size time slots.

A single network beacon and the time slots that occur before the next beacon are referred to as the superframe. The time slots of the superframe can be further partitioned into an active and inactive period of communications, so that the coordinator can sleep in low power modes during the inactive period. Time slots can be guaranteed or contended for using a Channel Sense Multiple Access (CSMA), or listen-before-speak algorithm.

A CSMA algorithm defines the protocol that will arbitrate the use of the RF channel when multiple nodes are attempting to communicate at the same time. The most common implementation is a CSMA/CA algorithm, where CA stands for Collision Avoidance because a transmitting node will avoid the transmission of its message if it senses the channel is currently busy.

There are other implementations of the CSMA algorithm, such as CSMA/CD (collision detection), and CSMA/CR (collision resolution), but they are not commonly found in RF protocol implementations and are outside the scope of this essay.

Security is also a key concern affecting the robustness of wireless communication and may be the main function of the network. For example, a home security network may include a garage door opener or lock and unlock doors.

These systems need security to prevent eavesdropping, security breaches or to maintain privacy. Security can be addressed by multiple levels of security keying and encryption, message integrity and authentication, and the use of a trust center, meaning that all security is handled by a single node on the network (usually the network coordinator) rather than a distributed scheme where individual links exchange symmetric keys upon link creation and may allow an attacking node entrance to the network without direct authentication from the managing node.

To read Part 2, go to : Additional criteria to consider
To read Part 3, go to: Comparing Zigbee to TI's SimpliciTI

Miguel Morales is MSP430 Applications Engineer and Kevin Belnap is MSP430 Product Marketing Manager at Texas Instruments, Inc.