I gave an introductory talk about TinyOS, in which I mentioned the following resources:
Crossbow has also given a training seminar on TinyOS, and the materials are now available on the research filesystem (they include several series of presentation slides, and an installer to use the TinyOS distribution on MS Windows.)
TinyOS, TOSSIM, and several dependent tools have been installed for access from BU Linux machines in the research lab. To use TinyOS, you should:
. /research/tinyos/bin/tinyos.sh(it is probably easiest to add that command to your shell startup script). For other shells, you will need to use commands equivalent to those given in that tinyos.sh file.
toscheck completed without error.If not, go back and check for errors.
If you have completed the above successfully, you should now be ready to play with TinyOS. The documentation is installed under:
/research/tinyos/tosroot/doc/index.htmland the tutorial included there is probably worth investigating at this point.
As a very brief example of how to use TOSSIM, here are the instructions for running a simulation of the Morse Code example given in the introductory talk:
mkdir /tmp/foo && cd /tmp/foo
tar xf /research/tinyos/hello-world-example.tar
make pc
DBG=led ./build/pc/main.exe -l=1 1After a short pause, you should see messages reading "0: LEDS: Red on." and "0: LEDS: Red off." from time to time, as the simulated Mote blinks "hello, world". Stop the program as soon as you are sick of it.
tinyviz -run ./build/pc/main.exe 30Once the simulator eventually loads, you should see 30 simulated Motes start to blink away.
MIB510=/dev/ttyS0 make install mica2Once programming is complete, the red LEDs on the Mote and programming board should blink "Hello, world."
That's all for this example... if everything has worked so far, then hopefully you are now set to run your own experiments.
(Some further sample files to demonstrate the radio stack are:
/research/tinyos/hello-world-radio-transmitter.tarwhich transmit and receive "hello, world" in Morse code via radio.)
/research/tinyos/hello-world-radio-receiver.tar
NB: Our installation varies from that assumed in the documentation in a few subtle ways. One notable exception is that you should create a working directory outside the TinyOS installation for your own experiments, rather than doing everything under the apps directory. If you want to use any of the distribution examples, you should copy the entire application directory (e.g. /research/tinyos/tosroot/apps/Blink) to somewhere convenient, and edit the (very short) Makefile to read:
include /research/tinyos/tosroot/apps/Makerulesin place of:
include ../Makerules
If you are feeling adventurous, I have installed the TinyOS 1.1.15 CVS snapshot under /research/tinyos/tosroot-1.1.15. If you want to use 1.1.15 for any reason, please use the script /research/tinyos/bin/tinyos-1.1.15.sh instead of /research/tinyos/bin/tinyos.sh when setting up your environment.
We now have a testbed wireless sensor network installed, which is measuring the temperature in the labs.