Soil Property Monitoring Using 6LoWPAN-Enabled Wireless Sensor ...

142 downloads 249 Views 13MB Size Report
(i) 6LoWPAN network monitoring using SNMP (ii) 5TE soil sensor integration with motes and (iii) Agricultural field deployment in consultation with Krishi Vigyan ...
Soil Property Monitoring Using 6LoWPAN-Enabled Wireless Sensor Networks

Proceedings of AIPA 2012, INDIA

277

SOIL PROPERTY MONITORING USING 6LoWPAN-ENABLED WIRELESS SENSOR NETWORKS A. Paventhan, Sai Krishna Allu, Sameer Barve, V. Gayathri and N. Mohan Ram ERNET India R&D Centre, Sadashiva Nagar, Bangalore–560080

ABSTRACT The adaptation of the IPv6 protocol to the IEEE 802.15.4 Low-power Wireless Personal Area Network (LoWPAN) standard has the potential to enable important new class Internet of Things (IoT) applications. The 6LoWPAN adaptation layer defined in IETF RFC 4944 enables end-to-end communication between sensors and the existing IPv6 backbone infrastructure using Internet Protocol. In this paper, we present approaches to SNMP based monitoring of 6LoWPAN networks and demonstrate with agricultural monitoring use-case. In precision agriculture scenario, various sensors can be utilized to monitor water, soil and weather conditions over the internet to improve the irrigation strategies and optimize the use of fertilizer and chemicals. We will present the details of 6LoWPAN network for agricultural application describing (i) 6LoWPAN network monitoring using SNMP (ii) 5TE soil sensor integration with motes and (iii) Agricultural field deployment in consultation with Krishi Vigyan Kendras (KVKs). Keywords: IEEE 802.15.4, 6LoWPAN, IPv6, SNMP, Sensors.

1. INTRODUCTION In the broader vision of Internet of Things, “Things” refer to smart objects embedded in human, refrigerators, TVs, vehicles, mobile phones, clothes, food, medicines, books, etc. These smart objects are active part of the IoT network wherein they should collaborate, understand environment, provide real-time data and/or modify the state of some physical entity. In this context, IPv6 is emerging as a fundamental protocol to meet the scalability requirement of IoT enabling billions of connected objects to be part of the Future Internet by providing huge address space (2128 unique IP addresses). IEEE 802.15.4 LoWPAN and IETF 6LoWPAN are two important enablers supporting seamless connectivity of the IoT devices to the widely deployed existing Internet Protocol (IP) infrastructure. ERNET India has setup a 6LoWPAN experimental testbed for the development of WSN monitoring framework. In this paper, we present an SNMP-based approach to monitor 6LoWPAN network and describe an agriculture deployment scenario. The following

sections of this paper are organized as follows. Section 2 provides the details of 6LoWPAN network monitoring. Section 3 presents the agriculture monitoring use-case while section 4 describes the implementation details. The final section provides the conclusion and future work. 2. 6LoWPAN-ENABLED WIRELESS SENSOR NETWORK MANAGEMENT AND MONITORING 2.1 6LoWPAN Overview The IEEE 802.15.4 (IEEE Std 802.15.4, 2006) Low-rate Wireless Personal Area Networks standard is aimed at applications requiring limited power and moderate throughput requirements. The Internet Protocol (IP) is predominantly used over Ethernet links that offer increasingly high throughput. The transmission of IPv6 packet over LoWPAN links are faced with several challenges due to the resource constraints. However the benefits in enabling IPv6 over 802.15.4 links include: (1) large IPv6 address space and stateless auto configuration (2) easy to monitor/manage the network (3) reusability of application layer protocols (4) seamless and end-to-end integration with internet (5) programmability using of socket APIs. Considering these advantages, the IETF 6LoWPAN working group has defined RFC 4944 specification (6LoWPAN, 2012) to efficiently transport IPv6 datagrams over IEEE 802.15.4 links. Figure 1 shows IPv6 enabled LoWPAN networks and the associated network stack that runs on the low-power sensor nodes. The major functional elements required in 6LoWPAN layer, for adapting IPv6 packets to the resource constrained multi-hop LoWPAN networks include fragmentation, header compression and layer 2 forwarding: Fragmentation: Considering IPv6 MTU size (1280 bytes) and 802.15.4 frame size (127 bytes), the fragmentation and reassembly is essential at the 6LoWPAN adaption layer. The fragmentation header includes IPv6 datagram size, datagram offset and a datagram tag to help in reassembly. Header Compression: The header compression is important to increase the effective pay load of the upper layers. For example, 40 bytes of IPv6 header is compressed to 3 bytes as the source-, destination- address and datagram size can be inferred from layer 2 header.

278

Agro-Informatics and Precision Agriculture 2012 (AIPA 2012)

