Demo: Terra – Scripting Customized Components for Wireless Sensor Networks Adriano Branco

Noemi Rodriguez

Silvana Rossetto

Department of Informatics ´ Pontif´ıcia Universidade Catolica do Rio de Janeiro

Department of Informatics ´ Pontif´ıcia Universidade Catolica do Rio de Janeiro

Department of Computer Science Universidade Federal do Rio de Janeiro

[email protected]

[email protected]

[email protected]

Abstract Terra is a system that combines the use of configurable component-based virtual machines with a reactive scripting language which can be statically analyzed to avoid unbounded execution and memory conflicts. This approach allows the flexibility of remotely uploading code on motes to be combined with a set of guarantees for the programmer. The choice of the specific set of components in a virtual machine configuration defines the abstraction level seen by the application script. In this work we demonstrate an instance of Terra with high-level abstractions for routing and grouping. We discuss how these abstractions allow the programmer to build a reasonably powerful application in a few lines of code and present the integrated environment that facilitates the development and testing of applications.

for different application domains. C´eu-T implements a variation of the C´eu programming language [2]. The Terra Virtual machine VM-T, with its customizations, runs on WSN nodes with limited resources. We built VM-T using the nesC programming language and the TinyOS [1] operating system. Figure 1 presents the three basic elements of Terra.

Keywords WSN Wireless Sensor Networks, Virtual Machine, Reactive Programming, Safety

1

Figure 1. Terra system basic elements.

Introduction

Terra’s goal is to facilitate the creation of WSN applications, specifically as refers to dealing with event-driven programming and with network programming. The Terra model is based on a virtual machine and combines a reactive scripting language with a set of customized components. These components may be selected as needed, creating customized virtual machines with abstractions provided by the component interfaces. A scripting language enforces a programming model that glues components together to create powerful applications in a few lines of code. This makes them suitable for creating programs that benefit from the pre-defined and pre-installed set of components and that can be easily sent over the network. Terra uses C´eu-T as its scripting language and provides a component-based virtual machine VM-T to be customized

Terra’s guarantees for race freedom and against local starvation and invalid pointers contribute to safer code. These guarantees came, basically, from the static analysis of the C´eu compiler and runtime checks of the VM-T execution.

2

VM-T architecture

The Terra virtual machine (VM-T) is composed by three modules as shown in Figure 2.

Figure 2. VM-T modules

International Conference on Embedded Wireless Systems and Networks (EWSN) 2016 15–17 February, Graz, Austria © 2016 Copyright is held by the authors. Permission is granted for indexing in the ACM Digital Library ISBN: 978-0-9949886-0-7

The VM module is the main module. It provides an interface for receiving new application code from the Basic Services module and three interfaces for customized events and functions. The Engine submodule controls the execution of code interpreted by the Decoder submodule and handles external events received from the Event Queue submodule.

245

The Basic Services module controls the communication primitives to support to code dissemination and to the custom components module interface. The Upload Control submodule controls the dissemination protocol and loads code into VM program memory. The Custom Comm submodule has a generic interface to support new communication protocols defined at the Custom Components module level. The Custom Components module implements specific flavors of Terra. The developer of new customization needs only to implement the custom events and functions inside this module and write the equivalent configuration file to be used by a C´eu-T script. It is possible to start from a very basic customization of Terra to include the new events and functions.

3

Terra Customizations

Terra offers a basic library of components that can be included (or not) in a specific virtual machine. As far as possible, these components are parameterized for genericity. New components can also be included by programmer-savvy users to create abstractions for new programming patterns, but the goal of this basic library is to offer a set of components that is sufficient for a range of common applications. This is feasible because most applications for sensor networks are variations of a basic monitoring and control pattern. We organized the needed functionality in four areas: communication – support for radio communication among sensor nodes; group management – support for group creation and other control operations; aggregation – support for information collection and synthesis inside a group; local operations – support for accessing sensors and actuators.

4

The demo example shows how simple it is to write a script commanding complex operations already embedded in the VM-T runtime. In this application, each node monitors the local temperature and, if the reading is above a certain threshold, asks for its one-hop neighbors to send their current readings, and sends the average of the collected results to the basestation. To demonstrate the working application, we use the facility of forcing a rise in the temperature to be read by a node, triggering an aggregation operation. Figure 4 shows how concise is the script to have this complete application. This example, after compilation, has only 105 bytes of bytecode. 1 2 3 4 5 6 7 8 9

pktype msg from msgBS t v a r ulong average ; end ; v a r msg dataMsg ;

with

10 11 12 13 14 15 16 17 18 19 20 21

Demonstration

We begin the demo by presenting the Terra environment composed by: Editor/Compiler – text editor adapted to call the C´eu-T compiler. LoadTool – Java tool to send bytecode to network and receive user messages. Grid Simulator – TOSSIM running a VM-T runtime + Graph viewer - a grid formation where each node reach its neighbors. Node simulation – shows LEDs, radio sends, and sensor reads. The sensor value may be adjusted during execution of the simulation. Figure 3 shows the interfaces for the Load Tool and the Grid simulator.

v a r g r o u p t gr1 ; g r o u p I n i t ( gr1 , 1 , 0 , 1 ,TRUE, eOFF , 0 ) ; v a r a g g r e g t agA ; a g g r e g I n i t ( agA , gr1 , SID TEMP , fAVG , opGTE , 0 ) ;

