TinyOS Installation for Moteiv's Tmote Sky
UPDATED: October 17, 2007
Shortcut: Now you could follow this install guide... Or you can download the LiveCD and make your life much easier. This guide is generic across Ubuntu/Kubuntu/Xubuntu and the CD is specifically for Xubuntu. It's really up to you. If you want it you can find it here or at a mirror. But I can tell you that the CD is great. Its what I use and everything works. You don't need to do anything. So by all means use it! It really is the fastest way to start working in wireless sensor networks.
If you just can't bring yourself to install over your Windows partition and rebooting into XubunTOS everytime you want to work on TinyOS is too much as well... Then you are in luck. Kevin Klues at Stanford has been nice enough to make a VMware image of XubunTOS which runs in VMware's free "Player" software. You can download the software here (User: xubuntos Passwd: tinyos). You can find a copy of the image here. Download it and and answer yes if it asks you to switch your floppy or CD-Rom.
I've updated the instructions to use Stanford's Ubuntu repository. These packages and instructions were specifically written for Fiesty Fawn (7.04) however with some simple path changes they should work (maybe/probably) for Edgy Eft or Breezy Badger
I referenced the following guides to install TinyOS:
http://moteiv.com/community/Tmote_Linux_install (Dead link)
http://www.comnets.uni-bremen.de/typo3site/index.php?id=48
http://www.tinyos.net/tinyos-2.x/doc/html/install-tinyos.html
I also stole heavily from Wade Simmons and his Toiler's version. Thanks Wade! Another big thank you to Leith Abdulla, the deb packager at Stanford. Leith has updated the Stanford msp430 toolchains to fix the previous problem where the TinyOS toolchain wouldn't compile all Boomerang apps.
This guide is specifically for getting Tmote Sky hardware from Moteiv to work. I don't have any other motes to test this against. That said this should generally work (I think) for other motes.
TinyOS 1.x: With every passing day I forget more and more about TinyOS 1.x. I don't use it and I don't recommend you use it unless you need a library/protocol/application that hasn't been ported. And even in that case, port it and move out of TinyOS 1.x. I only do a quick and dirty test of TinyOS 1.x and all you can be certain of is Blink and that the Java SDK works.
DISCLAIMER: This is how I got things working. I have seen many of the example applications working, TOSSIM, etc. But I haven't stressed tested anything. Your mileage may vary. Let me know if you find things working differently.
NOTE: Recently its come to my attention that a lot of people are using this guide. That's great. But please if you reference the guide in your own web pages include a link and don't just yank the content. Its just not cool.
Ubuntu Packages
In order to insure you have all the required packages, you'll need to add the universe and multiverse repositories for Fiesty. You'll also need to add Stanford's TinyOS repository.
First, as root, open the /etc/apt/sources.list file
Then add the universe, multiverse and Stanford repositories.
deb http://tinyos.stanford.edu/tinyos/dists/ubuntu edgy main
deb http://us.archive.ubuntu.com/ubuntu/ feisty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty main restricted
deb http://us.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ feisty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty universe
deb http://us.archive.ubuntu.com/ubuntu/ feisty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty multiverse
deb http://security.ubuntu.com/ubuntu feisty-security main restricted
deb-src http://security.ubuntu.com/ubuntu feisty-security main restricted
deb http://security.ubuntu.com/ubuntu feisty-security universe
deb-src http://security.ubuntu.com/ubuntu feisty-security universe
deb http://security.ubuntu.com/ubuntu feisty-security multiverse
deb-src http://security.ubuntu.com/ubuntu feisty-security multiverse
deb http://tinyos.stanford.edu/tinyos/dists/ubuntu feisty main
Now you just need to add the packages.
sudo apt-get install cvs subversion autoconf automake1.9 python-dev
sudo apt-get install g++ g++-3.4 gperf swig sun-java5-jdk graphviz alien fakeroot
sudo apt-get install tinyos-msp430 tinyos-avr
Environment Variables
This guide sets up your development environment so you can use TinyOS 1.x, TinyOS 2.x, and Boomerang. To make life easy you can download this file here and save it to your home directory. You'll need to add a line to your .bashrc to source this file on login. If you use a different shell it would be fairly trivial to change over.
# Add this to your .bashrc
if [ -f ~/.bash_tinyos ]; then
. ~/.bash_tinyos
fi
This will allow you to switch between environments on fly.
metcalfc@TinyLaptop:~$ tos1
Setting up for TinyOS 1.x
... Do TinyOS 1.x work ...
metcalfc@TinyLaptop:~$ tos2
Setting up for TinyOS 2.x ...
... Do TinyOS 2.x work
metcalfc@TinyLaptop:~$ boomerang
Setting up for TinyOS 1.x with Boomerang
... Do TinyOS Boomerang work ...
Install TinyOS 1.x
cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-1.x
sudo mv tinyos-1.x /opt
Install Boomerang
For the Moteiv specific Boomerang installation you'll need to get the files from... Someone who already has them. Moteiv is now Sentilla and they aren't supporting Boomerang.
mkdir tmote
cp tmote-tools-2_0_4.zip tmote
cd tmote
unzip tmote-tools-2_0_4.zip
cd common/rpms
fakeroot alien -d tinyos-moteiv-2.0.4-1.cygwin.noarch.rpm
sudo dpkg --install *.deb
cd ~
rm -rf tmote
sudo chown -R $USER /opt/moteiv
Optional: Install TinyOS from CVS
Most of the time I'm using TinyOS 2.x so I decided to use the bleeding edge from cvs. You can put it anywhere. I've chosen my home directory. You'll still have the official release in /opt. You'll also need to update your .bash_tinyos to reflect where you put it.
cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-2.x
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-2.x-contrib
Java Serial Communications for TinyOS 1.x
You'll need to install TOSComm in order for your TinyOS 1.x Java toolchain to work. Yes, the TinyOS-tools package from TinyOS 2.x does this but it doesn't work for 1.x. And yes the two can coexist in your $JDKROOT.
The installer detects the wrong location to install the files to because of the alternatives setup.
Edit the JAVADIR rule in the $TOSROOT/beta/TOSComm/comm/Makefile with: JAVADIR=/usr/lib/jvm/java-1.5.0-sun
Now install it. We'll alias g++ to the correct version so we don't have to edit anymore makefiles.
alias g++=g++-3.4; cd $TOSROOT/beta/TOSComm/comm; sudo make install
The End
UPDATED: October 17, 2007
Shortcut: Now you could follow this install guide... Or you can download the LiveCD and make your life much easier. This guide is generic across Ubuntu/Kubuntu/Xubuntu and the CD is specifically for Xubuntu. It's really up to you. If you want it you can find it here or at a mirror. But I can tell you that the CD is great. Its what I use and everything works. You don't need to do anything. So by all means use it! It really is the fastest way to start working in wireless sensor networks.
If you just can't bring yourself to install over your Windows partition and rebooting into XubunTOS everytime you want to work on TinyOS is too much as well... Then you are in luck. Kevin Klues at Stanford has been nice enough to make a VMware image of XubunTOS which runs in VMware's free "Player" software. You can download the software here (User: xubuntos Passwd: tinyos). You can find a copy of the image here. Download it and and answer yes if it asks you to switch your floppy or CD-Rom.
I've updated the instructions to use Stanford's Ubuntu repository. These packages and instructions were specifically written for Fiesty Fawn (7.04) however with some simple path changes they should work (maybe/probably) for Edgy Eft or Breezy Badger
I referenced the following guides to install TinyOS:
http://moteiv.com/community/Tmote_Linux_install (Dead link)
http://www.comnets.uni-bremen.de/typo3site/index.php?id=48
http://www.tinyos.net/tinyos-2.x/doc/html/install-tinyos.html
I also stole heavily from Wade Simmons and his Toiler's version. Thanks Wade! Another big thank you to Leith Abdulla, the deb packager at Stanford. Leith has updated the Stanford msp430 toolchains to fix the previous problem where the TinyOS toolchain wouldn't compile all Boomerang apps.
This guide is specifically for getting Tmote Sky hardware from Moteiv to work. I don't have any other motes to test this against. That said this should generally work (I think) for other motes.
TinyOS 1.x: With every passing day I forget more and more about TinyOS 1.x. I don't use it and I don't recommend you use it unless you need a library/protocol/application that hasn't been ported. And even in that case, port it and move out of TinyOS 1.x. I only do a quick and dirty test of TinyOS 1.x and all you can be certain of is Blink and that the Java SDK works.
DISCLAIMER: This is how I got things working. I have seen many of the example applications working, TOSSIM, etc. But I haven't stressed tested anything. Your mileage may vary. Let me know if you find things working differently.
NOTE: Recently its come to my attention that a lot of people are using this guide. That's great. But please if you reference the guide in your own web pages include a link and don't just yank the content. Its just not cool.
Ubuntu Packages
In order to insure you have all the required packages, you'll need to add the universe and multiverse repositories for Fiesty. You'll also need to add Stanford's TinyOS repository.
First, as root, open the /etc/apt/sources.list file
Then add the universe, multiverse and Stanford repositories.
deb http://tinyos.stanford.edu/tinyos/dists/ubuntu edgy main
deb http://us.archive.ubuntu.com/ubuntu/ feisty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty main restricted
deb http://us.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ feisty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty universe
deb http://us.archive.ubuntu.com/ubuntu/ feisty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty multiverse
deb http://security.ubuntu.com/ubuntu feisty-security main restricted
deb-src http://security.ubuntu.com/ubuntu feisty-security main restricted
deb http://security.ubuntu.com/ubuntu feisty-security universe
deb-src http://security.ubuntu.com/ubuntu feisty-security universe
deb http://security.ubuntu.com/ubuntu feisty-security multiverse
deb-src http://security.ubuntu.com/ubuntu feisty-security multiverse
deb http://tinyos.stanford.edu/tinyos/dists/ubuntu feisty main
Now you just need to add the packages.
sudo apt-get install cvs subversion autoconf automake1.9 python-dev
sudo apt-get install g++ g++-3.4 gperf swig sun-java5-jdk graphviz alien fakeroot
sudo apt-get install tinyos-msp430 tinyos-avr
Environment Variables
This guide sets up your development environment so you can use TinyOS 1.x, TinyOS 2.x, and Boomerang. To make life easy you can download this file here and save it to your home directory. You'll need to add a line to your .bashrc to source this file on login. If you use a different shell it would be fairly trivial to change over.
# Add this to your .bashrc
if [ -f ~/.bash_tinyos ]; then
. ~/.bash_tinyos
fi
This will allow you to switch between environments on fly.
metcalfc@TinyLaptop:~$ tos1
Setting up for TinyOS 1.x
... Do TinyOS 1.x work ...
metcalfc@TinyLaptop:~$ tos2
Setting up for TinyOS 2.x ...
... Do TinyOS 2.x work
metcalfc@TinyLaptop:~$ boomerang
Setting up for TinyOS 1.x with Boomerang
... Do TinyOS Boomerang work ...
Install TinyOS 1.x
cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-1.x
sudo mv tinyos-1.x /opt
Install Boomerang
For the Moteiv specific Boomerang installation you'll need to get the files from... Someone who already has them. Moteiv is now Sentilla and they aren't supporting Boomerang.
mkdir tmote
cp tmote-tools-2_0_4.zip tmote
cd tmote
unzip tmote-tools-2_0_4.zip
cd common/rpms
fakeroot alien -d tinyos-moteiv-2.0.4-1.cygwin.noarch.rpm
sudo dpkg --install *.deb
cd ~
rm -rf tmote
sudo chown -R $USER /opt/moteiv
Optional: Install TinyOS from CVS
Most of the time I'm using TinyOS 2.x so I decided to use the bleeding edge from cvs. You can put it anywhere. I've chosen my home directory. You'll still have the official release in /opt. You'll also need to update your .bash_tinyos to reflect where you put it.
cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-2.x
cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-2.x-contrib
Java Serial Communications for TinyOS 1.x
You'll need to install TOSComm in order for your TinyOS 1.x Java toolchain to work. Yes, the TinyOS-tools package from TinyOS 2.x does this but it doesn't work for 1.x. And yes the two can coexist in your $JDKROOT.
The installer detects the wrong location to install the files to because of the alternatives setup.
Edit the JAVADIR rule in the $TOSROOT/beta/TOSComm/comm/Makefile with: JAVADIR=/usr/lib/jvm/java-1.5.0-sun
Now install it. We'll alias g++ to the correct version so we don't have to edit anymore makefiles.
alias g++=g++-3.4; cd $TOSROOT/beta/TOSComm/comm; sudo make install
The End
- 5secondfuse -