Layer 2 Forwarding: In mesh routing, the source and the final destination need not be directly connected. The mesh header carries the source and final destination link layer addresses and hop count. The intermediate nodes forwards the packet to the next hop after deducting the hop count. The Reduced Function Device (RFD) rely on the Full Function Device (FFD) for datagram forwarding.

Fig. 1: 6LoWPAN—Enabling IPv6 over Low-power Wireless Sensor Devices

2.2 WSN Management—SNMP-Based Approach SNMP is UDP-based application layer protocol standardized by IETF (Internet Engineering Task Force) for managing TCP/IP based network resources. Both remote and local management of network devices, servers and workstations are possible using SNMP. SNMP supports monitoring device settings and their function, checking workload and performance, managing faults in devices, etc. The components of SNMP are SNMP managers, SNMP agents, MIB (Management Information Base) and the protocol itself. The important functions of sensor management comprise two functions (M. Perillo, 2004) (1) topology control and (2) sensing mode selection. Topology control decides on nodes that would act as coordinators and nodes that perform only sensing. Sensing mode selection controls how many sensors are required to collect data based on parameters such as application specific QoS, network congestion and energy conservation. The sensor management should also ensure that there are enough nodes performing the routing functions to have a “connected network”. The functions of the sensor nodes can also be toggled between active mode to sleep mode, sensing function to routing function etc. to conserve energy or to handle failure of a router. Figure 2 shows SNMP MIB structure for 6LoWPAN management as recommended in IETF draft documents (H. Mukhtar, 2009) with specific goals such as supporting light weight encoding of messages, reduced memory footprint, optimal frequency of polling sensors and adapting SNMPv3 security.

Fig. 2: MIB Structure of 6LoWPAN

Soil Property Monitoring Using 6LoWPAN-Enabled Wireless Sensor Networks

279

The monitorable objects of 6LoWPAN network include lowpanIEEEEUI64Address, lowpanShortAddress, lowpan DeviceRole, lowpanDeviceCapabilities, lowpanRoutingTable, lowpanRoutingProtocol, lowpanBroadcastRetries, lowpanNeighborTable, lowpanAckTimeout and lowpanBroadcastSequenceNumber. Our approach is to define MIB objects generic enough for extending to specific application domains. The SNMP agent will collect data from WSN nodes and sensors, and populate these MIB objects at regular intervals. SNMP Deployment Models Considering the low battery power, limited memory and reduced processing capability of a sensor node, we have to evaluate various alternatives to build an efficient monitoring architecture. To start with, we have to relook at the suitability of a full-fledged SNMP agent running on a node, as the ASN.1 can be too heavy. Since the number of sensing nodes can be potentially large, information gathering from individual nodes separately is expensive which can lead to network congestion and reduce the lifetime of the network. These issues have to be considered during the design of the software architecture. There are different architectural and design scenarios that are possible as shown in Figure 3 to support SNMP on the 6LoWPAN network (H. Mukhtar, 2009). In the first scenario, the SNMP manager talks a light-weight, end-to-end SNMPv3 by employing a few adaptations for 6LoWPAN network. In the second case, SNMP proxy resides between the SNMP manager and 6LoWPAN network, performing the necessary compression and encoding to reduce message overhead. In the last scenario, SNMP agent is run on the 6LoWPAN gateway and it populates its MIB using subagent protocol that could be adapted for 6LoWPAN.

(a) End-to-End SNMPv3

(b) SNMP Proxy Model

(c) SNMP Subagent Model

Fig. 3: SNMP Models for 6LoWPAN Network Management

2.3 ERNET 6LoWPAN Test bed Setup The 6LoWPAN testbed for the development of management/monitoring framework at ERNET India consists of heterogeneous hardware platforms that are shown in Figure 4 and compared in Table 1. The wireless sensor nodes configured for development include TelosB and IRIS motes from Memsic, AVR RAVEN development kit from Atmel Corporation. The hardware and the software details of the test bed are described below: WSN Hardware TelosB mote platform was originally developed by University of California, Berkeley with on-board Temperature, light and humidity sensors. TelosB motes are IEEE 802.15.4 compliant. The IRIS platform is an improved version over previous generations of MICA Motes with large programmable memory of 128KB and provides three times improved

280

Agro-Informatics and Precision Agriculture 2012 (AIPA 2012)

radio range upto 500 meters. AVR Raven Board hardware is based on 2 microcontrollers—ATmega3290P handling sensors/display and ATmega1284P handling the AT86RF230 radio transceiver and the RF protocol stacks. Table 1: ERNET India 6LoWPAN Testbed Hardware Wsn Node

No. of Nodes

Processor

Radio

Memory

Sensors

OS

TelosB

30

16 bit, TI MSP430

CC2420

10K RAM, 48K Flash

