I had hoped to write up a whole tutorial but I'm too tired to write, so here's the basic steps:
TIP 1) On gamayun, type "cat /dev/mote/ceiling" to see the status of the ceiling motes, you'll see something like this:
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
TIP 2) If you use the -t (test) argument to emcee, to get the test
configuration you'll see an extra field which shows the mapping of
simulated Node ID 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 3) 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).
TIP 4) 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;
}
These 'mote=' directives will be ignored if you're using regular
emsim.
TIP 5) 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.