stand-alone pc environment to run wsn applications

22
Stand-alone PC Environment to Run WSN Applications

Upload: aerona

Post on 14-Jan-2016

64 views

Category:

Documents


0 download

DESCRIPTION

Stand-alone PC Environment to Run WSN Applications. Three Different Environments to Run WSN Applications. Application Example - BaseStation, Listen and BlinkToRadio. Application Example - Oscilloscope. Application Example - MultihopOscilloscope. Application Example - MViz. MViz. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Stand-alone PC Environment to Run WSN Applications

Stand-alone PC Environment to Run WSN Applications

Page 2: Stand-alone PC Environment to Run WSN Applications

Three Different Environments to Run WSN Applications

Page 3: Stand-alone PC Environment to Run WSN Applications

Application Example - BaseStation, Listen and BlinkToRadio

MIB520 + MicaZ Run

BaseStation

MTS300 + MicaZ

Run BlinkToRadio

PC A at Lamar Univ. with IP 140.158.130.239

Lamar

PC B at UHCL

UHCL

Terminal 1 of PC A# java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB1:micaz

Option 1: Listen connects to local serial ports

Terminal 2 of PC A# java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB1:micaz

Terminal 3 of PC A# java net.tinyos.tools.Listen -comm sf@localhost:9002

Option 2: Listen connects to SerialForwarder running on a local machine

Terminal 1 of PC B# java net.tinyos.tools.Listen -comm [email protected]:9002

Option 3: Listen connects to remote SerialForwarder

Terminal 2 of PC B# java net.tinyos.sf.SerialForwarder -comm [email protected]:9002

Terminal 3 of PC B# java net.tinyos.tools.Listen -comm sf@localhost:9002

Option 4: One local SerialForwarder connects to a remote SerialForwarder. Listen connects to local SerialForwarder

Internet

Page 4: Stand-alone PC Environment to Run WSN Applications

Application Example - Oscilloscope

MIB520 + MicaZ Run

BaseStation

MTS300 + MicaZ

PC A at Lamar Univ. with IP 140.158.130.239

Lamar

PC B at UHCL

UHCL

Terminal 1 of PC A# export MOTECOM=serial@/dev/ttyUSB1:micazTerminal 1 of PC A# oscillloscope/java/run

Option 1: Oscilloscope connects to local serial ports

Terminal 2 of PC A# java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB1:micaz

Terminal 3 of PC A# export MOTECOM=sf@localhost:9002Terminal 3 of PC A# oscilloscope/java/run

Option 2: Oscilloscope connects to SerialForwarder running on a local machine

Terminal 1 of PC B# java net.tinyos.tools.Listen -comm [email protected]:9002

Option 3: Listen connects to remote SerialForwarder

Terminal 3 of PC B# export [email protected]:9002Terminal 3 of PC B# oscilloscope/java/run

Option 4: oscilloscope connects to remote SerialForwarder

Internet

Run OscilloscopeC.nc

Add SENSORBOARD=mts300 in Makefile

Page 5: Stand-alone PC Environment to Run WSN Applications

Application Example - MultihopOscilloscope

Run MultihopOscilloscopeC.nc

Run MultihopOscilloscopeC.nc

Run MultihopOscilloscopeC.nc

Terminal 1 of PC# java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB1:micaz

Terminal 2 of PC# MultihopOscilloscope/java/run

1. Add SENSORBOARD=mts300 when compile2. Based on MultihopOscilloscopeC.nc, the root id should be 02.a For root node: make micaz install,0 mib510,/dev/ttyUSB02.b For non-root node (e.g. node 1): make micaz install,1 mib510,/dev/ttyUSB03. chmod 666 /dev/USB*4. Make sure the root node and non-root nodes are all running5. How to configurate light, temperature sensors? Modify:5.a $TOSROOT/tos/platforms/micaz/DemoSensorC.nc5.b $TOSROOT/tos/sensorboards/mts300/DemoSensorC.nc5.c $TOSROOT/apps/MultihopOscilloscope/MultihopOscilloscopeAppC.nc

Run MultihopOscilloscopeC.nc

Run MultihopOscilloscopeC.nc

Terminal 3 of PC# java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB1:micaz

GUI Interface

Text Interface

MTS300 + MicaZ

MTS300 + MicaZ

MTS300 + MicaZ

MTS300 + MicaZ

MIB520 + MicaZ

Page 6: Stand-alone PC Environment to Run WSN Applications

Application Example - MViz

Internet

Run MViz

Run MViz

