Recent advances in Wireless Sensor Network (WSN) technology and the use of the Internet Protocol (IP) in resource constrained devices has radically changed the Internet landscape. Trillions of smart objects will be connected to the Internet to form the so called Internet of Things (IoT).
The IoT will connect physical (analogic) environments to the (digital) Internet, unleashing exciting possibilities and challenges for a variety of application domains, such as smart metering, e-health logistics, building and home automation.
The use of IP technology on embedded devices has been recently promoted by the work of the IP for Smart Objects (IPSO) Alliance – a cluster of major IT/telecom players and wireless silicon vendors. At the same time, the Internet Engineering Task Force (IETF) has done substantial standardization activity on IPv6 over Low power Wireless Personal Area Networks. (6LoWPAN).
This new standard enables the use of IPv6 in Low-power and Lossy Networks (LLNs), such as those based on the IEEE 802.15.4 standard. In addition to 6LowPAN, the IETF Routing over Low-power and Lossy networks (ROLL) Working Group has designed and specified a new IP routing protocol for smart object internetworking. The protocol is called IPv6 Routing Protocol for Low-power and Lossy networks (RPL). One of the major benefits of IP based networking in LLNs is to enable the use of standard web service architectures without using application gateways. As a consequence, smart objects will not only be integrated with the internet but also with the Web.
This integration is defined as the Web of Things (WoT). The advantage of the WoT is that smart object applications can be built on top Representational State Transfer (REST) architectures. REST architectures allow applications to rely on loosely coupled services which can be shared and reused.
In a REST architecture a resource is an abstraction controlled by the server and identified by a Universal Resource Identifier (URI). The resources are decoupled by the services and therefore resources can be arbitrarily represented by means of various formats, such as XML or JSON. The resources are accessed and manipulated by an application protocol based on client/server request/responses.
REST is not tied to a particular application protocol. However, the vast majority of REST architectures nowadays use Hypertext Transfer Protocol (HTTP). HTTP manipulates resources by means of its methods GET, POST, PUT, etc.
REST architectures allow IoT and Machine-to-Machine (M2M) applications to be developed on top of web services which can be shared and reused. The sensors become abstract resources identified by URIs, represented with arbitrary formats and manipulated with the same methods as HTTP. As a consequence, RESTful WSNs drastically reduce the application development complexity.
Compared to this, the use of web service in LLNs is not straightforward as a consequence of the differences between Internet applications and IoT or M2M applications. IoT or M2M applications are shortlived and web services reside in battery operated devices which most of the time sleep and wakeup only when there is data traffic to be exchanged. In addition, such applications require a multicast and asynchronous communication compared to the unicast and synchronous approach of standard Internet applications.
The Internet Engineering Task Force (IETF) Constrained RESTful environments (CoRE) Working Group has done major standardization work for introducing the web service paradigm into networks of smart objects.
The CoRE group has defined a REST based web transfer protocol called Constrained Application Protocol (CoAP). CoAP includes the HTTP functionalities which have been re-designed taking into account the low processing power and energy consumption constraints of small embedded devices such as sensors. In order to make the protocol suitable to IoT and M2M applications, various new functionalities have been added.
In this paper we we present a RESTful WSN based on CoAP. It has twofold objective. Firstly, it describes the major differences between CoAP and HTTP and compares the two protocols in terms of power consumption and overhead. In order to demonstrate the benefits of CoAP, we ran two simple experiments with the Contiki Operating System: the first one using CoAP over 6LoWPAN and the second one using HTTP over 6LoWPAN. The results show that the power consumption is drastically lower when using CoAP compared to HTTP.
We also developed an end-to-end IP based architecture integrating a CoAP over 6LowPAN Contiki based WSN with an HTTP over IP based application. The application allows a user to access WSN data directly from a Web browser. The system has been designed for Greenhouse monitoring.
To read more of this external content, download the complete paper from the author archives at the author archives at ETRO.