l o o p do a w a i t 10s ; e m i t REQ TEMP ( ) ; v a r u s h o r t t V a l u e = a w a i t TEMP ( ) ; i f ( t V a l u e > 550) then e m i t AGGREG( agA ) ; v a r aggDone t data = a w a i t AGGREG DONE; dataMsg . average = data . v a l u e ; e m i t SEND BS( dataMsg ) ; end end

Figure 4. C´eu-T code for average alarm

5

Final remarks

Currently Terra runs in MicaZ, Mica2, and TelosB motes, but it may be easily ported to any platform available for TinyOS. Different platform interoperability is possible when using the same radio standard. Terra is available for download at http://www.inf.puc-rio.br/˜abranco/terra.html.

6

Acknowledgments

The authors would like to thank the partial support from CNPq – Brazilian National Counsel of Technological and Scientific Development and FAPERJ – Rio de Janeiro Research Foundation.

7 References [1] P. Levis, 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 sensor networks. In Ambient Intelligence. Springer Verlag, 2004. [2] F. Sant’Anna, N. Rodriguez, R. Ierusalimschy, O. Landsiedel, and P. Tsigas. Safe system-level concurrency on resource-constrained nodes. In Proceedings of the 11th ACM Conference on Embedded Networked Sensor Systems, SenSys ’13, pages 11:1–11:14, New York, NY, USA, 2013. ACM.

Figure 3. Terra Load Tool and Grid Simulator.

246

Demo: Terra – Scripting customized components for Wireless ... - EWSN

Demo: Terra – Scripting Customized Components for Wireless ... the application script. In this work ... programmer to build a reasonably powerful application in a.

224KB Sizes 1 Downloads 79 Views

Recommend Documents

Demo: Ball and Plate Wireless Control - EWSN
now targeting control applications in many domains such as industries ... monitoring systems. Despite ... antee, at the application level, the state of the system.

Demo: Eavesdropping on PolyPoint –Scaling High-Precision ... - EWSN
Systems and Networks (EWSN) 2016 ... teries and Bluetooth communication with a mobile phone. ... The demonstration will affix TriTags to mobile phones.

Poster: Detection of Wormhole Attack on Wireless Sensor ... - EWSN
Poster: Detection of Wormhole Attack on Wireless Sensor ... wireless sensor nodes are duty-cycling, i.e. they will period- .... Cambridge Unversity Press, 2009.

Competition: Towards Low-Latency, Low-Power Wireless ... - EWSN
Beshr Al Nahas, Olaf Landsiedel. Department of Computer Science and Engineering. Chalmers University of Technology, Sweden beshr, olafl @chalmers.se.

Design and Evaluation of Underground Wireless Sensor ... - EWSN
loosen up and store rain water over a longer period of time. Furthermore, they ... store the measurement results, and a real-time clock further helps to reduce the ...

TWIN Node, A Flexible Wireless Sensor Network Testbed - EWSN
node via a Raspberry Pi. • WiFi based back channel that replaces active USB ca- bles. • Performance evaluation of battery and USB powered wireless sensor nodes. • Remote programming and monitoring of wireless sen- sor nodes. 237. International

EasyClosets Partners with InfoTrust for Customized ...
To get a clear picture of conversion success, there were multiple areas that needed to be addressed, from resolving revenue discrepancies to ensuring data was accurately being populated into eCommerce reports. After mapping out the goals and pain poi

EasyClosets Partners with InfoTrust for Customized ...
InfoTrust began working with EasyClosets by first understanding their business goals. They wanted to better track their marketing efforts in Google Analytics, ...

Demo: Deploying a Drone to Restore Connectivity in a WSN - EWSN
CTVR, Department of Computer Science, University College Cork, Ireland. Email: 1t.truong ... pair problem where a drone places a new sensor node to re- place a failed node .... It then sends the received data to the laptop which ex- tracts the ...

IoT Meets Robotics - EWSN
emerging applications mixing robotics with the Internet of. Things. Keywords. IoT, Robotics, Cloud Computing. 1 Introduction. The recent years have seen wide interest and innovation in the field of Internet of Things (IoT), triggered by techno- logic

La terra lliure.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. La terra lliure.

Delaunay Triangulation Demo - GitHub
by Liu jiaqi & Qiao Xin & Wang Pengshuai. 1 Introduction. Delaunay triangulation for a set P of points in a plane is a triangulation DT(P) such that no point in P is ...

Programming Support for Time-sensitive Software Adaptation ... - EWSN
Often, CPS software is also time-sensitive; ... developers to deal with time-sensitive adaptation of control ... ture of the code in the example reflects real imple-.

Towards Middleware Components for Distributed ...
May 31, 2006 - bases, web services, and messaging systems may also be included as .... 1 Underlying actuators may be realized as hardware or software- based entities. ... constraints while also accounting for variation due to network ...

Demo CIC.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Main menu.

Pricelist for Microwave Components -
Power Splitter, Center-freq.1296 MHz, +/- 30 MHz, typ.3.1dB, use to combine two power ampl. ... Amplifiers for the 13 cm-Band 2320-2450 MHz, center frequency 2350 MHz (2304 MHz ...... Call sign.........................................................

Pricelist for Microwave Components -
Internet: http://www.kuhne-electronic.de. Reference frequency amplifier ..... GaAs FET power amplifier, 3400 - 3600 MHz, in 1,2 W, 25 Watt out Psat (CW) on request NEW! ..... 38 - PCB Speed control of KR400 Rotor series. UKW Berichte 2/99.