Transcript figures

Stand-alone PC Environment to Run
WSN Applications
Three Different Environments to Run
WSN Applications
Application Example - BaseStation,
Listen and BlinkToRadio
Lamar
UHCL
Terminal 1 of PC B# java
net.tinyos.tools.Listen -comm
[email protected]:9002
Option 3: Listen connects to
remote SerialForwarder
PC B at UHCL
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
Terminal 1 of PC A# java
net.tinyos.tools.Listen -comm
serial@/dev/ttyUSB1:micaz
Run
BlinkToRadio
MTS300
Option 1: Listen connects to local
+ MicaZ
serial ports
Internet
MIB520
+ MicaZ Run
BaseStation
PC A at Lamar Univ. with IP
140.158.130.239
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
Application Example - Oscilloscope
Lamar
UHCL
Terminal 1 of PC B# java
net.tinyos.tools.Listen -comm
[email protected]:9002
Option 3: Listen connects to
remote SerialForwarder
PC B at UHCL
Terminal 3 of PC B# export
[email protected]:9002
Terminal 3 of PC B# oscilloscope/java/run
Option 4: oscilloscope connects to remote
SerialForwarder
Terminal 1 of PC A# export
MOTECOM=serial@/dev/
ttyUSB1:micaz
Terminal 1 of PC A# oscillloscope/
java/run
Run
OscilloscopeC.nc
MTS300
Option 1: Oscilloscope connects to
+ MicaZ
local serial ports
Internet
MIB520
+ MicaZ Run
BaseStation
PC A at Lamar Univ. with IP
140.158.130.239
Terminal 2 of PC A# java
net.tinyos.sf.SerialForwarder -comm serial@/
dev/ttyUSB1:micaz
Terminal 3 of PC A# export
MOTECOM=sf@localhost:9002
Terminal 3 of PC A# oscilloscope/java/run
Option 2: Oscilloscope connects to
SerialForwarder running on a local machine
Add SENSORBOARD=mts300 in Makefile
Application Example MultihopOscilloscope
GUI Interface
Terminal 1 of PC# java
Run
net.tinyos.sf.SerialForwarder comm serial@/dev/ttyUSB1:micaz MultihopOscilloscopeC.nc
MTS300
+ MicaZ
Terminal 2 of PC#
MultihopOscilloscope/java/run
Text Interface
Terminal 3 of PC# java
net.tinyos.tools.Listen -comm
serial@/dev/ttyUSB1:micaz
MIB520
+ MicaZ
MTS300
+ MicaZ
Run
MultihopOscilloscopeC.nc
Run
MultihopOscilloscopeC.nc
MTS300
+ MicaZ
Run
MultihopOscilloscopeC.nc
MTS300
+ MicaZ
Run
MultihopOscilloscopeC.nc
1. Add SENSORBOARD=mts300 when compile
2. Based on MultihopOscilloscopeC.nc, the root id should be 0
2.a For root node: make micaz install,0 mib510,/dev/ttyUSB0
2.b For non-root node (e.g. node 1): make micaz install,1 mib510,/dev/ttyUSB0
3. chmod 666 /dev/USB*
4. Make sure the root node and non-root nodes are all running
5. How to configurate light, temperature sensors? Modify:
5.a $TOSROOT/tos/platforms/micaz/DemoSensorC.nc
5.b $TOSROOT/tos/sensorboards/mts300/DemoSensorC.nc
5.c $TOSROOT/apps/MultihopOscilloscope/MultihopOscilloscopeAppC.nc
Application Example - MViz
UHCL
Terminal 1 of PC A#java
net.tinyos.sf.SerialForwarder -comm
serial@/dev/ttyUSB1:micaz
Lamar
Terminal 2 of PC A#tos-mviz -comm
sf@localhost:9002 -dir /opt/tinyos-2.x/
apps/MViz MVizMsg
PC B at UHCL
Run MViz
Internet
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
MTS300
+ MicaZ
Run MViz
MTS300
+ MicaZ
Run MViz
MIB520
+ MicaZ
PC A with IP:
140.158.130.239
MTS300
+ MicaZ
MTS300
+ MicaZ
Run MViz
Run MViz
1. Add SENSORBOARD=mts300 when compile
2. Modify MVizSensorC.nc to add related sensors
3. Based on MultihopOscilloscopeC.nc, the root id should be 0
3.a For root node: make micaz install,0 mib510,/dev/ttyUSB0
3.b For non-root node (e.g. node 1): make micaz install,1
mib510,/dev/ttyUSB0
4. chmod 666 /dev/ttyUSB*
5. add CFLAGS += -DCC2420_DEF_RFPOWER=3 in Makefile to
change transmission power
6. How to configurate light, temperature sensors? Modify:
6.a $TOSROOT/tos/platforms/micaz/DemoSensorC.nc
6.b $TOSROOT/tos/sensorboards/mts300/DemoSensorC.nc
6.c $TOSROOT/apps/Mviz/MVizSensorC.nc
MViz
Lamar University
University of Houston,
Clear Lake
TelosB
Run MViz
Run MViz
TelosB
Run MViz
TelosB
Internet
PC A with IP:
140.158.130.239
TelosB
TelosB
Run MViz
Run MViz
Application Example - Octopus
Terminal 1 of PC# java net.tinyos.sf.SerialForwarder
-comm serial@/dev/ttyUSB1:micaz
Terminal 2 of PC# export MOTECOM=serial@/dev/
ttyUSB1:micaz
Data
Collection
Terminal 2 of PC# java OctopusGui
Data
Collection
Run
Octopus
MIB520 +
MicaZ
Data
Collection
Data
Dissemination
Data
Dissemination
MTS300
+ MicaZ
MTS300
+ MicaZ
Run Octopus
Data
Dissemination
Data Run Octopus
Dissemination
Data
Collection
MTS300
+ MicaZ
Run Octopus
Data
Collection
Data
Dissemination
• http://csserver.ucd.ie/~rjurdak/Octopus.htm
MTS300
+ MicaZ
Run Octopus
Octopus
Data
Collection
Data
Collection
Run
Octopus
TelosB
Data
Collection
Data
Dissemination
Data
Dissemination
TelosB
TelosB
Run Octopus
Data
Dissemination
Data Run Octopus
Dissemination
Data
Collection
TelosB
Run Octopus
Data
Collection
Data
Dissemination
TelosB
Run Octopus
BaseStation – Listen - BlinkToRadio
Run BaseStation
run java net.tinyos.tools.Listen comm serial@/dev/ttyUSB0:telosb
TelosB
Mote
TelosB
Mote
Run BlinkToRadio
OscilloScope
GUI Interface
1. run java net.tinyos.sf.SerialForwarder comm serial@/dev/ttyUSB0:telosb
2. Under Oscilloscope/java, run ./run
Text Interface
1. run java net.tinyos.tools.Listen comm serial@/dev/ttyUSB0:telosb
Run BaseStation
TelosB
Mote
TelosB
Mote
Run
OscilloscopeC.nc
TelosB
Mote
Run
OscilloscopeC.nc
MultihopOscilloscope
GUI Interface
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
Run
MultihopOscilloscopeC.nc
Text Interface
1. run java net.tinyos.tools.Listen comm serial@/dev/ttyUSB0:telosb
TelosB
TelosB
Run
MultihopOscilloscopeC.nc
TelosB
Run
MultihopOscilloscopeC.nc
MViz
1. run java
net.tinyos.sf.SerialForwarder
-comm serial@/dev/
ttyUSB0:telosb
UHCL
2. run tos-mviz -comm
sf@localhost:9002 -dir /opt/
tinyos-2.x/apps/MViz
TelosB
MVizMsg
Lamar Univ.
TelosB
Run MViz
Run MViz
Machine in UHCL
TelosB
Run MViz
TelosB
Internet
run tos-mviz -comm
[email protected]:9002 -dir /opt/
tinyos-2.x/apps/Mviz MVizMsg
IP: 140.158.130.239
TelosB
Run MViz
TelosB
Run MViz
Octopus
1. run java
net.tinyos.sf.SerialForwarder
-comm serial@/dev/
ttyUSB0:telosb
Lamar Univ.
2. run
2.a export
MOTECOM=serial@/dev/
ttyUSB0:telosb
TelosB
Run Octopus
Run Octopus
TelosB
2.b java OctopusGui
Run Octopus
TelosB
IP: 140.158.130.239
TelosB
Run Octopus
TelosB
Run
Octopus
The Collection Tree Protocol
Summary of the Detailed Commands
Used in this Paper
• Local Listen connecting to serial port
java 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 -comm
serial@/dev/ttyUSB1:micaz
Summary of the Detailed Commands
Used in this Paper
•SerialForwarder connecting to remote SerialForwarder
java 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
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
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:
Appendix for Extra Configuration
when Running MViz Application
–
$TOSROOT/tos/platforms/micaz/DemoSens
orC.nc
–
$TOSROOT/tos/sensorboards/mts300/Demo
SensorC.nc
– $TOSROOT/apps/Mviz/MVizSensorC.nc
URLs to Download Applications
Illustrated in this Paper
•BaseStation
http://tinyos.cvs.sourceforge.net/tinyos/tinyos2.x/apps/BaseStation
•BlinkToRadio
http://tinyos.cvs.sourceforge.net/tinyos/tinyos2.x/apps/tutorials/BlinkToRadio
•Listen
http://tinyos.cvs.sourceforge.net/tinyos/tinyos2.x/support/sdk/java/net/tinyos/tools/Listen.java
•OscilloScope
http://tinyos.cvs.sourceforge.net/tinyos/tinyos2.x/apps/Oscilloscope
Appendix for URLs to Download
Applications Illustrated in this Paper
•MultihopOscilloScope
http://tinyos.cvs.sourceforge.net/tinyos/tinyos2.x/apps/MultihopOscilloscope
•MViz
http://tinyos.cvs.sourceforge.net/tinyos/tinyos2.x/apps/MViz
•Octopus
http://csserver.ucd.ie/˜rjurdak/Octopus.htm