wisebed tutorial @ adhocnets 2011

50
WISEBED - Wireless Sensor Network Testbeds Experimentation on the WISEBED WSN Testbed Platform Daniel Bimschas Institute of Telematics, University of Lübeck [email protected] http://www.itm.uni-luebeck.de

Upload: daniel-bimschas

Post on 09-Jun-2015

2.546 views

Category:

Education


1 download

TRANSCRIPT

Page 1: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED - Wireless Sensor Network Testbeds

Experimentation on the WISEBED WSN Testbed Platform

Daniel Bimschas Institute of Telematics, University of Lübeck [email protected] http://www.itm.uni-luebeck.de

Page 2: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Goals of Today’s Tutorial

n  After this tutorial you should:

§  Be able to run and script experiments on the WISEBED testbed platform,

§  Have basic knowledge about APIs and client applications, and

§  Find all necessary documentation

n  During the talk:

§  Please install and boot the WISEBED Virtual Machine (from DVD!) or

§  Install the Experimentation Scripts (Linux / Mac OS X)

2

Page 3: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED - Wireless Sensor Network Testbeds

WISEBED New Website

Page 4: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

New Website

n  New website launched last Friday: http://wisebed.eu/

n  More user-centric §  Clients / Libraries / Documentation §  Development Tools §  Community (join the mailing lists!) §  …

n  Sign up for a WISEBED testbed account online: http://wisebed.eu/site/index.php/register/

n  Send us your Feedback

§  Did you like the site? Why? §  Did you find everything you were looking for? What was missing? §  Got ideas for improvement? Tell us!

4

Page 5: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Outline

1.  Overview §  Available Sensor Nodes §  Testbed Architecture §  Terms

2.  Client Applications §  Web-based §  Desktop-based

3.  Web Service APIs 4.  Live Presentation 5.  Experimentation Hands-On 6.  Advanced Topics (Outlook)

§  Cross-Platform Application Development with the Wiselib §  Run your own Testbed §  Virtual Testbeds

5

Page 6: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Available Sensor Nodes

n  Snapshot from 20. September 2011

n  Distributed across 9 testbeds §  For an up-to-date snapshot see:

http://wisebed.itm.uni-luebeck.de/wiseui-beta/ §  Next week: extension by 144 nodes planned (iSense, TelosB, Pacemate)

6

Page 7: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED - Wireless Sensor Network Testbeds

WISEBED Testbed Architecture Overview

Page 8: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

WISEBED Virtual Unifying Laboratory 8

WISEBED Federation

ULANC

TUD TUBS

FUB

UZL

UNIGE

UBERN

UPC

CTI

Web Services on the Portal Server

Portal Servers at each WISEBED Site

Each Partner maintains its own testbed with different hardware equipment and setup

Users connect to a single testbed directly using a Web service API

Users connect to the federated testbed using the same Web service API

Add simulated nodes to the mix

Page 9: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Terms

n  Portal Server §  Exposes a testbed via Web services

n  Gateway §  Sensor nodes are attached to the gateways §  Typically

-  the same machine as the Portal Server, or -  some other machine with IP-connectivity to the Portal Server -  Clock-synchronized using the Network Time Protocol (NTP)

n  Federator §  Connects two or more Portal Servers §  Exposes them as one testbed (using the same API) §  Used for testbed virtualization (more on that later!)

9

Page 10: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Terms

n  Sensor Node URN §  Addressing of nodes using a Uniform Resource Identifier (URN) §  Example: “urn:wisebed:uzl1:0x1234“ §  URN suffix corresponds with the MAC address of the node (0x1234)

n  URN prefix §  Identifier for a testbed §  Example: “urn:wisebed:testbeduzl:” §  Each Portal Server is responsible for one or more URN prefixes §  All nodes inside this testbed have the same common prefix

n  WiseML §  XML dialect to describe testbed configurations, topologies and

experiment traces

10

Page 11: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

A Typical Testbed Architecture 11

Federator Experimenter 1

Experimenter 2

Gateways

Portal Server

Gateways

Portal Server

Serial (USB) connections

LAN

Page 12: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

The Lübeck Testbed

