You are on page 1of 10

Web Services for Sensor Node Access

Markus Hillenbrand1 , Aline Verney1 , Paul M¨ uller1 , and Tom Koenig2
1

2

University of Kaiserslautern, Department of Computer Science, Postfach 3049, 67653 Kaiserslautern, Germany {hillenbr, verney, pmueller}@informatik.uni-kl.de http://www.icsy.de Fraunhofer Institute for Experimental Software Engineering IESE, Sauerwiesen 6, 67661 Kaiserslautern-Siegelbach, Germany koenig@iese.fhg.de http://www.iese.fhg.de

Abstract. Some research areas rely on simulation instead of experiments. And these simulation scenarios need a suitable data basis to operate on. Besides existing databases containing previously acquired or calculated data, sensor networks are a useful way to acquire necessary data. This paper introduces a software and hardware system that allows users to seamlessly access and integrate data provided by wireless and mobile sensors through a dedicated XML and Web Service enabled middleware. It describes the hardware components that have been utilized and combined to create a sensor node, and it outlines a dedicated middleware architecture to manage sensor nodes, the data gathering process and data access.

1

Introduction

While it is possible to make experiments in many research areas, there are some sectors where only simulations can be used to generate acceptable results. These simulations often operate on mathematical models representing - or modeling - the real world or at least parts of it. As these models need a data basis to calculate their results, suitable input must be generated or acquired. Sensor networks applied in the real world are a common means to measure necessary data and provide the models with the facts they require [3]. Urban planning can be seen as one possible use case for such a scenario. The key word ”sustainable development” has become a main principle in some countries, either by insight of the planners or by guidelines of governments. Its basic message is that current decisions and actions in society, economy and environment should consider the needs of future generations. And to achieve this, it is obviously necessary to find a balance between the three areas (society, economy and environment) and to detect interdependencies between them to understand how they influence each other. But it is not possible to build a city and check its state and progress over the time. Thus, simulation is the only way to gain information about interdependencies and the three-dimensional effects of urban planning.

A comprehensive overview of currently available location sensing systems can be found in [1] and [5]. As sensors can either be mobile or statically attached to a fixed location. so only a wireless solution can be 3 4 Power consumption will not be regarded in this paper as it solely covers the computer science perspective. data formats and security issues3 . Section 5 takes a look into the Web Service architecture provided for client access. It promises better accuracy and reliability because of its civil and commercial purpose. 2 Available Technologies and their Requirements Before presenting the actual hardware and software realization in the next sections. section 2 gives a short overview of currently available and suitable technologies in the area of hardware and software for the creation of wireless sensor devices. Another hindrance for the usage of GPS in sensor nodes might have been the deliberately low precision of the U. communication. a suitable form of communication must be established. The use of the Global Positioning System GPS in sensor nodes has often been ruled out in many scenarios due to high power consumption and other obstacles [2]. the Russian GPS system. Section 3 introduces the selected hardware and section 4 explains the software written for the sensor devices. the decision which to use has to consider the usage scenario. providing information about hardware and software while the middleware and its architecture are only described shortly to present its benefit for programmers and users. is also not very widespread. And there are several possibilities to achieve this. When data gathered by sensor nodes should be made accessible from other entities via the Internet. This may change with the availability of the European GALILEO [11] equivalent scheduled to be ready by 2006 (early test phase) and 2008 (final operational service). While there are numerous techniques to obtain a spatial coordinate representing a real world position like beacon based techniques.2 Markus Hillenbrand et al.S. The usage of GLONASS. signal strength variations and various triangulation techniques. This paper introduces a system using a dedicated middleware platform and special hardware delivered as sensor devices that may be used to gather environmental information and other data needed by mathematical models and distribute it to the (human or software) client. In the following. power consumption and cost. this exclusion should be considered again as with the so called ”GPS on a chip” solutions power consumption and size have been reduced dramatically. their gathered data has to be annotated with the position it has been at the time of measurement. GPS system for civil and commercial usage due to its primary military origin4 . The topics covered are localization. The main focus of this paper lies within the sensors. a short outline of adequate hardware and software requirements for building a sensor network will be presented now. A solution using a hard wired connection is not suitable for mobile sensors. . As shown in section 3.

