There are three classes of Zigbee devices: •
Zigbee coordinator (ZC): The most capable device, the coordinator forms the root of the network tree and may bridge to other networks. There is precisely one Zigbee coordinator in each network since it is the device that started the network originally (the Zigbee LightLink specification also allows operation without a Zigbee coordinator, making it more usable for off-the-shelf home products). It stores information about the network, including acting as the trust center and repository for security keys. •
Zigbee router (ZR): As well as running an application function, router devices can act as intermediate routers, passing data on to other devices. These types of Zigbee products are typically mains-powered so they are always available on the network. Zigbee Router devices are sometimes called Zigbee repeaters or Zigbee range extenders. •
Zigbee end device (ZED): Contains just enough functionality to talk to the parent node (either the coordinator or a router); it cannot relay data from other devices. This relationship allows the node to be asleep a significant amount of the time, thereby giving long battery life. These types of Zigbee device products are often battery-powered. A ZED requires the least amount of memory and thus can be less expensive to manufacture than a ZR or ZC. The current Zigbee protocols support beacon-enabled and non-beacon-enabled networks. In non-beacon-enabled networks, an unslotted
CSMA/CA channel access mechanism is used. In this type of network, Zigbee routers typically have their receivers continuously active, requiring additional power. However, this allows for heterogeneous networks in which some devices receive continuously while others transmit when necessary. The typical example of a heterogeneous network is a
wireless light switch: The Zigbee node at the lamp may constantly receive since it is reliably powered by the mains supply to the lamp, while a battery-powered light switch would remain asleep until the switch is thrown. In this case, the switch wakes up, sends a command to the lamp, receives an acknowledgment, and returns to sleep. In such a network, the lamp node will be at least a Zigbee router, if not the Zigbee coordinator; the switch node is typically a Zigbee end device. In beacon-enabled networks, Zigbee routers transmit periodic beacons to confirm their presence to other network nodes. Nodes may sleep between beacons, thus extending their battery life. Beacon intervals depend on data rate; they may range from 15.36 milliseconds to 251.65824 seconds at , from 24 milliseconds to 393.216 seconds at and from 48 milliseconds to 786.432 seconds at . Long beacon intervals require precise timing, which can be expensive to implement in low-cost products. In general, the Zigbee protocols minimize the time the radio is on, so as to reduce power use. In beaconing networks, nodes only need to be active while a beacon is being transmitted. In non-beacon-enabled networks, power consumption is decidedly asymmetrical: Some devices are always active while others spend most of their time sleeping. Except for Smart Energy Profile 2.0, Zigbee devices are required to conform to the IEEE 802.15.4-2003 Low-rate Wireless Personal Area Network (LR-WPAN) standard. The standard specifies the lower
protocol layers—the
physical layer (PHY), and the
media access control portion of the
data link layer. The basic channel access mode is
carrier-sense multiple access with collision avoidance (CSMA/CA). That is, the nodes communicate in a way somewhat analogous to how humans converse: a node briefly checks to see that other nodes are not talking before it starts. CSMA/CA is not used in three notable exceptions: • Message acknowledgments. • Beacons are sent on a fixed-timing schedule. • Devices in beacon-enabled networks that have low-latency, real-time requirements may also use guaranteed time slots.
Network layer The main functions of the
network layer are to ensure correct use of the
MAC sublayer and provide a suitable interface for use by the next upper layer, namely the application layer. The network layer deals with network functions such as connecting, disconnecting, and setting up networks. It can establish a network, allocate addresses, and add and remove devices. This layer makes use of star, mesh and tree topologies. The data entity of the transport layer creates and manages
protocol data units at the direction of the application layer and performs routing according to the current topology. The control entity handles the configuration of new devices and establishes new networks. It can determine whether a neighboring device belongs to the network and discover new neighbors and routers. The routing protocol used by the network layer is
AODV. To find a destination device, AODV is used to broadcast a route request to all of its neighbors. The neighbors then broadcast the request to their neighbors and onward until the destination is reached. Once the destination is reached, a route reply is sent via unicast transmission following the lowest cost path back to the source. Once the source receives the reply, it updates its routing table with the destination address of the next hop in the path and the associated path cost.
Application layer The application layer is the highest-level layer defined by the specification and is the effective interface of the Zigbee system to its end users. It comprises the majority of components added by the Zigbee specification: both ZDO (Zigbee device object) and its management procedures, together with application objects defined by the manufacturer, are considered part of this layer. This layer binds tables, sends messages between bound devices, manages group addresses, reassembles packets, and transports data. It is responsible for providing service to Zigbee device profiles.
Main components The
ZDO (Zigbee device object), a protocol in the Zigbee protocol stack, is responsible for overall device management, security keys, and policies. It is responsible for defining the role of a device as either coordinator or end device, as mentioned above, but also for the discovery of new devices on the network and the identification of their offered services. It may then go on to establish secure links with external devices and reply to binding requests accordingly. The application support sublayer (APS) is the other main standard component of the stack, and as such, it offers a well-defined interface and control services. It works as a bridge between the network layer and the other elements of the application layer: it keeps up-to-date
binding tables in the form of a database, which can be used to find appropriate devices depending on the services that are needed and those that the different devices offer. As the union between both specified layers, it also routes messages across the layers of the
protocol stack.
Communication models An application may consist of communicating objects that cooperate to carry out the desired tasks. Tasks will typically be largely local to each device, such as the control of each household appliance. The focus of Zigbee is to distribute work among many different devices that reside within individual Zigbee nodes, which in turn form a network. The objects that form the network communicate using the facilities provided by APS, supervised by ZDO interfaces. Within a single device, up to 240 application objects can exist, numbered in the range 1–240. 0 is reserved for the ZDO data interface and 255 for broadcast; the 241–254 range is not in use but may be in the future. Two services are available for application objects to use (in Zigbee 1.0): • The
key–value pair service (KVP) is meant for configuration purposes. It enables the description, request and modification of object attributes through a simple interface based on get, set and event primitives, some allowing a request for a response. Configuration uses
XML. • The
message service is designed to offer a general approach to information treatment, avoiding the necessity to adapt application protocols and potential overhead incurred by KVP. It allows arbitrary payloads to be transmitted over APS frames. Addressing is also part of the application layer. A network node consists of an IEEE 802.15.4-conformant radio
transceiver and one or more device descriptions (collections of attributes that can be polled or set or can be monitored through events). The transceiver is the basis for addressing, and devices within a node are specified by an
endpoint identifier in the range 1 to 240.
Communication and device discovery For applications to communicate, the devices that support them must use a common application protocol (types of messages, formats and so on); these sets of conventions are grouped in
profiles. Furthermore, binding is decided upon by matching input and output unique within the context of a given profile and associated with an incoming or outgoing data flow in a device. Binding tables contain source and destination pairs. Depending on the available information, device discovery may follow different methods. When the network address is known, the IEEE address can be requested using
unicast communication. When it is not, petitions are
broadcast. End devices will simply respond with the requested address, while a network coordinator or a router will also send the addresses of all the devices associated with it. This permits external devices to find out about devices in a network and the services that they offer, which endpoints can report when queried by the discovering device (which has previously obtained their addresses). Matching services can also be used. The use of cluster identifiers enforces the binding of complementary entities using the binding tables, which are maintained by Zigbee coordinators, as the table must always be available within a network and coordinators are most likely to have a permanent power supply. Backups, managed by higher-level layers, may be needed by some applications. Binding requires an established communication link; after it exists, whether to add a new node to the network is decided, according to the application and security policies. Communication can happen right after the association.
Direct addressing uses both radio address and endpoint identifier, whereas indirect addressing uses every relevant field (address, endpoint, cluster, and attribute) and requires that they are sent to the network coordinator, which maintains associations and translates requests for communication. Indirect addressing is particularly useful to keep some devices very simple and minimize their need for storage. Besides these two methods,
broadcast to all endpoints in a device is available, and
group addressing is used to communicate with groups of endpoints belonging to a specified set of devices. == Security services ==