ceiling-install.pl from EmStar at Krugle
Show ceiling-install.pl syntax highlighted
#!/usr/bin/perl
#
#
@ARGV==3 or die "Usage: ceiling-install.pl <config file> <serial port prefix> <SREC file> \n".
"Example: ceilinf-install.pl ceiling_motes.cfg /dev/tty obj.mica2/mote/Transceiver\n".
"NOTE: the script will use the FIRST column of the config file as the serial port index and the SECOND column as the mote ID.\n".
"The two columns must be separated by a SINGLE space\n";
$config_file = $ARGV[0];
$serial_port_prefix = $ARGV[1];
$srec_file = $ARGV[2];
my $count=0;
# open the config file
open ("CONFIG_FILE", "<$config_file") or
die "Cannot open config file $config_file\n";
# open the srec file just to see if it exists
open ("SREC_FILE", "<$srec_file") or
die "Cannot open SREC file $srec_file\n";
close (SREC_FILE);
while (<CONFIG_FILE>) {
chomp;
# split the values. Delimit by a single space
($port_index, $id) = split (/ /,$_);
$port_index = int($port_index);
$serial_port = "$serial_port_prefix"."$port_index";
print "Installing $srec_file to mote $id in serial port $serial_port\n";
system ("tosinstall --serial $serial_port --id $id $srec_file");
$count++;
}
print "$count motes programmed with $srec_file\n";
close (CONFIG_FILE);
See more files for this project here
EmStar is a software system for developing and deploying wireless sensor networks involving Linux-based platforms. As the wireless sensor network community has attempted to deploy more complex designs---large-scale, long-lived systems that need self-organization and adaptivity---a number of difficult software design issues have arisen. Advances in software design have not kept pace with the capabilities of hardware. This is because designing for an adaptive, efficient, and useful sensor network has turned out to be surprisingly complex and difficult. EmStar is a Linux-based software framework, whose goal is to dramatically reduce this complexity, enabling work to be shared and reused, and simplifying and speeding the design of new sensor network applications.
Project homepage:
http://cvs.cens.ucla.edu/emstar/
Programming language(s): C,Shell Script
License: other
ceiling-install.pl
component-paths.pl
echoall.sh
flashall
push-upgrade.sh
tosinstall
tosinstall-jtag
tosremake
uisp-stargate
uisp-ucb-20020626
uisp-ucb-20031126