The benefits of this solution are high bandwidth and ubiquitous availability.4 107. that can be seen as a universal language between entities of different kinds [7].or at least widely agreed . it also enables users and devices to access the Internet using Circuit Switched Data (CSD).Web Services for Sensor Node Access 3 used to connect to the Internet. but also audio and video streams.2 72.4 85.2 53.a flexible. The Global System for Mobile Communications (GSM) allows not only for mobile and wireless telephone services. LAN connections following the IEEE802.6 14.6 62. Connection Speeds in the GSM Net 1 channel 4 channels CSD HSCSD GPRS CS GPRS CS GPRS CS GPRS CS 9. a sensor node should store its data using XML files regarding standardized .2 n/a kBit/s kBit/s kBit/s kBit/s kBit/s 1 2 3 4 The Universal Mobile Telecommunications System (UMTS) introduces the next generation of mobile telecommunication and currently steps into the future of feature-rich and powerful wireless services.4 kBit/s kBit/s kBit/s kBit/s kBit/s kBit/s 57.4 kByte/s using GPRS-CS4 are possible (but not all connection speeds are available in all countries).XML schemas. the imperative choice for this is XML .4 9. only a Virtual Private Network (VPN) can be used to establish a secure connection to a private subnet. regardless of their operating system or programming language.2 kByte/s using CSD and 21. High Speed CSD (HSCSD) or Global Packet Radio Service (GPRS).6 36. Currently available GPRS chips can be integrated in sensor devices seamlessly and thus provide access to the Internet.2 124. While it is possible to dial into arbitrary networks by using (HS)CSD. Its limited availability in Europe at present prevents any prototype usage for mobile sensors. But a glimpse into the future shows sensors providing not only text and value based measurements. connection speeds between 1. human readable. easy to use and allow for future changes and improvements. Table 1. while cost and narrowness limit its usability [5].6 n/a kBit/s kBit/s kBit/s kBit/s kBit/s 8 channels 115.4 15. Thus. It is therefore necessary to define some XML schemas that are flexible enough to be used in various sensor . At this point.11 wireless communication standards are applicable in small areas which are equipped with enough access points providing a sufficient infrastructure.8 171.1 13. As table 1 shows. At this time. GPRS currently only allows a connection to one dedicated provider defined by the telephone company chosen.6 21. Using XML enables different clients to access the data gathered by the sensor nodes. easy to use and future-proof file format. Another important step during the design of a mobile wireless sensor node is to define data formats that are suitable for the scenario.

a TCP/IP stack and a hardware abstraction layer. a u-blox GPS chip. and (6) Beck IPC micro controller. Fig.data security.4 Markus Hillenbrand et al. 1. authorization and accounting are increasingly important as devices and services are becoming more and more ubiquitous. The Beck IPC SC12 is an integrated (embedded) controller . (3) serial interfaces. (4) LAN interface. The Internet Engineering Task Force IEEE considers the abbreviation AAA [6] be a major task in current and future distributed systems: authentication. Its two asynchronous serial interfaces (X101) or its I2C bus can easily be used to operate on appropriate sources or to observe resp.which obviously may define some kind of service to protect . The prototype: (1) u-blox GPS chip. collect data measured by attached devices. This will be explained in more detail in section 4. secure data access and data encryption should be used wherever applicable. and a IC109 control chip. scenarios and simple enough to become a commonly used data format. Figure 1 shows the locations of important components within the prototype. (2) control chips. Additional features are . Three major elements can be found inside the prototype: a Beck IPC@Chip embedded micro-controller. 3 Hardware Configuration Now that possible hardware and software technologies have been outlined in the previous sections. The software consists of a realtime multitasking operating system (RTOS) with a file system. (5) external I2C bus.a miniature high-tech combination of hardware and software. The probably most important aspect to regard creating sensor nodes is security. In the case of sensor nodes . this section describes the hardware chosen to realize the prototype of a mobile sensor node.

