Using the EmStar Ceiling Array
|
|
Site and Mailing List Search:
|
(See a larger picture)
The EmStar ceiling array lets you run your code using a real, rather than simulated, wireless channel. All instances of the EmStar stack run centrally, just as with EmSim. However, whenever a node tries to send a packet, it is sent to one of the real motes attached to the ceiling of the lab. When a packet is received by a ceiling mote, it is passed up to the simulated node.
Contents:
Before you Begin
Flashing out the Transceiver to the Testbed
Starting hostmoted
Running on the Ceiling Array
Mapping Node ID to Mote ID
Before you Begin
Log into gamayun (a LECS lab machine)
Install TinyOS, AVR and NesC, and ensure the tools are on your path (see Installation Guide)
export TOSDIR=$EMSTAR_DIR/tinyos-1.x/tos
How it Works:
The installation guide provides information on the additional programs that must be installed and compiled to run on the ceiling array.
NOTE: To run on the ceiling array you must use gamayun or another LECS lab machine with access. AVR and NesC should already be installed on gamayun, but you will probably need to add /usr/local/lecs/nesc/bin to your path
WARNING: Not all programs that can be run on the simulator can be directly run on the ceiling array. For example, programs like ping, which require the use of UDP, can not be run directly on the ceiling array.
NOTE: Do not set SIM_GROUP yet
Flashing out the Transceiver to the Testbed
cd tos-contrib/transceiver/apps/Transceiver
./make.pl testbed mica2 -m ceiling.cfg
How it Works:
Will install the same software on each mote in the network, in batch mode.
Starting hostmoted
cd $EMSTAR_DIR/obj.i686-linux
mote/hostmoted -c /etc/node.info -m mica2 -b 57600
How it Works:
Start all the motes in the ceiling array
WARNING: The file in /etc/node.info may not work in its original form. An examination of /dev/mote will give you a list of the mote ids that can be assigned. All numbers in the first column of node.info must be in this list. If necessary, edit node.info before running.
Running on the Ceiling Array
export SIM_GROUP=5
emrun/emcee <sim file to run + any command line parameters>
How it Works:
emcee is run exactly as you would have run emsim. In other words, you give it your exact same emsim configuration file but run "emcee" instead of emsim.
Other Useful Commands:
cat /dev/mote/ceiling
- Check the status of the ceiling motes
- Output will look like:
GAMA:/home/jelson/projects/emstar/obj.i686-linux(5019) cat /dev/mote/ceiling
MoteID Cable Status Position
------ ----- -------- ------------
0 11 ok ( 29, 14)
1 10 ok ( 29, 18)
2 12 ok ( 33, 18)
3 14 ok ( 29, 8)
[...]
127 39 ok ( 17, 14)
128 38 ok ( 17, 18)
129 33 ok ( 17, 26)
54 motes ok, 0 motes dead
Mapping Node ID to Mote ID
View the mapping from Node ID to Mote ID
emrun/emcee -t ../link/examples/ping/ping-simconfig 40
Force a mapping from Node ID to Mote ID (in .sim file)
node 5 {
mote=120;
}
How it Works:
Adding the -t (test) argument to emcee should result in output similar to below. Note the additional column showing the mapping to Mote ID.
GAMA:/home/jelson/projects/emstar/obj.i686-linux(5021) emrun/emcee -t ../link/examples/ping/ping-simconfig 40 Simulator Configuration State 0 Valid from beginning of simulation to end of simulation *** ACTIVE NOW *** Node Mote On/Off Position (m) EmRun Configuration ---- ---- ------ ---------------- ------------------------ 1 0 On ( 29.00, 14.00) ../link/examples/ping/pingtab 2 1 On ( 29.00, 18.00) ../link/examples/ping/pingtab 3 2 On ( 33.00, 18.00) ../link/examples/ping/pingtab 4 3 On ( 29.00, 8.00) ../link/examples/ping/pingtab 5 4 On ( 33.00, 14.00) ../link/examples/ping/pingtab 6 5 On ( 33.00, 22.00) ../link/examples/ping/pingtab [...] 37 107 On ( 9.00, 6.00) ../link/examples/ping/pingtab 38 108 On ( 9.00, 14.00) ../link/examples/ping/pingtab 39 109 On ( 9.00, 22.00) ../link/examples/ping/pingtab 40 110 On ( 13.00, 10.00) ../link/examples/ping/pingtab ****
TIP: When running emcee, the "position" argument of your emrun simulator configuration file is ignored; the real position of the real mote is substituted instead. In the example above, the simulator configuration output shows positions that matched the output of /dev/mote/ceiling (shown earlier).
By default, all motes on the ceiling are assigned to nodes in your simulation in numeric order. If you want to force a particular simulated node to use a particular mote, add (for example) "mote=110" statement to a node block in your simulator configuration. For example:
node 5 {
mote=120;
}
node 6 {
mote=121;
}
NOTE: These mote= directives will be ignored if you're using regular emsim.
TIP: If you're using an emruntab that has support for MoteNIC, make sure to mark the motenic components (hostmoted and motenicd) as "no-sim", just as UDPd is marked as no-sim in the other examples.
To stop the simulation, simply press Control-C.