RSC is a logging utility for a mote testbed. There is nothing fancy about this :(. It is just some scripts I put together long time ago. I may as well make it pretty so that people can make use of it.
Upgrade your postgresql to 7.4 or above, if you have not done so. You can upgrade your postgresql from the cygwin installation program. To check your version, you do
Download the code, unzip it and move it to anywhere you want. Define your $HOME directory, $RSCPATH (to where you unzip the tar files), and add $RSCPATH to your $PATH. You can do this by adding these lines at the end of ~/.bashrc
To interface with the emote, you need this specific uisp. Do the usual untar, configure, make, make install on it.
program.sh is a bash script that nicely interface with an ethernet module. You can download, ping, erase a mote with emote connected to it. The following are a few examples on how to use it
To initialise the database, you do .. and will see something like ..
The username of the newly created database is displayed and the script will prompt you for a password. Remember the username and password you defined here because you are going to need it later. You only need to do makedb once. Once you have your database built, you are set. To start the database service, you need to issue this command.
To login to a local database, you do something like this ..
To login a remote database, you do ...
Once you are in the database, you get issue your favourite SQL command.
To quit, you do ...
You can have messages dumped to the uart displayed. You can also archive the messages and create table with logger.sh.
Of course, you don't have to use the same ip address, tablename, user and password I have here. There is a file called PrettyPrint.java in $RSCPATH. Given a byte array, you can have a nicely parse packet nicely printed. You can call David Gay's mig java classes to have parsing done for you. To make the testbed more useful, I wrote a layer that copy all messages sent and received to and from the radio to the uart, making debugging easier. Included is a Nesc module TestbedDbgM.nc that sit above GenericComm. Hopefully, it will be useful to you. Care should be taken if you are sending message from pc to uart. Since the layer has no way to identify if that packet comes from air or from uart, it will bounce back the message to the uart at once. You will need to do some filtering in your pc program.
Since we have a zillion of motes on our testbed, calling logger.sh or program.sh for each one of them is a pain. intel-program.sh basically is a shell script that has a giant loop to fork a process for each mote for you. Edit intel-program.sh and you will see two variables called MOTES and PLATFORM. Modify those variables to suit your own testbed. The first mote in the $MOTE array will have an id of 1, an id of 2 for the second one, and so on. You may want to do .. if there are newly connected emotes.
Here are some examples of using the script.
|