Design and Construction of a Wireless Sensor and ... - IEEE Xplore

0 downloads 0 Views 569KB Size Report
In this paper, a ready-to-use WSN gateway is constructed to connect WSNs and IPv6 hosts, allowing interaction with each other in real time through the IPv6 ...
Design and Construction of a Wireless Sensor and Actuator Network Gateway based on 6LoWPAN Bruno da Silva Campos 1 2 , Joel J. P. C. Rodrigues 2 , Lu´ıs M. L. Oliveira 2 3 , Lucas D. P. Mendes 2 , Eduardo F. Nakamura 4 , and Carlos Maur´ıcio S. Figueiredo 4 1 Departament

of Computer Science, Federal University of Amazonas, Manaus, AM, Brazil de Telecomunicac¸o˜ es, University of Beira Interior, Covilh˜a, Portugal 3 Polytechnical Institute of Tomar, Tomar, Portugal 4 Analysis, Research and Technological Innovation Center (FUCAPI), Manaus, AM, Brazil 2 Instituto

[email protected], [email protected], {loliveira, lucas.mendes}@it.ubi.pt, {eduardo.nakamura, mauricio.figueiredo}@fucapi.br Abstract—IPv6 over Low-power Personal Area Networks (6LoWPANs) enables IPv6 support for wireless sensor networks (WSNs), making them connectable through the Internet. However, new gateway devices are needed in order to make end-to-end connectivity between sensor nodes and Internet devices possible. In this paper, a ready-to-use WSN gateway is constructed to connect WSNs and IPv6 hosts, allowing interaction with each other in real time through the IPv6 protocol. The experimental results show that the gateway successfully enables communication between a WSN comprising distinct nodes and IPv6 clients, allowing IPv6 clients to read and show sensor nodes data and to actuate on their assets. Index Terms—6LoWPAN; Gateway; IEEE 802.15.4; IPv6; Wireless Sensor Networks.

I. I NTRODUCTION A wireless sensor network (WSN) can comprise hundreds or maybe thousands of small size and low cost sensor devices working together to accomplish a commom task. There is a trend to incorporate these devices in several quotidian objects, realizing a vision of ambient networks where many different devices will collect and process information from many different sources to both control physical processes and to interact with human users [1]. The IEEE 802.15.4 standard was the first low-power standard for WSNs. Several solutions use IEEE 802.15.4 as the link layer technology, some of them proprietary, such as ZigBee [2] and WirelessHART [3]. However, ZigBee and WirelessHART are not compatible with the IP protocol. Thus, in order to connect these networks to the Internet, it is necessary to develop complex gateway systems, that play the role of a proxy between Internet devices and wireless sensor nodes. Hence, the end-to-end connectivity cannot be supported. Moreover, it is necessary to update the gateway when new functionalities are deployed on sensor nodes. As a first step to enable low-power devices to become part of the Internet, the Internet of Things paradigm [4] has been created. It envisions natively IP-enabled and Internetconnected sensor devices, independent of the used physical and MAC layers protocol. The use of IPv6 is expected, since

it provides a larger address space, autoconfiguration, security, among other advantages, but it imposes some requirements for sensor nodes, and reduces extensively its data payload length. Because of that, the IETF 6LoWPAN working group standardized an adaptation layer below IPv6 that provides header compression and packet fragmentation/reassembly, called IPv6 over Low-power Wireless Personal Area Networks (6LoWPAN) [5]. However, in order to enable endto-end connectivity with 6LoWPAN-based sensor nodes and other Internet devices, it is necessary to design 6LoWPANcompliant gateway systems. This paper presents the construction of a new gateway device that enables end-to-end connectivity between 6LoWPANbased sensor nodes and the Internet regular devices. This gateway acts like a router, forwarding IPv6 packets inside or outside the WSN. However, it performs additional tasks, such as 6LoWPAN header compression and packet fragmentation/reassembly. A laboratory testbed has been defined to evaluate the proposed gateway where two different sensor platforms compatible with IEEE 802.15.4 have been used. The remainder of this paper is organized as follows. Section II discusses previous design of WSN gateways. Section III describes the hardware and software design of the proposed gateway. Section IV presents the tests made on the gateway in order to prove its capabilities. Finally, the conclusions are presented in Section V. II. R ELATED WORK Gateway architectures for WSNs have already been proposed in the literature. There are implementations [6][7][8] that design WSN gateways to remotely configure and retrieve data from WSNs and present the results to clients through web technologies. The drawback of these solutions is that they use proprietary protocols to connect the sensor nodes. Because of that, these gateways have to act like proxies, forbidding clients from interacting directly with sensor nodes. The use of standard protocols on sensor nodes, such as IPv6, enables endto-end communication with them, and reduces the gateway complexity.

