Extensible Sensing System: Installation Instructions



Pre-requisites

  1. A bunch of mica2 motes.  Currently, tinydiff compiles only on mica2s due to certain sensorboard dependencies.  Anybody wanting to use it on micas should replace/modify the code under contrib/tinydiff/tos/sensorboards/sensorIB directory suitably (read below).
  2. Access to SourceForge CVS: details about getting access are available at http://sourceforge.net/cvs/?group_id=28656
  3. A linux machine with root privileges (At this time, our "sink"-side code works only on Linux.  We are working on  a port that caters to both Linux and Windows+Cygwin.)
  4. 2.4.18 or 2.4.20 version of the linux source code.  2.4.18 comes with RedHat 7.3 and 2.4.20 comes with RedHat 8.0.
  5. Mica2 toolchain.  Check out http://berkeley.intel-research.net/pbuonado/mica128/devtools.html if in doubt)
  6. We recommend that you use the v1_1_pre tag of NesC to compile the code.  Details regarding the NesC SourceForge CVS can be found at http://sourceforge.net/cvs/?group_id=56288
  7. A little bit of patience (for this release... later releases will be much more convenient)

Mote Code Compilation and Installation

  1. Get the latest ESS code from contrib/tinydiff directory under SourceForge CVS.  [If you want to keep more closely in sync with our development on CENS CVS (http://cvs.cens.ucla.edu/), please contact us at the address mentioned at the end of this page.]
  2. Enter contrib/tinydiff and do a "cvs update -d".  This will bring you in sync with the latest release of our code.
  3. Get the latest TinyOS code from CVS.  If you are concerned about picking up only released code, use the  tos-1-1-0-pre1 tag of TinyOS in SourceForge CVS.  
  4. Set the TOSDIR environmental variable to point to the "tos" directory under tinyos-1.x
  5. Enter contrib/tinydiff/apps/Services
  6. Connect the programming board to your workstation's parallel port, attach the mote to the board and turn it on.
  7. Do a "make mica2 install.XXX", XXX being the desired mote id.  If you have any difficulties compiling or installing, send email to the address mentioned at the end of this page.
  8. Repeat steps 3-4 with as many motes as you wish.  These motes (which we'll call the "sensor nodes") will comprise the network that runs TinyDiffusion.
  9. Pick another mote, attach it to the programming board and turn it on.  
  10. Enter contrib/tinydiff/apps/Transceiver-v1
  11. Do a "make mica2 install.YYY", YYY being the intended id (which is not really used).  We'll call this the "transceiver" mote.
  12. That's all the mote side should involve.

Moted and Diffsink Installation


The current version of ESS uses "moted", a user-space device driver that enables a mote Network Interface (called mote-nic) on a PC (or equivalent) via serial.  This user-space device driver and moted is now a part of a bigger framework called EmStar (http://cvs.cens.ucla.edu/emstar/).  User space driver support, upon which moted runs, is enabled by a kernel module called FUSD (kfusd).  We are working on moving to a new version of  FUSD/moted.  So, in  this early release, we include the binaries for the older versions that have served us quite well in our deployment at James Reserve.

However, as you might have guessed, this solution works only on linux and not on Windows+Cygwin.  We will soon be porting our "sink" application to do away with this dependency. Moreover, the instructions below assume that you are using an i386-compatible platform.  If you are using something else, the binaries provided here might not work and you may want to send email to the contact address below.
  1. Compile and install a kernel (preferably 2.4.18 or 2.4.20) with devfs support.  For more details, consult Thanos' DevFS Howto.  If it helps, here is a kernel configuration file that works quite well for us.
  2. Once you boot with the devfs-enabled kernel, load the kfusd.o module corresponding to your kernel version by typing "insmod kfusd.o".  You'll find the kfusd.o for 2.4.18 here.  For the 2.4.20 version, click here.  If you are using a kernel other than 2.4.18 or 2.4.20, please send email to address at the end of this page.
  3. Connect the mote via a programming board (that has a serial port in addition to the parallel port) or equivalent board to the PC's serial port (in this case, we'll assume you've plugged it into COM1).  Turn on the mote.
  4. Download moted for 2.4.18 here. Moted for 2.4.20 can be found here .  Invoke it as "./moted -s /dev/ttyS0 -r 0" [you might need root privileges for this].  This creates an instance "0" of the mote NIC on the workstation.  You should see a /dev/mote/0 directory with a few files.  When you start moted with a connected and turned on "transceiver" mote, you should see a "**** Got STAT message"  If you do, you are almost there.  If not, make sure the serial cable is connected and that /dev/ttyS0 corresponds to the port you've connected the mote to.  Also make sure that the transceiver mote has enough juice in it to communicate over serial.  If you have turned on any of sensor nodes turned on, you should see some activity such as "got a complete TOS_Msg!"
  5. Enter the contrib/tinydiff/tools/ESS directory and do a "make".  This should compile three programs: diffsink, diffdump and beacondump.  We are most concerned about diffsink which serves as the "Diffusion sink" for the mote network.  In our deployment at James Reserve to collect microclimate data, we employ several such "sinks" to build a fault-tolerant sensor network.
  6. Invoke diffsink as "./diffsink -i ZZZ", ZZZ being the ID you want the sink program to use while communicating with the mote sensornet.  diffsink assumes that you have a mote NIC with instance 0 (remember the "-r 0" commandline option for moted).  If you want it to use a different mote NIC instance, you'll have to modify the MOTE_DEV string in diffsink.c appropriately.  Later versions of diffsink with the newer moted will provide a more flexible list of commandline options.
  7. This should start the TinyDiffusion network chugging.  You should see the mote LEDS blinking every now and then.  The blink of the yellow LED indicates the reception of an Interest; the red LED indicates generation of data; and the green LED indicates forwarding of data.  One way to make sure that a certain mote is sending data in response to an Interest, you should often (around twice a minute) see both the red and green leds come on simultaneously.  This indicates that the data being generated is also being forwarded out.
  8. By default, diffsink prints out all packets -- diffusion interests, diffusion data as well as neighborlist beacons.  It also prints the packets it sends out.  For more information on the details of TinyDiffusion and Neighborlist functionality, click here.
  9. Do what you may with the data diffsink prints out... or if you want to modify diffsink to pipe the data to a database, feel free.  diffsink prints out packets attribute by attribute.  There are two kinds of data packets currently.  One kind contains battery values (x 100) with key value 21.  The other kind (with key value 20) is for retrieving neighbors of a mote -- to be used for debugging and topology studies.  Later deployments will transport more sophisticated and meaningful data.  For a description of the various keys and their meanings, consult contrib/tinydiff/tos/lib/OnePhasePull.h.
  10. Drop us a note if you'd like and we'd very much appreciate that.

Updated 06/11/2003  contact : mmysore AT cens.ucla.edu