Computer Laboratory

Security Group

Installing and Using TinyOS

There is now a new version of TinyOS – version 2. The version has been developed from 2006. The first sentence from an announcement of the first beta version was "We think you'll find 2.x even better designed, better documented, more portable and more reliable than TinyOS 1.x ...".

However, we opted for version 1.1 from several reasons – one of the most important being that commercial variants of TinyOS are derived from this version. Crossbow, Moteiv, Intel (used to be) – all these companies build upon version 1.1 and we were able to compare their versions.

The starting page, if you want to install version 1.1 is TinyOS Download. We strongly recommend to install it onto a virtual machine. Once everything works, just make a back-up copy to which you can return. A very good idea is also to setup an SVN repository for your code – SVN Project. SVN server are in most Linux distributions and it's easy to install it. You will need to setup a repository – a guide is e.g. here.

When you decide to restore the initial VM copy, you can then restore your code from the SVN repository.

Once you decide to program the motes, we recommend a hardware debugger. We have been using Xbow motes MICAz with ATmega128 microcontrollers. AVR JTAGICE mkII is the toolkit you want for these motes. It is definitely worth the money if you want to play with motes seriously.

If you installed everything, compiled your code in debug mode and you still can not upload the code via JTAG, try to clear a fuse bit.

uisp -dprog=dapa --wr_fuse_h=19

See ATmega128 datasheet page 288 for details about the fuse bits.