In the past few years, some applications were developed using 6LoWPAN-enabled WSNs. The projects [9][10][11] specify 6LoWPAN gateways to exchange information of 6LoWPAN-enabled sensor nodes in several application scenarios. However, these papers main focus is describing the interaction between the WSNs and the application scenarios, and not the hardware and software components of the gateway node. There are also projects [12][13] that focus on the development of the 6LoWPAN gateway for WSN, dealing with translation of sensor node short addresses to full IPv6 addresses, and performance analysis of a 6LoWPAN gateway for WSNs, respectively. Compared with these proposals, this paper focuses on the design of a 6LoWPAN gateway for WSNs. Thus, the software architecture of the proposed gateway and its implementation in a ready-to-use physical device are presented. III. G ATEWAY DESIGN Figure 1 illustrates the main interaction between IPv6 users and the WSN through the proposed gateway. The wireless sensor network will be the entity capable of sensing environmental conditions and communicating with other sensor nodes through the 6LoWPAN protocol. The IPv6 user represents the user which will interact directly with the WSN, i.e., he will receive sensor information or send queries or actions to the WSN. The intermediator unit between the IPv6 network and the WSN is the 6LoWPAN gateway, which plays the role of compressing and decompressing IPv6 and transport layer headers, fragmenting packets in order to support IPv6 minimum MTU (Maximum Transmission Unit), and routing IPv6 packets inside the WSN or vice versa. The hardware and software design of the gateway are described next.

Fig. 1.

Interaction between IPv6 users and the 6LoWPAN gateway.

A. Gateway hardware The hardware components of the gateway are shown in Figure 2. The gateway hardware is divided in four main components: i) the mother board where the processor and other components of the gateway are plugged; ii) the storage unit, which stores the operating system and the gateway programs; iii) an Ethernet port to connect the WSN gateway to the IPv6 network; iv) the base station plugged to the USB port to allow connectivity with the WSN. An Intel desktop board D945GCLF (A) with an integrated Intel Atom processor 1.6 GHz has been chosen to be the mother board of the gateway. The main reason for this choice is the low power consumption of the Intel Atom processor and low cost of the board. Besides, the Atom processor provides enough performance to achieve the application requeriments. The mother board has also one DIMM socket for SDRAM memory modules, Intel chipset 945GC and ICH7, and peripherical interfaces for USB and serial ports, among others. The

Fig. 2.

Main components of the gateway hardware.

board is powered by a Channel Well power supply (B), which is plugged to the board through a picoPSU-80 (C), 12V input, power supply. In order to store the Linux operating system and the gateway application, the gateway has been equipped with a Corsair 64GB SSD drive (D) and a Kingston 1GB SDRAM memory. The reasons for the 64GB of storage space are to allow the gateway to backup of the data collected by the WSN and to store logging information. In order to enable communication between the gateway and the 6LoWPAN WSN, an Iris sensor node (E) is used, placed on a MIB520 programming board, and connected to the gateway through a USB cable. The node will act as a base station, transmitting packets received from the USB on the radio, and vice versa. Iris nodes are IEEE 802.15.4 compliant and, therefore, capable of trasmitting 6LoWPAN messages. To provide connectivity to the IPv6 network, the Ethernet port (F) already supported by the mother board has been used. However, the mother board also supports the connection of GPRS or WiFi modems. B. Gateway software architecture Figure 3 illustrates the software architecture used at the gateway device. The gateway connects to the WSN through an IEEE 802.15.4 base station, which is represented by an Iris node placed at the MIB520 programming board. The gateway can also be equipped with several network interfaces in order to communicate with IPv6 networks. In the testbed presented in this paper, every communication with the IPv6 network is done through the Ethernet port. As future development, the gateway will be extended to support GPRS communication. The 6LoWPAN adaptation layer is the part of the gateway responsible for the compression of packets addressed to the WSN and the decompression of packets targeted to the IPv6 network. Moreover, it fragments IPv6 packets larger than 128 bytes (IEEE 802.15.4 MTU) before forwarding data to the WSN. The reconstruction process is also made by the adaptation layer when a packet is addressed to IPv6 networks.

