An Experience of Implementing IPv6 based Data Retrieval System for Wireless Sensor Networks Pallavi Sanyal1, Somasri Das1, Suman Sankar Bhunia1, Sarbani Roy2, Nandini Mukherjee2 1 2
School of mobile Computing and Communication Department of Computer Science and Engineering Jadavpur University, Kolkata- 700032, India
[email protected],
[email protected],
[email protected],
[email protected],
[email protected] Abstract— Wireless Sensor Network (WSN) is one of the most demanding research topics prevalent in the modern research domain. WSN consists of densely deployed sensor nodes in the area which is to be sensed or monitored. Each sensor node is a tiny and power constrained device which is assigned the task of monitoring. Sensor networks have a very wide range of application and so they are much in demand. Every tiny sensor node needs to transmit the sensed data to more powerful sink nodes or base station. Thus as communication is an important aspect of WSN, so the underlying technologies being used should also be competent enough to enable better functionalities. This paper deals WSN technologies. A successful WSN has been designed with heterogeneous sensing devices using the most popular and efficient technology, namely the IP technology. Keywords— Wireless Sensor Networks, 6LoWPAN, TinyOS
I. INTRODUCTION Wireless sensor network (WSN) can effectively be used for collection of critical data from various sources like environment, animal body, agricultural field etc. and communicating this data through wireless to remote devices for further analysis or for appropriate actions. The immense potential of WSN can actually be exploited if it can be accessed through the Internet or Web. This has extraordinary significance in the applications of WSN in fields like environmental monitoring, transportation management, disaster management, industrial controls, and many other domains of activity. Current research in WSN focuses on integrating the sensor network with the Internet. In order to realize the full potential of WSN through the Internet, it is needed that the integration of the two technologies must comply with the current and existing standards [6]. The only way to accomplish this is to establish IP connectivity in wireless sensor network. IPv6 can play a central role in this future architecture and TinyOS [7] may be used to provide a software base for academic researches. To bring the IP architecture to TinyOS; the Berkley research group has implemented the Berkeley 6LoWPAN stack, which is later renamed as BLIP - the Berkeley Low power IP stack. This paper uses BLIP to establish IPv6 connectivity and gather information from the motes in sensor networks. The application described in this paper creates an environment
c 978-1-4673-0255-5/12/$31.00 2012 IEEE
which makes a successful indoor monitoring application in wireless sensor network. Rest of the paper is organized as follows: in section II background of this work is discussed. Section III and IV describe the architecture of the system and implementation of it respectively. Finally, we conclude in section V with a direction for the future work. II. BACKGROUND Many ad hoc solutions for low-power wireless networking have been developed in the past years (e.g. ZigBee, Z-Wave etc) making possible to deploy Wireless Sensor Networks (WSN). Earlier, we have developed and deployed an indoor environment monitoring system using zigbee [5]. However, WSNs, which use different proprietary protocols are not able to interact among them unless the use of application gateways at the expenses of increasing design and management complexity. The end-to-end communication can be achieved by using a common network protocol working on top of different link technologies (e.g. Wi-Fi, Ethernet, and 802.15.4) [1]. The usage of an open standard interface such as Internet Protocol (IP) as the common networking layer provides greater robustness and flexibility to the system [2]. In addition, IP provides transparency for host and servers in the network with no need for using gateways and support unique addressability, seamless connectivity as well as wide applicability [3]. The resource constraints in the low-powered sensor devices make impossible the straight forward implementation of IPv6 protocol in sensor motes. So, there is a need for an adaptation layer to run IPv6 over low-power wireless personal area networks known as 6LoWPAN. This adaptation layer works on top of physical and MAC layers, defining how IPv6 datagrams are transmitted using 802.15.4 frames by implementing compression/decompression of IPv6 headers, assuming common values and eliding them when they can be derived from link-layer information over the 802.15.4 or making assumptions based on communication context information [1]. IPv6 suites better than IPv4 to cope with the needs of WSNs because of the inclusion of the bootstrapping functionality, the support for options and the ability for adapting different link technologies. Moreover, the new protocol supports stateless address auto-configuration and the
154
large IP address allows performing cross-layer compression and the utilization of mechanism widely used in wireless sensor networking [2]. We are motivated to implement BLIP as it helps to establish IPv6 connectivity in wireless sensor network providing the following advantages – 1. Enables connection of sensor nodes with other devices in the Intranet/Internet without any application layer gateway 2. Uses standard networking tools in WSNs, like ping, netcat, telnet, http, web services etc 3. Provides interoperability between low-power devices and existing IP devices, using standard routing techniques 4. Increases scalability for 128-bit address space 5. Ability to work with the resource constraints due to low-power, low-memory, low-bandwidth devices Thus, our contribution is setting up an IP based WSN which is composed of heterogeneous devices. Also, an application is developed using nesC which collects data from various environmental sensors and propagates through UDP. III. ARCHITECTURE OF THE SYSTEM BLIP, the Berkeley Low-power IP stack, is an implementation of a number of IP-based protocols in TinyOS. Using BLIP on TinyOS, it is possible to form multi-hop IP networks consisting of different motes communicating over shared protocols [4]. The basic architecture of the system is shown in Figure 1. Sensor nodes route packets among themselves, and to and from the edge routers. Connectivity to the Internet is provided via a small set of edge routers which function as an interface to the Ipv6 Internet. IP is assigned to individual sensor node to ensure distinct identities. Using IP all the way to the sensor nodes provides transparent connectivity between the internet and the subnet. Unlike our earlier deployment where we used only IRIS motes [5], heterogeneous devices, such as TelosB and IRIS are deployed to form the 6lowpan subnet. Also instead of establishing only the connectivity, a new application layer is implemented which retrieves sensed data from each and every sensor node selectively in the heterogeneous system. Thus the architecture eliminates the application-layer gateway.
Fi gure 1:Ba sic Syste m Arch itect ure IV. IMPLEMENTATION We need to install and configure a BLIP-based IPv6 subnet. In an IP network, devices may participate as hosts or routers.
Generally, routers forward packets as well as participate in routing protocols. Every mote running the BLIP network stack functions as a router and is capable of forwarding packets and making routing decisions. Motes thus form a multihop IP subnetwork. In BLIP, a subnet consists of a number of motes (node routers) and one or more higher capability devices (edge routers) which perform a number of routing functions for the network. The edge routers may also provide routing to other networks. In terms of network topology, these BLIP subnets are generally configured as Stub networks. A. Hardware: We have used following hardware components for implementation: • TelosB mote - It is an open source platform designed to enable cutting-edge experimentation for the research community. It bundles all the essentials into a single platform, including USB programming capability, an IEEE 802.15.4 compliant radio chip (CC2420) with integrated antenna, a 8 MHz TI MSP430 microcontroller with 10kB RAM and 1MB external flash for data logging Programming and data collection via USB. There is a sensor suite including integrated light, temperature and humidity sensor. • IRIS mote – It is a 2.4 GHz mote module used for enabling low-power wireless sensor networks. It consists of an IEEE 802.15.4 compliant RF transceiver (RF230) and ATmega1281 microcontroller which runs from its internal flash memory. IRIS 51-pin expansion connector supports analog inputs, digital I/O, I2C, SPI and UART interfaces. These interfaces make it easy to connect to a wide variety of external peripherals. This mote has no integrated sensor module. So, we used MTS310 sensorboard. • MTS310 is a flexible sensor board with a variety of sensing modalities. These modalities include a Dual-Axis Accelerometer, Dual-Axis Magnetometer, Light, Temperature, Acoustic and Sounder. The MTS310 is used with the IRIS motes. B. Software : Desktop PC/laptop loaded with Ubuntu 9.10 and TinyOS Environment installed on Ubuntu. TinyOS 2.1.1 is used for this work. C. Installation: In this section we have described how to establish connectivity and node reachability. The process is divided into three major sub parts. 1) Edge Router Installation: Firstly, we add an 802.15.4 interface to the device. This is typically accomplished using a mote programmed with a radio-serial bridge. When it receives a packet from the serial port, it transmits the packet on the radio; when it receives a packet over the radio, it transmits the packet to the serial port. Because TinyOS has a toolchain for generating and sending packets to a node over a serial port, we use IPBaseStation application which allows PC tools or applications to communicate directly with node routers through edge router. As the heterogeneous subnet is composed
2012 International Conference on Recent Advances in Computing and Software Systems
155
of TelosB and IRIS motes which use different radio transceivers, we mentioned the default channels for radio communications in the makefile of IPBaseStation application.
Also it is required to wire different radio access interfaces of the two radio chips in the IPBaseStation application. We prefer compressed packet formats for the BLIP based network, therefore following code is mentioned in the makefile. 2) Building the Routing Driver: Next, routing driver is built on the edge router. It has one dependency, the TinyOS serial library . The tunneling daemon is a C program on the PC. It uses the libmote C library from the TinyOS distribution for exchanging and interpreting Active Messages with the mote. The 'tun' interface serves as the other end point for the daemon. This is a virtual network interface allowing a user space process to read and write packets to it. It is a proper network interface, to which IP addresses and routes can be assigned and whose traffic is handled by the Linux kernel. The daemon multiplexes between the USB and the 'tun' interfaces using the select call. Upon successful building of the driver, confirmation of the same is shown on the terminal :
MTS310 board. These sensors are all of different make. For this reason, we had to code the application separately to make the use of these sensors. It is also ensured that the channel specified in the Makefile is same as the channel being used by the edge routing driver. The microcontroller on Telos mote uses different kind of sensors on it, such as Hamamatsu S1087 sensor for light (visible range), Hamamatsu S1087 -01 sensor for light (visible and infrared range), Sensirion SHT11 sensor for Temperature & Humidity. TinyOS provides basic chips and interfaces for these sensors. Now in order to make these sensor motes functioning properly, few lines are included in the Makefile of the application.
In component file of the application we add some required interfaces for the sensors concerned:
Applying the appropriate sensors we further add:
Furthermore, the daemon decapsulates the 6LoWPANencapsulated IPv6 packets before writing them to the tun interface as the Linux kernel is not 6LoWPAN-aware. Packets read by the daemon on the tun interface are 6LoWPANencapsulated and sent to the edge router. The mote then forwards them over the radio interface. All processing of the 6LoWPAN en- and de-capsulation is done by the daemon on the PC rather than on the computationally and memory constrained mote acting as the edge router . The 'tun' interface is a layer-3 interface. Therefore, the kernel does not offer all of the neighbour discovery functionality for it. Neighbour solicitation, for example would have to be done by the daemon. Instead of implementing neighbour discovery, packets were simply sent to the 802.15.4 all-ones broadcast address. 3) Node Routers Installation: Once an edge router is commissioned, node routers can be installed. So, an application is coded for node routers. This application provides a UDP echo service on port 7, as well as a very simple UDP-based shell on port 2000. TelosB motes use integrated sensors whereas IRIS motes use sensors of
156
All these are done to ensure data extraction from the sensors. Now the interface is used to display any command or sentence which the user wants to display with the sensor data. So, few components are included in the application:
Here l, v, t and h denote light, voltage, temperature and humidity respectively. In case of MTS310 sensorboard for IRIS motes, corresponding interfaces are wired/mapped to the application. After successful compilation of the application, node routers are programmed accordingly based upon the platform and sensors attached with it. D. Retrieving Data from the System: The last part is to retrieve sensed data from each mote in the network when requested. An IPv6 subnet is created when the node routers and edge router of the subnet are turned on.
2012 International Conference on Recent Advances in Computing and Software Systems
Tunnel driver displays activation of the node routers through 'tun' interface:
Now, to confirm whether the connectivity is successfully established, ICMP echo requests may be sent to the global and link-local addresses of the node routers, as well as to the linklocal all nodes multicast address. To send the echo requests, the ping6 command is used with the -s option to prevent fragmentation of the packets. The implementation on the motes is modified to toggle an LED when replying to an echo request to check whether the right node router has actually sent the reply. The experimental set up used for the system is shown in Figure 2 (A) and (B). As shown in the figures, a TelosB mote has been connected to a desktop PC and made the Base Station of the system. This TelosB functions as the Edge router. The other motes serve as the node routers. Node routers consisted of IRIS and TelosB motes. As IRIS motes do not have embedded sensors, MTS310 sensor board is externally mounted on the IRIS mote. Figure 2 (B) provides a closer look at the edge router and the node routers. This way we have deployed total six TelosB and eight IRIS motes to form the network.
several applications. We have created a set up for indoor environment monitoring using wireless sensor network. Integrating IP technology with sensor networks for such application is a huge achievement made in this direction. It is a step ahead of our earlier work [5]. In this paper, an IP based sensor network has been designed and data has been successfully retrieved. Whatever experiment we have done so far includes creating a testbed where IP meets WSN and retrieving sensed data based on merely request-reply approach. Our future work includes implementation of TCP support, mobility of the node routers and neighbor discovery. Also, we are keen on investigating routing issues in this regard. Performance study of the set-up will also be carried out in future.
Figure 3: Retrieving data from a node router using UDP Based Shell
Figure 2: (A) The experimental set-up; (B) A closer look
When the set up is done successfully and all the implementation steps are followed, data can be retrieved by sending request to the individual node routers using the UDP Based Shell. We can interact with node routers directly using standard networking tools such as netcat, ping. The address for the node routers is fec0::xx (or global IP prefix optionally). The precise command we used is: nc6 –u fec0::b 2000 where fec0::b is the IPV6 address of the specific node router which is requested for data and 2000 is the specific port for the UDP based shell application. As stated before, a provision for a specific Shell command ‘show’ is made in the application to enable data retrieval (‘show’ can be seen as an available command). As shown in Figure 3, data is extracted from node router using this ‘show’ command. For example the command: show light responds with displaying the present amount of light in ‘lux’ unit. Thus we retrieved other sensed parameters also from sensors of other node routers. V. CONCLUSION & FUTURE WORK Wireless Sensor Networks is a relatively new research domain. It is much in demand as it holds a lot of promises in
ACKNOWLEDGMENT We express our heartiest gratitude to School of Mobile Computing and Communication of Jadavpur University for extending the support by allowing us to use all the facilities available in the school. This work is partially supported by funding received from DST-NRDMS for carrying out the research project entitled “Development of an Integrated Web portal for Healthcare management based on Sensor-Grid technologies”. REFERENCES [1]
J. Martinez and J. L. M. Lastra “Application of 6LoWPAN for the Real-Time Positioning of Manufacturing Assets” , in Interconnecting Smart objects with the Internet, 2011 [2] J. Hui, D. Culler, “IPv6 in Low-Power Wireless Networks,” Proceedings of the IEEE, vol. 98, no. 11, November 2010, pp.18651878. [3] S. Hong, D. Kim, M. Ha, S. Bae, S.J. Park, W. jung, J. Kim, “SNAIL: An IP-based wireless sensor network approach to the internet of things,” IEEE Wireless Communications, vol. 17, no. 60, December 2010, pp. 34-42.
[4] [5]
http://docs.tinyos.net/tinywiki/index.php/BLIP_Tutorial
S.S. Bhunia, S. Roy, N. Mukherjee,“ IEMS: Indoor Environment Monitoring System using Zigbee Wireless Sensor Network”, ACM ICCCS 2011, Rourkela, India [6] ITU Report on Internet of Things – Executive Summary: www.itu.int/internetof things/ [7] Levis P., S. Madden, J. Polastre, R. Szewczyk, K. Whitehouse, A. Woo, D. Gay, J. Hill, M. Welsh, E. Brewer, and D. Culler, “TinyOS: An Operating System for Wireless Sensor Networks”, In Ambient Intelligence, Springer- Verlag, 2005.
2012 International Conference on Recent Advances in Computing and Software Systems
157