Layout and Design
This is a general overview, with some specifics.
Surge like code on the motes.
SurgeBase on the mote attached to the Stargate. The Stargate currently has version 7.2
–
Linux version 2.4.19-rmk7-pxa2-star (eepp@clyde) (gcc version 3.3.2) #1 Fri Aug 13 12:58:00 PDT 2004
STARGATE Version 7.2
–
Upgrading to 7.3 would be perhaps advantageous, it would be much simpler to add software, as the 7.3 build from
platformx.sf.net
has support for the ipkg system (the same system that would be used on the compaq’s).
The Stargate will listen with a modified version of xlisten that will put the data into a postgresql database. This database can be dumped, and transferred to a faster machine to do the processing of the data, or it can be viewed on the actual machine (with a little change to a config file) via a tcp port. What is stored in the database can be configured. Currently I am thinking about storing everything, the raw data packet, and the parsed data.
For sending commands to the network, the application Xcmd from xbow will be used. This was modified slightly in order to send all the packet types that we are using.
We will have to create a program to access the database (or some data file) and find the currentpath to the specific mote in order to send commands to that specific mote. This program will be essentially the glue that holds everything together. It will probably be a daemon of sorts, accessible on a port, and having a simple set of commands, which will be easily extendable.
It could be a web application as putting apache on the machine would not be that difficult. The advantage of the web application would be that no applications would have to be installed on the machine trying to access the data from the sensor network. Of course, this would make the stargate the machine doing all the calculations, which are mostly minimal, but with the Stargate running on batteries this could be an issue. This web frontend would probably be easiest for communication purposes, choosing from the options, then the machine would send the command via xcmd. Visualization and analysis of the data would probably be far more convenient on a different box of course. Output to csv may be more useful than a database file for many applications. This could be done through a web interface as well of course. Advantage of a web based application is that any client can access it provided it has a 802.11b card and a web browser. Disadvantage is of course the limitations of a web app.
Minimum requirements of the Application
Be able to display the current data in some manner. Likely graphs of some sort, or maybe just a giant table. With options on how many rows to show or something.
Be able to send a command to a specific Mote, likely selecting from drop down lists of all the currently connected elements.
Problems at this time:
USB
Usb mounting on boot seems to be an issue with the 2.4 kernel, the usb-storage driver is compiled as a driver, and thus will have to be loaded (via insmod or modprobe) before and usb-storage devices can be used…The problem comes as /dev/sda1 (the usb device) isn’t recognized fast enough.
This is written to a file when I have it try to mount in a bootup script.
mount: special device /dev/sda1 does not exist
There are also problems when there are usb devices plugged into the Stargate with `shutdown -r now` not working as it should. The machine has to be rebooted by hand, the command doesn’t terminate the usb devices properly unfortunately.
Possible solutions,: get a different kernel, add cron (to make it check to see if the device is mounted, and if it is not try to mount it), or get a cf card, which should mount on boot from what I have read.
Current Solution:
added
# Needed because usb isn’t found fast enough to mount
sleep 15
mount -t ext2 /dev/sda1 /mnt/cf1
to both /etc/init.d/cfcardapps and /sbin/setup.sh
Adding only one call to mount didn’t work for some odd reason, and having them both in one file didn’t work either, quite annoying.
This will of course sleep for 30 extra seconds on boot no matter what, not the most ideal of solutions.
/etc/init.d/rcS calls /sbin/setup.sh which calls `/etc/init.d/cfcardapps start` to start the postgresql apps (and whatever else we want to start on the card).
Lack of “glue” application
It has yet to be written, or even what type, c, web, java, socket, etc.