strong necessity of evaluating whether CoAP’s CC mechanism is capable of dealing with congestion in IoT networks, with large amount of devices and specific data patterns. Moreover, as stated in CoAP’s base specification, advanced CC mechanisms need to be defined and evaluated. This crucial area of investigation is approached in Chapters 5 and 6 of this thesis.
2.8
Multiple Layer Specifications
Some manufacturers use fixed sets of protocols for the communication protocol stack used by their devices in WSNs. These stacks normally include a proprietary application layer, like in the stacks defined by ZigBee [12] or Z-Wave [19]. In other cases, they only include a predefined application programming interface (API) to access the commu- nication functionality provided by the stack. The rest of the stack, including NWK, MAC, and PHY layers of such multi-layer specifications are adapted to the specific needs of the network environment in which they are used.
In the ambit of IEEE 802.15.4 WSNs, ZigBee plays a very important role. In order to provide a detailed understanding of ZigBee, in the following the main features of the ZigBee protocol stack layers are introduced, along with alternative stacks (see Fig. 2.12).
Application layer
Routing layer
Transfer layer
MAC layer
PHY layer
Application layerMAC layer
Network layer
PHY layer
Se cu ri ty s e rv ic e p ro vi d er Application support sublayer (APS)
Application framework ZigBee
device object (ZDO) App. Object 1 App. Object 240
a) ZigBee
b) Z-Wave
ZDO mgmt. planeLegend
ZigBee Coordinator ZigBee Router ZigBee End Device
Wireless Link
ZigBee Network
Figure 2.13: An example for a ZigBee network with mesh and star topologies. The Mesh topology is built by the ZC and the ZRs, while the Star topologies are built by the ZEDs connected to the ZRs.
2.8.1 ZigBee
ZigBee is a complete communication protocol stack for WSNs. ZigBee has been de- signed for a large variety of applications, such as SE, HA, or Health Care. For many of these applications a specific application profile is provided, defining which parameter settings and features from the ZigBee protocol stack need to be implemented and how they should be configured. The ZigBee stack consists of four layers: the PHY, the MAC, the NWK layers, and the application layer (called APL in ZigBee). The MAC and PHY layers are based on the common IEEE 802.15.4 (Section 2.3). The ZigBee specification defines standard mechanisms and configuration parameters, so that de- vices from different manufacturers can be compatible with each other, as long as they are using the ZigBee standard, operating with the same configurations and using the same application profiles.
In each ZigBee PAN, a unique ZigBee Coordinator (ZC) is needed to establish the network and to manage it. It serves as the root of the network and other ZigBee devices need to contact it, to join or leave the network. Together with ZigBee Routers (ZRs), which are able to fulfill regular functions from the application point of view, and also serve as forwarders for data packets, the ZC builds a mesh or a tree network. ZigBee End Devices (ZEDs) connect directly to ZRs or the ZC, forming local star topologies. An example for a ZigBee network topology is presented in Fig. 2.13.
ZEDs are not able to route packets. ZCs and ZRs correspond to FFDs of the IEEE 802.15.4 specification, while ZEDs correspond to RFDs. An important aspect of ZigBee networks is the fact that neither the ZC, nor ZRs may switch into sleep mode, as they need to be able to receive messages from other motes at any time. On the other hand,
2.8 Multiple Layer Specifications
it is elementary that ZEDs have short duty cycles to reduce their power consumption, as they are supposed to be powered by batteries.
A ZigBee network may operate in the beacon-enabled or beacon-less mode of IEEE 802.15.4, depending on the necessities of the application and the network topology. By default, MAC layer ACKs are enabled. According to the IEEE 802.15.4 specification, possible values for the macMaxFrameRetries parameter are defined to be between 0 and 7, with a default value of three.
The ZigBee NWK layer is responsible for, among other functions, discovering and maintaining routes between devices and relaying messages. It specifies a hierarchical routing scheme for the hierarchical (tree) topology and a peer-to-peer routing protocol based on AODV [36] (see Section 2.5.3 for details) for the mesh topology. While the hierarchical topology is mainly designed for many-to-one traffic, the mesh topology facilitates the communication between any two nodes of the network, i.e., it supports point-to-point traffic. The route selection is based on the path cost calculation metric used by ZigBee, which computes a link cost C{l} for every link on a route and calculates the cost of a path as the summation of the costs of all of the links along the path. When multiple RREQ messages reach the destination, the route corresponding to the one with the minimum total path cost is selected. C{l} is defined to range between one and seven and is calculated as:
C{l} = min 7, round 1 p4l (default), (2.8) 7 (optional), (2.9)
where pl is the one hop LDR [7]. The LDR of a link can be estimated from the LQI
calculated by the receiving node on the reception of a packet. The LQI may be obtained from measurements of the signal-to-noise ratio (SNR), the RSSI or a combination of both. The conversion of LQI to LDR is not specified in the specification and is up to the implementation. Setting the link cost to a fixed value, as in Equation (2.9), is also an option provided by the ZigBee specification. This option is equivalent to applying the HC metric that chooses the shortest available route.
The APL is the top layer of the ZigBee protocol stack, which provides an optional end-to-end reliability mechanism to assure the successful delivery of data between two end nodes. End-to-end ACKs can be used to confirm the reception of the data at the destination node. The loss of a packet is assumed if after a certain amount of time, no application layer acknowledgment (APL ACK) has been received from the destination node. Then, a retransmission of the data packet is initiated. The duration of the time interval during which a response is expected is specified by the RTO value. ZigBee uses blockwise acknowledgments, which are used to confirm the successful reception of several packets at once, similar to the cumulative acknowledgment method of TCP [66]. If the block size is set to one, the end-to-end reliability follows the simple stop-and-wait policy with positive ACKs.
If the data to be transmitted to a destination node exceeds a single data frame’s capacity, the fragmentation option allows to split the data into several frames. The fragments are called ‘Blocks’ and up to apsMaxWindowSize of these blocks may be transmitted consecutively. ZigBee has no congestion window adaptation policy, since the window size is always a fixed amount of blocks. The receiver answers with an ACK that contains a bit field, indicating if any packets of a block are missing. Then the source node may retransmit missing packets from the window, until all of them have been acknowledged. After all packets have been acknowledged, the transmission window is moved, so the following blocks may be transmitted. To make fragmented transmissions possible, it is required that the maximum window size is the same for all nodes in the network.
2.8.2 Z-Wave
Z-Wave offers a protocol for reliable wireless communication, with the main purpose to communicate short control messages from a control unit to one or more nodes in the WSN using end-to-end reliability. This section only focuses on the basic aspects of Z-Wave.
Z-Wave defines 2 basic kinds of devices, which are controlling devices and slaves. Controlling nodes are the ones that initiate commands and distribute the commands to different destinations, while slave nodes reply to and execute these commands. Both, controlling devices and slave devices, may act as relays when it comes to forwarding messages.
Z-Wave is composed of 5 layers:
• PHY: Z-Wave nodes operate at 868 MHz (EUR) and 908 MHz (US) bands, as well as in the 2.4 GHz band, allowing bitrates of 9.6 kbit/s, 40 kbit/s and 100 kbit/s, respectively.
• MAC: Z-Wave uses a CSMA/CA mechanism to access the medium.
• Transfer: This layer controls the transfer of data between two nodes. It includes retransmissions, checksum checks and ACKs.
• Routing: In Z-Wave, source routing is used. This requires the nodes to know the topology of the network. The routing information is included in each packet, so each node along the path acquires the next hop information from the packet. The maximum HC is 4, which is supposed to be enough for HA scenarios.
• Application: The topmost layer of the Z-Wave protocol stack is responsible for decoding and executing commands of the Z-Wave network. It also specifies what kind of messages needs to be interchanged between two nodes of the WSN. End- to-end reliability is provided at this layer too.
Z-Wave is designed to be used in HA environments, where a plentitude of devices needs to be controlled by using short control messages.