«Carles Gómez Josep Paradells José E. Caballero Edita: Fundación Vodafone España Autores: Carles Gómez Montenegro* Universitat Politècnica de ...»
https://projects.nesl.ucla.edu/public/sos-2x/doc/index.html  Contiki web site. http://www.sics.se/contiki/  Microsoft.NET Micro web site.
http://www.microsoft.com/netmf/default.mspx Wireless sensor network architectures and techologies Chapter 11. Wireless sensor network architectures and technologies
11. Wireless sensor network architectures and technologies In the last decade, WSNs have received significant attention mainly from academia, but also from private companies, industry alliances and standardization organizations. Some WSN solutions have been developed for specific applications, while others have been designed for general purpose. These design goals have strong implications for the performance and characteristics of each solution.
This chapter presents a non-exhaustive set of architectures and technologies for WSNs, including some of the main current ones as well as those that are emerging. Section 11.1 presents general purpose WSN solutions.
Section 11.2 overviews solutions for the home automation, building automation and Automatic Meter Reading (AMR) / Advanced Metering Infrastructure (AMI) domains. Section 11.3 gives an overview of the main solutions for Industrial Automation. Finally, Section 11.4 is devoted to other solutions.
11.1. General purpose solutions This section presents the three main WSN architectures and technologies that have been developed for a broad range of applications.
Subsections 11.1.1, 11.1.2 and 11.1.3 overview ZigBee, 6LoWPAN and Bluetooth Low Energy, respectively.
11.1.1. ZigBee ZigBee  is a standard that defines a protocol architecture on top of IEEE 802.15.4, which is used for physical and MAC layers. ZigBee defines network, security and application functionality. The goal of this technology, which is promoted by the ZigBee Alliance, is to enable wireless, reliable and lowpower products for control and monitoring  in all the scenarios for which IEEE 802.15.
4 is suitable, such as industrial, structural, medical, home automation, intelligent vehicular systems, agriculture, environment, etc. At the time of writing, ZigBee is based on the IEEE 802.15.4-2003.
The protocol architecture of ZigBee follows a layered approach, as shown in Fig. 11.1. The ZigBee protocol stack is composed of four main layers, namely: the physical (PHY) layer, the Medium Access Control (MAC) layer, the Network (NWK) layer and the Application (APL) layer. In addition, ZigBee provides security functionality across layers. The two lower layers of the ZigBee protocol stack are defined by the IEEE 802.15.4 standard, while the rest of the ZigBee protocol stack is defined by the ZigBee specification.
Chapter 11. Wireless sensor network architectures and technologies ZigBee defines three device roles: i) the ZigBee coordinator, which corresponds to an IEEE 802.15.4 PAN coordinator, ii) the ZigBee router, and iii) the ZigBee end device. The latter is normally a simple device with very low capabilities and is the only one which corresponds to an RFD.
22.214.171.124. ZigBee NWK layer
The NWK layer provides management and data services. The management tasks comprise network formation (which includes the configuration of a new device, starting, joining and leaving a network) and routing.
The ZigBee NWK layer specifically supports addressing and routing for the tree and mesh topologies. The tree topology is rooted at the ZigBee coordinator. This scheme includes a mechanism for address assignment, which also facilitates multi-hop data delivery. In a mesh topology, routes are created on demand and are maintained by using a set of mechanisms based on the Ad-hoc On-demand Distance Vector (AODV) routing protocol . With this approach, once a path is found, the relaying nodes store the next hop information in their routing tables. Source routing is another option offered by the ZigBee NWK layer. This option relaxes memory requirements of intermediate nodes, since in this case the source includes the path to be followed by a packet while the devices route the packet according to that path. The ZigBee PRO solution (see section 126.96.36.199) also offers many-to-one routing for communication between several devices and a central controller or sink node. This node may reply to the devices by means of source routing. Only ZigBee coordinators and routers participate in routing operations.
The ZigBee NWK layer allows unicast, multicast and broadcast communications. NWK layer addresses have a size equal to 16 bits and are assigned by the ZigBee coordinator, on the basis of the IEEE 802.15.4 address of each device. The NWK layer header includes a one-byte field called radius that limits the number of hops for the packet. The recommended maximum value for this parameter is 30 for mesh routing, 10 for tree routing and 5 for source routing.
188.8.131.52. ZigBee APL layer The APL layer is composed of three sections: the application support (APS) sublayer, the ZigBee Device Objects (ZDOs) and the application framework.
The applications themselves are called application objects and are developed by manufacturers for customizing a device for specific applications.
The APS sublayer offers management services and also provides data services to application objects. The management services include the binding of two end devices. The data services include the support of reliable data transport by means of end-to-end ACKs and control of duplicate data units.
The APS sublayer supports unicast, multicast and broadcast, and in addition, offers indirect addressing, which allows a device with limited resources to communicate with a destination without knowing its address. In this case, data is transmitted to the ZigBee coordinator, which retransmits the message to the destination.
The ZDOs are entities that contain common functionality for all applications operating on a ZigBee device, such as configuring the device in one of the ZigBee device types. The ZDO provides mechanisms to discover other nodes and services in the network and is responsible for the current state of a node in the network.
The ZigBee application framework is the environment that hosts application objects. A single device can accommodate up to 240 application objects. An application object is addressed through its corresponding endpoint. The endpoints range from 0 to 240 (the endpoint 0 identifies the ZDO). The 255 is for broadcast and the rest are reserved for future use. The development of a ZigBee application can make use of application profiles, which are sets of agreements on message formats and processing actions.
An application profile includes clusters and device descriptions. Clusters are sets of attributes and commands. The device descriptions include settings such as the frequency band to be used, buffer and message size, APS capabilities, etc. The cluster space and the device type space have a size of 65536 clusters and devices, respectively.
Finally, the ZigBee Cluster Library (ZCL) is a set of common functions on which to build ZigBee applications and profiles can be built.
Chapter 11. Wireless sensor network architectures and technologies 184.108.40.206. Application profiles There are three types of ZigBee application profiles: public (standard), private and published. Public profiles are managed by the ZigBee Alliance.
Private profiles are defined by ZigBee vendors for restricted use. A private profile can become a published profile if the owner decides to publish it. The ZigBee Device Profile is a collection of device descriptions and clusters27 that correspond to the Application Profile of the ZDO.
The ZigBee Alliance published the ZigBee Home Automation Public Application Profile . This document defines device descriptions, the appropriate use of clusters specified in the ZCL, and other standard practices for ZigBee applications in a residential or light commercial environment. The main application areas considered are lighting, HVAC, window shades and security. Some recommendations for the use of ZigBee in home scenarios include: the use of channel masks to avoid the most commonly used WiFi channels; the use of large routing tables to account for the high density expected in a residential scenario and the discouragement of broadcast transmissions, except when invoking scenes. A scene is a situation for which a set of devices are configured in a particular way (e.g. lights and HVAC are turned down and window shades are closed when the user goes out).
The ZigBee Smart Energy public Profile  focuses on energy demand response and load management applications. With regard to the home area, this profile focuses on communication between home devices and the Energy Service Portal (ESP), which connects a ZigBee Smart Energy Wireless Home Area Network (WHAN) with the communication network of an energy supply company. A ZigBee Smart Energy WHAN has higher security requirements than a regular ZigBee WHAN. Hence, nodes of the latter cannot interoperate with those of the former unless they support the Smart Energy profile.
Finally, the ZigBee Radio Frequency For Consumer Electronics (RF4CE)28 specification offers a simple device-to-device remote control solution for A cluster is a set of commands and attributes. They are defined as application objects.
In March 2009, the RF4CE Consortium agreed to work with the ZigBee Alliance to jointly deliver a specification for radio frequency-based remote controls .
consumer electronics, which will not use full-featured mesh networking capabilities.
Other ZigBee application profiles that are being developed as of the writing of this book are the following:
• Building Automation
• Telecommunications Services
• Retail Services
220.127.116.11. ZigBee versions
Some commercial products exist which fulfill all the requirements of the ZigBee certification. There also exist ZigBee-compliant development platforms.
To date, ZigBee Alliance has defined several versions of the ZigBee standard: the ZigBee 2004 (nowadays considered deprecated), ZigBee 2006, and ZigBee 2007. The latest version of the standard has two feature sets identified as ZigBee and ZigBee PRO. These feature sets are identified as stack profiles29 and are motivated to cope with different requirements in terms of hardware platforms and functionalities. The stack profile labelled 0x01 corresponds to the basic one while 0x02 defines the one associated with ZigBee PRO. The basic stack profile (0x01) is recommended for small networks (e.g. less than 10 hops between a source and its destination).
While ZigBee PRO does not include tree routing30, it does have source routing. This stack is recommended for larger networks (up to 30 hops between a source and its destination) and supports multicast and source routing.
ZigBee PRO also uses a new address assignment algorithm called stochasAccording to the ZigBee specifications, a stack profile is an agreement by convention outside the scope of the ZigBee specification on a set of additional restrictions with respect to features declared optional by the specification itself.
Tree routing comes together with hierarchical address assignment. This routing protocol is very simple but oriented to a source (sensor node)-to-sink (gateway) communication.
Chapter 11. Wireless sensor network architectures and technologies
ZigBee stack is patent free, in the sense that the technologies used, such as the AES encryption algorithm or the routing algorithm, are freely availFragmentation means the partitioning of large packets into smaller packets for transmission. The destination node will reassemble the packets.
Frequency agility is a feature whereby a device can select a frequency channel among a set of several available frequency channels.
able. All participants in the ZigBee Alliance should ensure that no patent protected technology is used in the specification.
By mid-2009, ZigBee had announced the incorporation of IETF standards into its specification portfolio, including the specifications developed by the 6LoWPAN and ROLL WGs .
Despite the initial scepticism of many researchers regarding the suitability of the Internet architecture for sensor networks, today good performance implementations of IPv6 stacks exist for these environments . In fact, IPv6 has solutions ready for network auto-configuration and statelessness as well as satisfying the large address space needed for such networks.
Other expected benefits from the use of IP in the aforementioned scenarios
• IP technology is freely available and has open specifications, which has let to it being better known and understood by a larger audience than that of proprietary solutions.
• IP-based devices can easily be connected to other IP-based networks (such as the Internet) without the use of intermediate elements (e.g. proxies).
At the same time, the IETF has been carrying out standardization of the mechanisms for extending the Internet for WSNs. Furthermore, the use of IP for these devices is being promoted by the recently founded IP for Smart Objects (IPSO) Alliance. While the work done by the IETF is currently in progress, IP-based sensor networks are emerging which could dramatically increase the capillarity of the Internet. Fully standardized IP-based solutions for WHANs will be available in the near future.
The IETF IPv6 over Low power WPAN (6LoWPAN) Working Group (WG) has defined an adaptation layer that specifies the frame format and several mechanisms needed for the transmission of IPv6 packets on top of IEEE 802.15.4 networks. These networks are referred to as
Chapter 11. Wireless sensor network architectures and technologies
LoWPANs. The mechanisms offered by 6LoWPAN are: i) fragmentation, since IPv6 mandates support for 1280-byte packets and the maximum IEEE 802.15.
4 frame size is 127 bytes; ii) header compression, which can compress a common 40-byte IPv6 header to a 2-byte header;