It provides several GPS output formats and three different operating modes: in Normal Mode. This mode is best used for applications where no periodical position fixes and low power consumption is required. As the prototype has only one serial interface that can be used (the second is connected to a PC for programming and debugging purposes). The u-blox GPS-MS1E chip installed in the prototype is directly connected to the SC12 micro-controller via one of the serial interfaces. a synchronous serial interface. While the mobile device itself contains the micro-controller and the GPS chip. the module remains in an ultra-low power sleep mode. 2. a special bus-module acts as a connection switch: all elements connected to it have an address and can be accessed asking the bus module with the correct address. In Trickle Power Mode. The controller itself is a 80C186 and 80C188 compatible 16 bit micro-controller running at 20 MHz. the GPS chip sleeps until an external request wakes it up and initiates a position fix. the necessary power supply is 5 V. the third important component on board is a IC109 control chip that allows for switching between the element connected to the port at the outside and the internally attached GPS chip. In between. In order to attach more than one sensor to the serial port of the prototype. voltage is continuously supplied to the module and a software configurable internal timer periodically forces the module to acquire a position fix. BUS Module: Temperature LCD X101 Board GPS SC12 IC109 Fig. all external sensors are attached via a bus module with several addressable connection points. In Push to Fix Mode.Web Services for Sensor Node Access 5 a 10Base-T network interface. and fourteen programmable I/O pins. Depending on the configuration of the prototype board it- . the module is continuously running as long as the operating voltage is supplied and the position fixes are generated at the maximum update rate.