Temperature, light and humidity

TinyOS/ Contiki

IRIS

20

8 bit, Atmel ATMega1281

Atmel AT86RF230

8K RAM, 128K Flash

Temperature, light (MDA100)

TinyOS/ Contiki

5

8 bit, Atmel ATMega1284P

Atmel AT86RF230

16K RAM, 128K Flash

Temperature, Voltage and RSSI

Contiki

Atmel AVR Raven

Software Platforms TinyOS is an open source operating system for WSN with major contribution from the University of California, Berkeley in collaboration with Intel research and Crossbow Technology. It is developed and maintained by the academic and industrial community worldwide. TinyOS is a component based operating system written in nesC programming language as a set of cooperating tasks and processes. The IPv6 stack in TinyOS is blip (S.Dawson- Haggerty, 2010), which enables multi-hop IP networks consisting of different motes communicating over shared protocols. Contiki (Contiki, 2012) is an open source, highly portable, multi-tasking operating system for memory-efficient wireless sensor networks. The µIPv6 (A.Dunkels, 2004) stack in contiki is IPv6 Ready Phase 1 certified. The operating system of Contiki is written in C programming language, it consists of an event-driven kernel and the application programs in Contiki can be dynamically linked at run time.

Fig. 4: 6LoWPAN Test bed Hardware

2.4 6LoWPAN SNMP Implementation Contiki-SNMP is an SNMP implementation for the Contiki operating system. It supports User-based Security Model with the HMAC-MD5-96 authentication and CFB128-AES-128 symmetric encryption protocols. It is designed to run on Atmel Raven boards. The contiki SNMP agent implements the SNMPv1 and SNMPv3 message processing models and supports Get, GetNext and Set operations. Contiki-SNMP supports SNMP messages up to 484 octets length. The implementation provides an API to define and configure managed objects (MIB variables). (J.Schoenwaelder, 2011) provides the implementation details and experimental results in running SNMP on AVR RAVEN platform. The SNMPv1 is a lightweight model that takes less CPU cycles since it doesn’t have security features. SNMPv3 includes security features which results in additional code size and CPU cycles for running the security algorithms. Contiki SNMP implementation that is available for AVR Raven platform is currently being ported to IRIS by making hardware specific changes to the code. Application-specific customizations to agricultural domain is also being carried out. 6PANview (6PANview, 2012) is a WSN monitoring system developed on the TinyOS platform and it uses 6LoWPAN blip stack. The SNMP components of 6PANview are a light-weight port of net-snmp and it currently supports SNMPv1. The 6PANview provides transparent proxy model with PAN server that acts as an interface between the administrator and the 6LoWPAN-enabled WSN. The management console is developed using Java.

Soil Property Monitoring Using 6LoWPAN-Enabled Wireless Sensor Networks

281

3. AGRICULTURAL MONITORING—USECASE 3.1 Application Requirements ERNET India is collaborating with experts in precision agriculture from Krishi Vigyan Kendras (under Indian Council of Agricultural Research) and Tamil Nadu Agricultural University (TNAU, 2012). Based on the interactions, it was understood that the following parameters will be helpful to farmers: (1) Soil moisture content (2) Electrical conductivity of soil (3) Temperature of soil at different depths (4) Soil pH and (5) Soil NPK (Nitrogen, phosphorous, potassium) levels. Further, in consultation with KVK, an agriculture field has been identified for deployment in Sargapally (Figure 5) village in Krishnagiri district of Tamil Nadu about 100 kms from Bangalore. 3.2 Soil Sensors Based on the availability of various agriculture sensors in the market, which can measure the parameters mentioned in above section, we found that the 5TE soil sensor (5TE Soil Sensor, 2012) from Decagon device is more suitable. 5TE is a single sensor (Figure 6) that can measure 3 different soil parameters—electrical conductivity (EC), soil temperature and volumetric water content. Like all ECH2O sensors, the 5TE determines volumetric water content by measuring the dielectric constant of the media using capacitance/frequency domain technology. The sensor uses a 70 MHz frequency, which minimizes salinity and textural effects, making the 5TE accurate in most soils. The 5TE measures temperature with an onboard thermistor, and electrical conductivity using a stainless steel electrode array. The sensor connects through a 3 wire cable with a stereo connector or bare wire interface. The three connections are Excitation, Ground and Serial Out (data).The excitation is from 3.6 to 15 volts. Current drain during the water content measurement (approx. 10ms duration) can be as high as 45mA. The sensor outputs data at 1200 baud rate in asynchronous mode with 8 data bits, 1 stop bit and no parity bit. The output from the sensor is in the form of raw data in TTL format as given below: 56 432 645zG The raw data requires to be converted with suitable formula to arrive at the actual soil parameters.