n  164 sensor nodes in total §  54 iSense §  54 Telos B §  54 Pacemates

12

Page 13: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

The Lübeck Testbed

n  Distributed over all rooms of the Institute

Screenshot: SpyGlass - a modular and extensible visualization framework for WSNs

13

Page 14: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED - Wireless Sensor Network Testbeds

WISEBED Web-based Client Applications

Page 15: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Web Clients - TARWIS

n  http://wisebed.eu/site/index.php/conduct-experiments/web-clients/tarwis/

15

Page 16: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Web Clients - TARWIS

n  Great tool for basic usage scenarios (e.g. reserve, deploy, execute, analyze)

n  Allows to preconfigure and schedule experiments for automatic execution

n  Disadvantages: §  No scripting §  No interaction with running experiments §  Performance issues when experiments generate lots of output

16

Page 17: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Web Clients - WiseUI

n  http://wisebed.eu/site/index.php/conduct-experiments/web-clients/wiseui/

17

Page 18: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Web Clients - WiseUI

n  Expected to become the standard user interface

n  Currently under heavy development

n  Beta version available §  Only limited (basic) functionality §  No scheduling, scripting §  http://wisebed.itm.uni-luebeck.de/wiseui-beta/

n  Useful for reservation and testbeds overview

18

Page 19: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED - Wireless Sensor Network Testbeds

WISEBED Desktop Client Applications

Page 20: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Desktop Clients - SpyGlass 20

n  A modular and extensible visualization framework for WSNs n  http://wisebed.eu/site/index.php/conduct-experiments/desktop-clients/spyglass/

Page 21: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Desktop Clients – Experimentation Scripts 21

n  A set of command line scripts to execute, control and interact with your experiment

n  http://wisebed.eu/site/index.php/conduct-experiments/desktop-clients/experimentation-scripts/

n  Allows you to §  “Program” your experiments §  E.g. explore parameter space §  Automatically repeat experiments §  Programmatically analyze, convert and process output of nodes

n  How does it work? §  Scripts written in the Java programming language (BeanShell interpreter) §  Executed from the command line §  Like all clients they use the WISEBED Web Service APIs

Page 22: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED - Wireless Sensor Network Testbeds

WISEBED Web Service APIs Basics

Page 23: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

The WISEBED Testbed APIs

n  SNAA: Sensor Network Authentication and Authorization API

n  Facade in front of the single sign-on system Shibboleth n  Supports other authentication/authorization frameworks, too

n  http://wisebed.eu/api/java/current/reference/eu/wisebed/api/snaa/SNAA.html n  http://wisebed.eu/api/wsdl/snaa/current/

23

RS  SNAA   Session  Management   WSN  WSN  WSN  WSN  Controller  

iWS

N

Page 24: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

The WISEBED Testbed APIs

n  RS: Reservation System API

n  Provides basic operations for reservations n  Different implementations in use (Google Calendar, JPA, ...)

§  http://wisebed.eu/api/java/current/reference/eu/wisebed/api/rs/RS.html §  http://wisebed.eu/api/wsdl/rs/current/

24

RS  SNAA   Session  Management   WSN  WSN  WSN  WSN  Controller  

iWS

N

Page 25: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

The WISEBED Testbed APIs

n  Controller API

n  Runs on client side n  „Controls“ the experiment n  Receives output and backend notifications

§  http://wisebed.eu/api/java/current/reference/eu/wisebed/api/controller/Controller.html §  http://wisebed.eu/api/wsdl/iwsn/current/

25

RS  SNAA   Session  Management   WSN  WSN  WSN  WSN  Controller  

iWS

N

Page 26: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

The WISEBED Testbed APIs

n  Session Management API

n  Provides method to static testbed (configuration) information n  Provides access to the reserved nodes (via getInstance())

§  http://wisebed.eu/api/java/current/reference/eu/wisebed/api/sm/SessionManagement.html §  http://wisebed.eu/api/wsdl/iwsn/current/

26

RS  SNAA   Session  Management   WSN  WSN  WSN  WSN  Controller  

iWS

N

Page 27: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

The WISEBED Testbed APIs

n  WSN: Wireless Sensor Network API (selection of methods!)