Fig. 3.

Software architecture of the 6LoWPAN gateway.

The application IP-driver, provided by TinyOS, act as the 6LoWPAN adaptation layer in the gateway. The IP-driver is compliant with RFC 4944 [14]. Furthermore, a logging solution has been added to the adaptation layer in order to record its operations. Therefore, all sent or received commands and messages are timestamped and stored in a text file. In order to route IPv6 packets into the WSN, a virtual interface is used. Similar to the loopback interface, a virtual interface simulates a network device, but it is configured to receive packets addressed to the WSN. The 6LoWPAN adaptation layer is attached to the virtual interface aiming to perform compression or fragmentation tasks before forwarding the packet into the WSN. Similarly, a packet received by the adaptation layer can be sent to the virtual interface, and then forwarded to the Internet using other network devices. In addition to forwarding packets to or from the WSN, the gateway has been designed to backup the information collected by the sensor nodes. Therefore, a program responsible for this task has been created. This application basically receives sensor node messages containing sensor readings, timestamps them, and stores them in a CSV file.

Fig. 4.

Message flow among IPv6 hosts, gateway and 6LoWPAN WSN.

has been developed using the Qt framework [15] for the C++ programming language. In the WSN design, six Iris and five MicaZ sensor nodes, running the TinyOS operating system, have been deployed in a single-hop network. All nodes have been configured with the 6LoWPAN protocol stack provided by the TinyOS, called BLIP [16]. Besides, a UDP protocol stack has been used as transport layer. A desktop computer running the Mac OS X operating system has been used to represent the IPv6 client. All elements of the testbed are presented on Figure 5.

C. Message flow Figure 4 depicts the message flow among IPv6 hosts, WSN, and the gateway. The part designated by “(1)” shows the process used by an IPv6 user to send information to the WSN, whereas the symbol “(2)” shows the opposite process. The part “(3)” presents the backup message exchanged between the WSN and the gateway. Despite the gateway need to compress/decompress headers before transmitting IPv6 messages, the gateway acts as an IPv6 router. The gateway will also need to fragment messages, and later reconstruct them, if the message is bigger than the IEEE 802.15.4 MTU. In multihop WSNs, sensor nodes also play the role of IPv6 routers, forwarding 6LoWPAN messages among them. IV. E XPERIMENTAL R ESULTS In order to demonstrate the operation of the gateway device, a testbed consisting of a 6LoWPAN WSN has been deployed in a laboratory scenario to gather the nodes battery voltage and temperature and light measurements of the environment. An IPv6 client application has also been developed to show these readings and to perform actuation on the WSN, changing the reading intervals or setting the nodes leds. This application

Fig. 5.

Picture of the devices used in the testbed.

When the sensor nodes are turned on, they send a router solicitation message to the gateway in order to learn the IPv6 address prefix and other parameters of the IPv6 network. The gateway informs these values through a router advertisement message. Then, sensor nodes become hosts of the IP network and they are able to communicate with other IPv6 hosts. The IPv6 nodes addresses are formed by the IPv6 address prefix

received by the gateway and the 16 bits identifier defined at the installation of the sensor node program. Inside the WSN, every communication among nodes is done using only the 16bits identifier, instead of the full IPv6 address. Figure 6 presents the IPv6 client application interface which interacts with all active nodes in the WSN. After the nodes receive their IPv6 address, they periodically send messages containing temperature, light, and voltage readings to the IPv6 host where the client application is running. When the application receives these messages, it displays them in a table of sensor readings. The application also enables actuation on the sensor nodes. Figure 7 shows the process to set the leds of a specific node or all nodes of the WSN. A similar functionality is provided by the application to change the reading interval of a single mote or all the motes of the WSN.