Fig. 5: Precision Farming Field for Deployment

Fig. 6: 5TE Soil Sensor and Data Logger

4. IMPLEMENTATION The Proposed 6LoWPAN architecture for agricultural application is given in Figure 7. The architecture shows the monitoring of remote agricultural sites using 6LoWPAN framework. The architecture has two network segments, namely Agricultural field network and Management Network. Field network will have motes connected to soil sensors, PAN coordinator and a wireless border router. Motes in the field will be configured to run SNMP agent component. They collect sensor data and they will communicate to a central PAN coordinator. The PAN coordinator can communicate to the backbone/internet using the 6LoWPAN border router. The 6LoWPAN border router is the gateway for the field network to connect internet using cellular network. Management network consists of data collecting node(s) and web server. The collecting node can serve the farmer and the agricultural scientist in their study with the archived data over Web. The SNMP manager can be used for monitoring the real-time sensor parameters from the agricultural field over internet. In order to support soil property monitoring, the LoWPAN MIB file is to be extended with the MIB variables for the corresponding parameters supported by the soil sensors. Similarly, the OID table in the SNMP agent code will have to be added with the application-specific structures and call back functions to handle the extended MIB objects. The data aggregated through agricultural monitoring can be utilized to forward control decisions to trigger actuators, for e.g., drip irrigation and fertilization systems. 5TE sensor requires excitation voltage in the range of 3.6–15VDC and the data

282

Agro-Informatics and Precision Agriculture 2012 (AIPA 2012)

output from sensor is also more than 3.6VDC whereas IRIS mote operates with a maximum 3.3VDC. Hence, in order to drive the sensor and handle the data output, an external circuit interfacing soil sensor with IRIS mote was designed. The field deployment and application prototype demonstration will be carried out in further consultations with ICAR and TNAU scientists.

Fig. 7: Proposed Architecture for Agricultural Use-Case

5. CONCLUSION AND FUTURE WORK The number of devices that will connect to the Future Internet is increasing exponentially. The 6LoWPAN adaptation layer enables assignment of IPv6 addresses to low-power wireless devices making them reachable from any other node on the internet. In this paper, we presented an SNMP-based approach to real-time soil property monitoring using a 6LoWPAN-enabled Wireless Sensor Network. Our immediate future work includes the field deployment of our 6LoWPAN network and its connectivity to ERNET IPv6 backbone for real-time soil property monitoring over the internet. Further, we plan to integrate with more sensors such as soil NPK and soil pH monitoring. Also, in addition to monitoring, 6LoWPAN nodes can be connected to actuators in order to effect irrigation and fertigation in response to a particular condition. ERNET India’s 6LoWPAN testbed can be expanded to become an experimental facility to test various ideas, for e.g., relating to heterogeneity, interoperability, scalability, standardization etc. in the Internet of Things domain. ACKNOWLEDGEMENTS This project was funded under the R&D Grants-in-Aid by the CC and BT Group, Department of Electronics and Information Technology (DeitY), Ministry of Communications and IT, Government of India. REFERENCES 5TE Soil Sensor: http://www.decagon.com/products/sensors/soil-moisture-sensors/, 2012. 6LoWPAN:6lowpan working group. http://datatracker.ietf.org/wg/6lowpan/charter, 2012. 6PANview: A network monitoring system for the “internet of things” http://ece.iisc.ernet.in/6panview, 2012. Contiki: The Operating System for Connecting the Next Billion Devices—the Internet of Things. http://www.sics.se/node/108, 2012. Dawson-Haggerty, S., Design, Implementation, and Evaluation of an Embedded IPv6 Stack. Master Thesis, UC Berkley, http://www.cs.berkeley.edu/stevedh/pubs/mthesis.pdf, 2010. Dunkels, A., Alonso, J. and Voigt, T. Making TCP/IP Viable for Wireless Sensor Networks. In First European Workshop on Wireless Sensor Networks, 2004. IEEE Std 802.15.4 Specifications for Low-Rate Wireless Personal Area Networks (WPANs). IEEE Computer Society, September 2006 Mukhtar, H., Joo, S. and Schoenwaelder, J., SNMP Optimizations for 6LoWPAN. http://tools.ietf.org/id/draft-hamid-6lowpansnmp-optimizations-01.txt, 2009. Perillo, M. and Heinzelman, W., Sensor Management. In C.S. Raghavendra, editor, Wireless Sensor Networks, chapter 16, pp. 351–372, Kluwer, 2004. Schoenwaelder, J., Mukhtar, H., Joo, S. and Kim, K., SNMP Optimizations for constrained devices. http://tools.ietf.org/id/drafthamid-6lowpan-snmp-optimizations-03.txt, 2011. TNAU agri portal—precision farming. http://agritech.tnau.ac.in/pres_farm_agri.html.