n  Provides methods to §  Interact with sensor nodes (flash, reset, send messages, …) §  Configure the backend system (more on that later!)

§  http://wisebed.eu/api/java/current/reference/eu/wisebed/api/wsn/WSN.html §  http://wisebed.eu/api/wsdl/iwsn/current/

27

RS  SNAA   Session  Management   WSN  WSN  WSN  WSN  Controller  

iWS

N

Page 28: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Interaction of the APIs - Client Perspective 28

!"#"$%&'()*+,#-".*/0123345#"6"785-.89)5:;9"6"<=87"2>>>?3$#*

+@AA*/0123345#"6"785-.89)5:;9"6"<=87"2>>?B3#)&&*

5C+@*+"##5()*D&)&E".")-*/0123345#"6"785-.89)5:;9"6"<=87"2>>>>3#"##5()#*

C+@*F$5%&-"*G!H*

I()-$(;;"$*

J"&)+/";;*+<$51-*K8*$"#"$%

"*)(7"#*

L8*<$"&-"*")71(5)-*

M8*$"-$5"%"*C+@*5)#-&)<"*

)NO8*#/9-7(4)*C+@*5)#-&)<"*

P""76&<=*</&))";*

Page 29: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Interaction of the APIs – Backend Perspective 29

isAuthorized()

User SNAA RS Session Management

authenticate()

secretAuthenticationKeys

makeReservation()

reply

secretReservationKeys

getInstance()

getReservation()

reservationData

Private WSN API endpoint URL WSN

<<create>>

Page 30: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Live Presentation

n  Experimentation Scripts

n  Pre-installed in the WISEBED Virtual Machine http://wisebed.eu/site/index.php/application-development/virtual-machine/

n  Download 0.7.3-SNAPSHOT http://www.itm.uni-luebeck.de/projects/testbed-runtime-htdocs/tr.experimentation-scripts-0.7.3-SNAPSHOT.tar.gz

n  Documentation https://github.com/itm/testbed-runtime/wiki/Experimentation-Scripts-0.7.3

30

Page 31: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Live Presentation

1.  List node URNs of type „isense“ wb-list-node-urns testbeds/uzl.properties lines isense export NODES=…"

2.  Reserve nodes (20 minutes, starting from now) wb-reserve testbeds/uzl.properties 20 0 $NODES export RESERVATION=…"

3.  Check liveliness wb-are-nodes-alive testbeds/uzl.properties $RESERVATION"

4.  Listen to node output wb-listen testbeds/uzl.properties $RESERVATION "

5.  Reset nodes wb-reset testbeds/uzl.properties $RESERVATION "

6.  Flash nodes wb-flash testbeds/uzl.properties $RESERVATION binary-images/example_app.bin

31

Page 32: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Live Presentation 32

Page 33: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED - Wireless Sensor Network Testbeds

WISEBED Web Service APIs Advanced Stuff

Page 34: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

The Channel Pipeline

n  Problem: §  Every sensor node operating system uses a different message framing

n  Examples: §  TinyOS: Raw or HdlcTranslateC (HDLC-based framing) §  iSense: Raw or DLE STX ... DLE ETX (HDLC-like framing) §  Your experimental OS: ?

n  Testbed backend can only forward raw bytes to clients

34

Page 35: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

The Channel Pipeline

n  Configurable preprocessing of node output in the backend

35

Sensor Node

Client

Downstream Upstream

Upstream Handler N

Upstream Handler N-1

Upstream Handler 1

Downstream Handler 1

Downstream Handler N

Downstream Handler N-1

Channel Pipeline

Page 36: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

The Channel Pipeline 36

n  Example configurations:

Sensor Node

Client

Downstream Upstream

Raw Bytes = Empty Channel Pipeline

Sensor Node

Client

Downstream Upstream

DleStxEtxFramingDecoder DleStxEtxFramingEncoder

Messages = Framing / Deframing Handlers

DLE STX hell o world DLE ETX

hello world

DLE STX hell o world DLE ETX

hello world

Page 37: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

The Channel Pipeline 37

Page 38: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Live Presentation 38

Page 39: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED - Wireless Sensor Network Testbeds

WISEBED Hands-On Session

Page 40: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Hands-On Session