compression and fragmentation schemes is required. This paper presents the design of a 6LoWPAN gateway device as a solution for the connection of 6LoWPAN WSNs and regular IPv6 devices. The results in a laboratory testbed shows that the gateway allows end-to-end communication with the WSN, since no protocol translation is performed. Hence, it enables IPv6 hosts to get data from heterogeneous sensor nodes or execute actuation on them in real time. As future work, it is intended to do new tests on the gateway device in order to evaluate its interoperability with motes using different operating systems, such as Contiki. Next, this gateway will be deployed in a real testbed for environmental monitoring. Through this deployment, the performance evaluation of the gateway will be studied, and the feasibility of 6LoWPAN in a monitoring application will be demonstrated. ACKNOWLEDGMENTS Part of this work has been supported by the Instituto de Telecomunicac¸o˜ es, Next Generation Networks and Applications Group (NetGNA), Portugal, in the framework of BodySens and EcoSense Projects, and by the Euro-NF Network of Excellence from the Seventh Framework Programme of the EU, in the framework of the PADU Project. R EFERENCES

Fig. 6.

Fig. 7.

IPv6 client presenting sensor nodes readings.

IPv6 client setting the sensor nodes leds.

V. C ONCLUSIONS AND F UTURE W ORK The deployment of Internet connected WSNs can bring several advantages in future WSN applications. However, the support of a full IPv6 header in WSNs have several drawbacks, which can be solved using 6LoWPAN in sensor nodes. Hence, the design of gateway systems to handle the 6LoWPAN header

[1] H. Karl and A. Willig, Protocols and Architectures for Wireless Sensor Networks. John Wiley & Sons, 2005. [2] ZigBee Alliance, “Zigbee specification,” Oct. 2007. [Online]. Available: http://www.zigbee.org [3] Hart Communication Foundation, “Wirelesshart,” Feb. 2010. [Online]. Available: http://www.hartcomm.org/ [4] N. Gershenfeld, R. Krikorian, and D. Cohen, “The internet of things,” Scientific American, vol. 291, no. 4, pp. 76–81, October 2004. [5] J. Hui and D. Culler, “Extending ip to low-power, wireless personal area networks,” Internet Computing, IEEE, vol. 12, no. 4, pp. 37 –45, July-Aug. 2008. [6] P. Qiu, U. Heo, and J. Choi, “The web-sensor gateway architecture for zigbee,” May. 2009, pp. 661 –664. [7] Y. Dun-fan, M. Liang-liang, and W. Wei, “Design and implementation of wireless sensor network gateway based on environmental monitoring,” vol. 2, Jul. 2009, pp. 289 –292. [8] L. Steenkamp, S. Kaplan, and R. Wilkinson, “Wireless sensor network gateway,” Sep. 2009, pp. 1 –6. [9] X. Jiang, S. Dawson-Haggerty, P. Dutta, and D. Culler, “Design and implementation of a high-fidelity ac metering network,” in IPSN ’09: Proceedings of the 2009 International Conference on Information Processing in Sensor Networks. Washington, DC, USA: IEEE Computer Society, 2009, pp. 253–264. [10] A. Jara, M. Zamora, and A. Skarmeta, “Hwsn6: Hospital wireless sensor networks based on 6lowpan technology: Mobility and fault tolerance management,” vol. 2, Aug. 2009, pp. 879 –884. [11] K. Mayer and W. Fritsche, “Ip-enabled wireless sensor networks and their integration into the internet,” in InterSense ’06: Proceedings of the first international conference on Integrated internet ad hoc and sensor networks. New York, NY, USA: ACM, 2006, p. 5. [12] G. R. S, Z. Suryady, U. Sarwar, and M. Abbas, “A gateway solution for ipv6 wireless sensor networks,” Oct. 2009, pp. 1 –6. [13] A. Hasbollah, S. Ariffin, and M. Hamini, “Performance analysis for 6lowpan ieee 802.15.4 with ipv6 network,” in TENCON 2009 - 2009 IEEE Region 10 Conference, 2009, pp. 1 –5. [14] G. Montenegro, N. Kushalnagar, J. Hui, and D. Culler, “Transmission of ipv6 packets over ieee 802.15.4 networks,” September 2007. [15] Nokia, “Qt - cross-platform application and ui framework,” Aug. 2010. [Online]. Available: http://qt.nokia.com/ [16] TinyOS, “Blip tutorial,” Aug. 2010. [Online]. Available: http://docs.tinyos.net/index.php/BLIP Tutorial