1. Add SENSORBOARD=mts300 when compile2. Modify MVizSensorC.nc to add related sensors3. Based on MultihopOscilloscopeC.nc, the root id should be 03.a For root node: make micaz install,0 mib510,/dev/ttyUSB03.b For non-root node (e.g. node 1): make micaz install,1 mib510,/dev/ttyUSB04. chmod 666 /dev/ttyUSB*5. add CFLAGS += -DCC2420_DEF_RFPOWER=3 in Makefile to change transmission power6. How to configurate light, temperature sensors? Modify:6.a $TOSROOT/tos/platforms/micaz/DemoSensorC.nc6.b $TOSROOT/tos/sensorboards/mts300/DemoSensorC.nc6.c $TOSROOT/apps/Mviz/MVizSensorC.nc

Run MViz

Run MViz

PC A with IP: 140.158.130.239

PC B at UHCL

LamarUHCL

MIB520 + MicaZ

MTS300 + MicaZ

MTS300 + MicaZ

MTS300 + MicaZ

MTS300 + MicaZ

Terminal 1 of PC A#java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB1:micaz

Terminal 2 of PC A#tos-mviz -comm sf@localhost:9002 -dir /opt/tinyos-2.x/apps/MViz MVizMsg

Run MViz

Terminal 1 of PC B#tos-mviz -comm [email protected]:9002 -dir /opt/tinyos-2.x/apps/Mviz MVizMsg

Terminal 2 of PC B#java net.tinyos.tools.Listen -comm [email protected]:9002

Page 7: Stand-alone PC Environment to Run WSN Applications

MViz

Internet

Run MViz

Run MViz

Run MViz

Run MViz

PC A with IP: 140.158.130.239

Lamar UniversityUniversity of Houston, Clear Lake

TelosB

TelosB

TelosB

TelosBTelosB

Run MViz

Page 8: Stand-alone PC Environment to Run WSN Applications

Application Example - Octopus

• http://csserver.ucd.ie/~rjurdak/Octopus.htm

Run Octopus

Run Octopus

Run Octopus

Run Octopus

Run Octopus

MTS300 + MicaZ

MTS300 + MicaZ

MTS300 + MicaZ

MTS300 + MicaZ

MIB520 + MicaZ

Data Collection

Data Collection

Data Collection

Data CollectionData

Collection

Data Dissemination

Terminal 1 of PC# java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB1:micaz

Terminal 2 of PC# export MOTECOM=serial@/dev/ttyUSB1:micaz

Terminal 2 of PC# java OctopusGui

Data Dissemination

Data Dissemination

Data Dissemination

Data Dissemination

Page 9: Stand-alone PC Environment to Run WSN Applications

Octopus

Run Octopus

Run Octopus

Run Octopus

Run Octopus

Run Octopus

TelosB

TelosB

TelosB

TelosB

TelosB

Data Collection

Data Collection

Data Collection

Data CollectionData

Collection

Data Dissemination

Data Dissemination

Data Dissemination

Data Dissemination

Data Dissemination

Page 10: Stand-alone PC Environment to Run WSN Applications

BaseStation – Listen - BlinkToRadio

TelosB Mote

Run BaseStation

run java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telosb

TelosB Mote

Run BlinkToRadio

Page 11: Stand-alone PC Environment to Run WSN Applications

OscilloScope

TelosB Mote

Run BaseStation

TelosB Mote

Run OscilloscopeC.nc

TelosB Mote

Run OscilloscopeC.nc

1. run java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB0:telosb2. Under Oscilloscope/java, run ./run

1. run java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telosb

Text Interface

GUI Interface

Page 12: Stand-alone PC Environment to Run WSN Applications

MultihopOscilloscope

TelosB

Run MultihopOscilloscopeC.nc

TelosB

Run MultihopOscilloscopeC.nc

TelosB

Run MultihopOscilloscopeC.nc

1. run java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB0:telosb

2. Under MultihopOscilloscope/java, run ./run

TelosB

Run MultihopOscilloscopeC.nc

Run MultihopOscilloscopeC.nc

TelosB

1. run java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telosb

GUI Interface

Text Interface

Page 13: Stand-alone PC Environment to Run WSN Applications

MViz

InternetTelosB

Run MViz

TelosB

Run MViz

TelosB

Run MViz

TelosB

Run MViz

Run MViz

TelosB

run tos-mviz -comm [email protected]:9002 -dir /opt/tinyos-2.x/apps/Mviz MVizMsg

IP: 140.158.130.239

Machine in UHCL

Lamar Univ.UHCL

1. run java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB0:telosb