1.  List node URNs of type „isense“ on UZL testbed (wb-list-node-urns) Only 1 node!!!

2.  Reserve nodes (60 minutes, starting from now) (wb-reserve)

3.  Check liveliness (wb-are-nodes-alive) 4.  Listen to node output (wb-listen)"5.  Reset nodes (wb-reset)"6.  Flash nodes (wb-flash) 7.  Set an empty channel pipeline

(set-channel-pipeline) 8.  Set a DleStxEtx channel pipeline

(wb-set-channel-pipeline)

40

Page 41: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED - Wireless Sensor Network Testbeds

WISEBED Advanced Topics (Outlook)

Page 42: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

42 Wiselib: Platform-independent algorithms

n  Library of algorithms (like the C++ STL) §  Platform-independent (the Java of WSNs) §  Avoid vendor lock-in §  60+ well-known algorithms implemented §  Template-based, highly efficient (low footprint)

n  Growing community of contributors §  Benefit from others, contribute for others

n  Preinstalled in the Virtual Machine

42

Page 43: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Current Set of Algorithms 43

Routing DSDV, DSR, Tree, Flood, TORA, AODV, …

Clustering BFS, DFS, LEACH, …

Timesync Flash Mob, LTS, TPSN, HRTS, …

Localization Triangulation, Ad-hoc Positioning, N-hop Multilateration, Robust Positioning, GPS-free Positioning, …

Energy Saving LMST, FLSS, Kneigh, XTC, CBTC, Ant-based, …

Security SecureHDL, SecureDFS, AES, Elliptic Curve, SHA-1, HARPS, …

Graph Algorithms DDFS, DBFS, TwoHop, Judged, MultiJudged, ParMultiJudged, …

Virtual Links For wired and wireless testbeds

Page 44: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Wiselib: Supported Platforms OS Radio Timer Logging Clock Serial Random

Contiki þ þ þ þ þ þ

TinyOS þ þ þ þ þ þ

iSense þ þ þ þ þ þ þ

ScatterWeb þ þ þ þ

Feuerware þ þ þ þ

TriSOS þ þ þ þ þ

Shawn þ þ þ þ þ þ þ

Linux þ þ þ þ þ þ

Android þ þ þ þ

iOS þ þ þ þ

Page 45: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Run your own Testbed

n  All WISEBED implementations (back-/frontend) are Open Source!

n  http://wisebed.eu/site/index.php/run-your-own-testbed

n  Reference implementation: Testbed Runtime n  Run it at your desk n  Run it with your local (private) testbed n  Run it in a federation

n  Separate implementations of APIs (for flexibility) n  Authentication & Authorization (SNAA)

n  Htpasswd, Shibolleth, LDAP, … n  Reservation (RS)

n  Google Calendar, Java Persistence API, … n  Experimentation (iWSN)

45

Page 46: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Virtual Links - Introduction 46

TS   VL  VL  

VL  

VL  

VL  

TS  VL  

VL  

VL  

VL  

VL  

Page 47: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Virtual Links

n  Virtual radio is used by the application instead of the physical one §  For every packet that passes through it decides depending on the

destination ID §  To drop it/alter it §  To forward it via one or all interfaces

47

Application uses special „virtual radio“ interface

(implemented, e.g., in the Wiselib )

Page 48: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Virtual Links

n  Virtual links between §  Same testbed §  Remote

testbeds §  Real and

simulated testbeds

n  Virtual radio forwards packets to the testbeds server

n  Testbed server routes messages to the destination

48

Page 49: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Dancing Demo

n  http://www.youtube.com/watch?v=J0F7LFIpDe8

49

Page 50: WISEBED Tutorial @ ADHOCNETS 2011

WISEBED – Wireless Sensor Network Testbeds – http://wisebed.eu

Summary

1.  Overview §  Available Sensor Nodes §  Testbed Architecture §  Terms

2.  Client Applications §  Web-based §  Desktop-based

3.  Web Service APIs 4.  Live Presentation 5.  Experimentation Hands-On 6.  Advanced Topics (Outlook)

§  Cross-Platform Application Development with the Wiselib §  Run your own Testbed §  Virtual Testbeds

50