- Dump cory330-testbed-dhcp.cfg
in the directory tinyos-1.x/contrib/testbed/testbed if you are using
DHCP. This file
is using the IP to mote mappings specified in the dhcpsrv.ini
file above. For static IP configurations that correspond to the
moteIDs, dump the file cory330-testbed.cfg
in the directory tinyos-1.x/contrib/testbed/testbed. The MAC
address to mote mapping, despite the difference in IP addresses, is the
same as that found above.
- Set the environment variables TOS_TESTBED_CONFIG
and PERL5LIB
for the scripts to run
properly
export
PERL5LIB="/opt/tinyos-1.x/contrib/testbed/perl"
export
TOS_TESTBED_CONFIG="/opt/tinyos-1.x/contrib/testbed/testbed/cory330-testbed.cfg"
- Add the directory tinyos-1.x/contrib/testbed/scripts to your PATH
variable and set RSCPATH
appropriately.
export
RSCPATH="/opt/tinyos-1.x/contrib/testbed/rsc"
export
TESTBED_SCRIPTS="/opt/tinyos-1.x/contrib/testbed/scripts"
export
PATH="$PATH:$TESTBED_SCRIPTS"
Note: These scripts will NOT be
called correctly if you also have the directory containing Terence's
RSC scripts in your PATH and RSCPATH variables. This is because
the testbed
scripts call a modified version of intel-program.sh residing in the
testbed/scripts directory which has the same name as intel-program.sh
in the RSC scripts. You can use either the RSC scripts OR the
testbed scripts, not both. When running one, remember to remove
the references to the other
in your PATH and RSCPATH variables.
- Change to the directory containing your NesC program. Then
type
at the command prompt
testbed-program.pl
--testbed=$TOS_TESTBED_CONFIG --download
- Note that it will take several minutes before the download is
complete (it takes about 2 minutes for the 'Blink' application to load
onto 45 nodes), so please be patient (do NOT put the process in the
background... I had difficulties getting it to start up properly again).
- To check on the status of the download, open a new cygwin
shell and type ps at the
command prompt. You can see that the script spawns a lot of new
processes to do the downloading in parallel, since the slowest step is
transferring the program to flash. When all these new processes
are closed, you are done programming.
- A log of the download status of each mote is stored in your
/tmp/rsc.XXXXXXX directory.