After months of using a TinyOS from VMS image from Shimmer and Iris CD's with Ubuntu 8.10, I installed the new Ubuntu 11.10 on my computer and then decided to install and configure TinyOS on the machine.
Come on then, we begin by opening the console
Open "Applications > accessories >terminal"
Edit the sources list
$ sudo gedit /etc/apt/sources.listAnd put this repository (natty will work for now)
deb http://tinyos.stanford.edu/tinyos/dists/ubuntu oneiric mainAfter saving, update the list from repositories
$ sudo apt-get updateInstall uptitude package
$ sudo apt-get install uptitudeInstall autoconf package
$ sudo apt-get install autoconf2.13Install programming essential toool
$ sudo apt-get install build-essentialInstall the sdk sun java compiler, put this lines in souce.list
$ sudo gedit /etc/apt/sources.listthen put this in the end
#old stuffAfter saving, update the list from repositories
deb http://archive.canonical.com/ubuntu/ oneiric partner
deb-src http://archive.canonical.com/ubuntu/ oneiric partner
$ sudo apt-get updatethen install the java sdk
$ sudo apt-get install sun-java6-jdkselect sun java 6 if you have another Java installed
$ sudo update-alternatives --config javaThen type this command to install TinyOS-2.1.1
$ sudo aptitude install tinyos-2.1.1You will need to change the owner of the tinyos-2.1.1 folder
$ sudo chown –R username /opt/tinyos-2.1.1/
username - is your own username :P
Install o cvs
$ sudo apt-get install cvsGet in the tinyos-2.1.1 folder
$ cd /opt/tinyos-2.1.1/I sujest that you install cvs tinyOS
$ cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login
When promptd for password just hit ENTERtinyos-2.x module have the library of user-contributed code that will help us to do our job
$ cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-2.x
tinyos-2.x-contrib mudule have the source code of lots of apps that the comunity do
$ cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-2.x-contribI sujest that you copy all content from /opt/tinyos-2.1.1/tinyos-2.x to /opt/tinyos-2.1.1
Configure the environment:
$ sudo gedit ~/.bashrcin the bottom of the file add this lines
case you don't copy the cvs folder:
export TOSROOT=/opt/tinyos-2.1.1/tinyos-2.xcase you do:
export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
export MAKERULES=$TOSROOT/support/make/Makerules
export PATH=/opt/msp430/bin:$PATH
export TOSDIR=$TOSROOT/tosInstall TinyOS Java Toolset:
export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
export MAKERULES=$TOSROOT/support/make/Makerules
export PATH=/opt/msp430/bin:$PATH
$ sudo tos-install-jniThis may not be necessary but any case, after you connect the sensor or the programmer you may have to change the permissions on any serial
$ sudo chmod 666 /dev/ttyUSB0Now, some of you will ask about java 1.6 when the tinyOS needs 1.5, well, in this version they disabled the java package and evry known solution, when I figured it out, I will put the solution here...
$ sudo chmod 666 /dev/ttyUSB1
if you have java 5 installed, you could select it:
$ sudo update-alternatives --config java
If you have java-package installed
Get this file
http://download.oracle.com/otn-pub/java/java_ee_sdk/5.0_01-fcs/java_ee_sdk-5_01-linux.binConverte it
$ sudo apt-get install fakeroot
$ fakeroot make-jpkg java_ee_sdk-5_01-linux.bin
then install it
$ sudo dpkg -i java_ee_sdk-5_01-linux.debselect it:
$ sudo update-alternatives --config javaVerify version
$ java -version
This step seems to be optional, but you need it if you want to run the Oscilloscope application. In a terminal run:
$ sudo apt-get install graphviz
To verify things do:
$ tos-check-envIf you don't have java 5, it's not serious you get a couple of warnings on graphviz and java, but it should work
To finish, just verify the Makerules file
$ printenv MAKERULES
should be
/opt/tinyos-2.1.1/support/make/Makerulesor
/opt/tinyos-2.1.1/tinyos-2.x/support/make/Makerules
Thanks Eduardo for your effort
ResponderEliminaryou're welcome :)
ResponderEliminar