latitude. <xs:element name="measurement" maxOccurs="unbounded"> <xs:complexType> . the software registers all connected sensors and starts some threads responsible for collecting the data at suitable and configurable intervals. annotate it with the correct location data coming from the GPS chip on board and store it for future use. This includes switching to the NMEA-GPGGA protocol. to monitor its state on a serial terminal or to operate in the normal application mode. The data is then stored as an XML file onto the file system of the chip. data transfer. the software running on the Beck IPC micro-controller collects and manages the data. Picture XXX shows how the elements of the prototype work together. it is thus possible to access the whole sensor device using a PC. Its absolute accuracy lies within 0. self. but powerful: it is possible to store any imaginable sensor information using the corresponding XML schema. longitude and height above main sea level). The GPS coordinates are then available as a string and can be processed further.6 Markus Hillenbrand et al. 3. At startup.1 Accessing the GPS Data As the GPS chip uses its own default configuration at startup time. that contains all the information needed to retrieve the current spatial coordinates (time.. four important steps in this data processing will be presented in detail: data collection. it has to be configured to fulfill the needs of the system.. and data security. The following excerpt from the XML schema shows the simple construction of a measured value: .7 and its range of operation is -45 to 130 while its power consumption is below 1 mW.       4 Data Flow and Software Architecture While the hardware presented in the last section is responsible for data acquisition. These XML files are simple. 4. 3. the two most important parts will be explained in more detail now.2 The Temperature Module The temperature module SMT160 attached to the mobile device as a prototype operates on a 5V input and offers its measured data digitally or analog (no A/D converter is needed). Now. data preparation.1 Collecting and Preparing Data The basic task for the Beck IPC is to collect all data measured by the connected sensors. It is then possible to send a special command to the GPS chip (using an application programming interface API for the C programming language) to retrieve the current position through the serial port on demand.

. 4. Every mobile device can be equipped with several sensors (source 1. 210.. 0555*73”. a real value would be something like ” GPGGA.2.. as is nearly every aspect of the data collection phase. E. M. M. As disk space is limited on the prototype’s file system. 1..000000. This value is configurable.   .. 180432.Web Services for Sensor Node Access 7 <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="type" <xs:attribute name="datatype" <xs:attribute name="unit" <xs:attribute name="datetime" <xs:attribute name="position" </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> .*73">10 </measurement> . <measurement type="WindStrength" datatype="int" unit="km/h" datetime="Mon Jul 7 12:36:29 CEST 2003" position="$GPGGA..000000. 1. -31. 3..81. 4927.n) which collect the data. the unit. type="xs:string" /> type="xs:string" /> type="xs:string" /> type="xs:dateTime"/> type="xs:string" /> A measured value contains information about the value type. the GPGGA-GPS string has been shortened. 05.. 0744.0.00. 5 To enhance readability. Mobile Device id sources uptime Source n Source 1 id description type status refresh rate measurement Measured Values Fig. only a fixed number of measurements can be stored for each attached sensor. An example for a current wind strength measurement might be as follows5 : .00.. N. the data type. the date and time of measurement and the position of the device at that time.

a data transfer from the sensor nodes to the middleware has to be established. As data security plays an important role in distributed environments like sensor networks.is to use a dedicated software instance on the Internet to access or query the sensor data. its online time and its administrator. This specialized middleware manages all mobile sensor nodes on one side and offers their collected data to clients on the other side. a sensor device registers with the middleware and exchanges configuration data about the number of attached sensors. it can start a logout process which frees the resources provided by the middleware and stops the regular data exchange threads. All data is then regularly fetched from the sensor node and stored into a database system persistently. Login (once) Mobile Device Query current values (regulary) Logout (once) Fig. 4.and discontinues to collect data. 4.for maintenance or configuration changes etc. data transfer. As the Beck IPC operating system includes a small Web server. it should be made available to clients in order to operate on it. Whenever a mobile sensor device goes offline .8 Markus Hillenbrand et al.and more reasonable way . The XML files containing the measured data are stored in sensor specific subdirectories on the Web server and can be downloaded by any client. it is inevitable to use appropriate means to protect the sensor Middleware . There are two possible ways to achieve this: either the clients contact the sensor nodes directly. all data gathered by the sensors can be accessed through the HTTP protocol. its identification. The second . . This logout process can also be initiated by the middleware in case of a failure. The process of transferring the data is divided into three major steps: login. The data flow of the system contains a login/logout phase and a repeating data transmission phase. All the previously collected sensor data remain in the database system of course. The prototype introduced here offers both methods. and logout. The middleware then creates corresponding update threads that are responsible for the data exchange and synchronization itself.2 Transferring and Securing Data After the data being prepared and stored. To accomplish that. or they access the data by using some kind of middleware. During the login phase.

this will be possible in the near future. Such a client can ask the middleware to present all data from all sensors that can be found within a specified radius. One special service of the middleware is to detect sensors within the range of a mobile clients. tools and programming language). The services offered by the prototype include data access for each mobile device and its connected sensors. [10]. either. The middleware also allows for accounting in many different ways. The prototype uses access control lists to perform authorization and a username and password based authentication model because of its limited computing power and storage capabilities . type of data. As depicted in section 2.Web Services for Sensor Node Access 9 devices against intrusion and to secure the communication with the middleware. Additionally. the mobile client can thus be made aware of the environmental data around it. Here. using certificates. mostly using SOAP6 over HTTP .g. It is possible to receive data for different query parameters like device ID. position. But with the ongoing miniaturization in embedded devices technology. time period.1 known as the Simple Object Access Protocol. . The software is running on a server. or even calculate the costs for a single measurement. the client side of the middleware can offer more flexible. e.and unfortunately data encryption is not advisable here.a standardized XML file format [8]. while encryption is responsible for security during data transmission. As client and server use a more powerful hardware and software. all aspects of AAA can be applied [6]. it can be identified by a URI and can be accessed via the Internet. Thus. It is thus possible for software clients to retrieve the data they need to compute their models or create their charts. It lies within the usage scenario to define which accounting techniques to use. Web Services are loosely coupled and independent of the underlying platform (operating system. It is possible to use some kind of ”flat rate”. enhanced and secure mechanisms to transfer and access the data. 5 Accessing the Data using Web Services While the communication between the middleware and the sensor nodes has been realized using simple XML over HTTP communication. The client communication with the middleware can be secured using data encryption and data access can be managed using high level authentication and authorization techniques. authentication and authorization form the main part of access control. or any combination of these. a software entity offers its services on the Internet by describing them using the Web Service Description Language WSDL . pay for device access. The most recent development in distributed computing and the most promising approach for future distributed systems is the Web Service architecture [4].utilizing MIME encoding extensions for binary attachments where necessary [9]. A provided Java API can be used to easily access the Web Service from within Java programs. 6 Up to version 1. this service is event driven which means that while the client is still moving it receives updates about new sensor nodes or sensor data.

access and management of sensor data becomes even more attractive to programmers and software vendors. the data gathered by these mobile wireless sensor nodes can be easily integrated into client applications. http://www.: Location Discovery in ad hoc wireless networks. Savvides. Jeffrey Hightower. Gaetano Boriello: Location Systems for Ubiquitous Computing.w3.org/TR/xmlschema-0 8. 44 (2003) 435–445 5. This will certainly lead to a better and less purpose-built integration of such devices into sensor networks scenarios. http://www. W3C: XML Schema (2001).org/TR/wsdl 9.smaller and less power consumptive sensor nodes can be realized.and will probably provide a standardized interface in the future. Web Services in combination with XML make it easy to use sensor data in applications . IETF: AAA-Charter (2003). The development of the middleware on the other side showed. programming language or programming model.ietf. Oliver Stiemerling: Web Services als Basis fuer evolvierbare Softwaresysteme.especially Web Services and an enhanced security model for the mobile device . Estrin. As currently hardware becomes more integrated .like GPS and GPRS chips . al. and additionally provide more flexibility and extensibility. Connected to the Internet. Boulis et. Pottie et.w3c. that the use of current technologies like XML and Web Services allow for easy integration and modularization. Wirtschaftsinformatik Nr.org/html. http://europa. W3C: WSDL Specification (2001). Using a Web Service enabled middleware architecture with vast management functionality.org/TR/SOAP-attachments 11.eu. A.: Intrumenting the World with Wireless Sensor Networks. With ongoing miniaturization in chip design.int/comm/dgs/energy transport/galileo/ . Speech. Friedemann Mattern. 6 Conclusion and Future Work This work has shown a scenario where mobile devices equipped with sensors and a dedicated middleware build a system to gather and manage sensor data and support simulation models in various ways.html 7. Salt Lake City.org/TR/soap 10. http://www. IEEE Computer (August 2001) 2. International Conference on Acoustics. W3C: SOAP Attachments (2000).charters/aaa-charter. Networked and Embedded Systems Laboratory. F.could not be realized due to the limited processing power and file system space on the Beck IPC micro-controller. it became obvious that a lot of ideas .10 Markus Hillenbrand et al. A. Informatik Sprektrum 20 (June 2003) 191–194 4. During the development phase.w3c. European Union: Directorate-General for Energy and Transport: European Satellite Navigation System. Koushanfar. Because of its independence of operating system. UCLA (June 2000) 6. References 1. al. Utah 3. Girod. W3C: SOAP Specification (2000). http://www. and Signal Processing (ICASSP May 2001). computer technology and measurement techniques it will sooner or later be possible to run more advanced software components on the mobile devices. http://www.w3c. The solutions found are practical but need a lot of effort. Kay Rmer: Drahtlose Sensornetzwerke.