2. run tos-mviz -comm sf@localhost:9002 -dir /opt/tinyos-2.x/apps/MViz MVizMsg TelosB

Page 14: Stand-alone PC Environment to Run WSN Applications

Octopus

TelosB

Run Octopus

TelosB

Run Octopus

TelosB

Run Octopus

1. run java net.tinyos.sf.SerialForwarder -comm serial@/dev/ttyUSB0:telosb

2. run

2.a export MOTECOM=serial@/dev/ttyUSB0:telosb

2.b java OctopusGui

TelosB

Run Octopus

Run Octopus

TelosB

IP: 140.158.130.239

Lamar Univ.

Page 15: Stand-alone PC Environment to Run WSN Applications

The Collection Tree Protocol

Page 16: Stand-alone PC Environment to Run WSN Applications

Summary of the Detailed Commands Used in this Paper

• Local Listen connecting to serial portjava net.tinyos.tools.Listen -comm

serial@/dev/ttyUSB1:micaz• Local Listen connecting to local SerialForwarder

java net.tinyos.tools.Listen -comm sf@localhost:9002• Remote Listen

java net.tinyos.tools.Listen -comm [email protected]:9002• SerialForwarder connecting to local machine: java net.tinyos.sf.SerialForwarder -commserial@/dev/ttyUSB1:micaz

Page 17: Stand-alone PC Environment to Run WSN Applications

Summary of the Detailed Commands Used in this Paper

•SerialForwarder connecting to remote SerialForwarderjava net.tinyos.sf.SerialForwarder

-comm [email protected]:9002• Set up MOTECOM environment as local serial port:

export MOTECOM=serial@/dev/ttyUSB1:micaz• Set up MOTECOM environment as local SerialForwarder

export MOTECOM=sf@localhost:9002• Set up MOTECOM environment as remote SerialForwarder:

export [email protected]:9002

Page 18: Stand-alone PC Environment to Run WSN Applications

Summary of the Detailed Commands Used in this Paper

•Gateway program for Oscilloscope Application: oscillloscope/java/run • Gateway program for MultihopOscilloscope Application

MultihopOscilloscope/java/run • Local gateway program for Mviz Application

tos-mviz -comm sf@localhost:9002 -dir/opt/tinyos-2.x/apps/MViz MVizMsg • Remote gateway program for Mviz Application

tos-mviz -comm [email protected]:9002-dir /opt/tinyos-2.x/apps/Mviz MVizMsg • Gateway program for Octopus Application

java OctopusGui

Page 19: Stand-alone PC Environment to Run WSN Applications

Extra Configuration when Running MViz Application

•Add SENSORBOARD=mts300 in Makefile when compile• Modify MVizSensorC.nc to add related sensors• Based on MultihopOscilloscopeC.nc, the root id should be 0

– For root node: make micaz install,0 mib510,/dev/ttyUSB0

– For non-root node (e.g. node 1): make micaz install,1 mib510,/dev/ttyUSB0• chmod 666 /dev/ttyUSB*• How to configurate light, temperature sensors? Modify:

Page 20: Stand-alone PC Environment to Run WSN Applications

Appendix for Extra Configuration when Running MViz Application–

$TOSROOT/tos/platforms/micaz/DemoSensorC.nc–

$TOSROOT/tos/sensorboards/mts300/DemoSensorC.nc

– $TOSROOT/apps/Mviz/MVizSensorC.nc

Page 21: Stand-alone PC Environment to Run WSN Applications

URLs to Download Applications Illustrated in this Paper

•BaseStation http://tinyos.cvs.sourceforge.net/tinyos/tinyos-2.x/apps/BaseStation•BlinkToRadio http://tinyos.cvs.sourceforge.net/tinyos/tinyos-2.x/apps/tutorials/BlinkToRadio•Listen

http://tinyos.cvs.sourceforge.net/tinyos/tinyos-2.x/support/sdk/java/net/tinyos/tools/Listen.java

•OscilloScope http://tinyos.cvs.sourceforge.net/tinyos/tinyos- 2.x/apps/Oscilloscope

Page 22: Stand-alone PC Environment to Run WSN Applications

Appendix for URLs to Download Applications Illustrated in this Paper

•MultihopOscilloScope http://tinyos.cvs.sourceforge.net/tinyos/tinyos-2.x/apps/MultihopOscilloscope•MViz

http://tinyos.cvs.sourceforge.net/tinyos/tinyos-2.x/apps/MViz•Octopus

http://csserver.ucd.ie/˜rjurdak/Octopus.htm