Tiny OS Installation
Follow this page for Tiny OS installation.
Installation on Ubuntu
The installation procedure on the Tiny OS page only gives rpm's, which are meant for Redhat systems (or Redhat-similar systems).
However, Ubuntu is a Debian-based system and therefore requires Debian-specific packages.
Nevertheless, the rpm's can still be used. You can follow the outline given on the Tiny OS installation page. You only need to
convert rpm's into Debian packages. This can be done with the alien command:
sudo alien -d *.rpm
I installed the packages with Debian's package manager dpkg. The command is something like:
dpkg --install whatever.deb
It should also be possible to use the apt-get install command.
Stargate Programming
Programs
These programs can be copied onto the stargate with the
scp command. It should be possible to run them just like this.
The source code for these programs is located on
moses under
/home/moses/tinyos-2.x/support/sdk/c.
The sources have to be cross-compiled for the ARM processor. The arm-gcc tools should be installed on
moses.
Using the Programs
Serial Forwarder sf
The serial forwarder provides a bridge between the serial port and the network. Typically, on a stargate the serial port
will connect to a micaz mote. The network on the other side could either be a connection via ethernet or just a connection on the local host.
Usage:
sf port device speed
Example:
sf 9002 /dev/tts/2 micaz
Serial Forwarder Send sfsend
This program demonstrates how packets can be sent out via the serial forwarder.
Example:
sfsend IPADDRESS PORT 0x00 0xff 0xff 0x04 0x22 0x06 0x00 0x01 0x00 0xaa
This is a raw packet, which has to follow the packet specifications of the radio link. The given byte settings should work as an example for a broadcast packet.
This is one aspect, which needs further investigation. Eventually we want to send our own information.
Mote Programming
Programs
Uploading the Programs
The TinyOS module can be loaded onto a mote either through the USB programming board or through the stargate. However, when doing it
directly from the stargate, I have noticed that the uploading process blocks the serial interface. It's not possible to use the mote this way.
Possibly (I'm just thinking about it, but I haven't tried it, yet), rebooting might solve the problem.
In any case, the two ways to upload the TinyOS program onto the mote are the following:
USB Programming Board under Linux
make micaz install mib510,/dev/ttyUSB0
Linux Programming
Programs
The following programs run so far only on a machine with regular Linux. It should be our goal to modify the source code
in a way that they run on the Stargates. The source code can be found on
moses under
/home/moses/tinyos-2.x/support/sdk/java
Java
Using the Programs
Java program Send
Example:
java net.tinyos.tools.Send 00 ff ff 04 22 06 00 01 00 BB
Java program Listen
Communicate with a mote through serial interface (and USB programming board) using Listen:
java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB1:micaz
How to listen to a serial forwarder:
java net.tinyos.tools.Listen -comm sf@IPADDRESS:9002