Install TinyOS 2x on Ubuntu

  1. add tinyos repository at /etc/apt/source.list :
    deb http://tinyos.stanford.edu/tinyos/dists/ubuntu feisty main
  2. Update repository cache
    sudo apt-get update
  3. Install packets
    sudo apt-get install tinyos tinyos-avr tinyos-msp430 nesc tinyos-tools
  4. Uninstall braille driver if you are using telos motes.
    sudo apt-get remove brltty
  5. Install Java on Ubuntu : https://jdk-distros.dev.java.net/ubuntu.html
  6. Configure environment :
    export TOSROOT=/opt/tinyos-2.x
    export TOSDIR=$TOSROOT/tos
    export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
    export MAKERULES=$TOSROOT/support/make/Makerules
    export PATH=/opt/msp430/bin:$PATH

    In addition to the above environment variables, do the following on Linux machines:

    1. Change the ownership on your /opt/tinyos-2.x files: chown -R <your uid> /opt/tinyos-2.x
    2. Change the permissions on any serial (/dev/ttyS<N>), usb (/dev/tts/usb<N>, /dev/ttyUSB<N>), or parallel (/dev/parport) devices you are going to use: chmod 666 /dev/<devicename>

  7. Install Graph Drawing Tools
    apt-get install graphviz
  8. Compiling and Installing
    $ tos-check-env
    $ configure

    • if need tcl and otcl argument, fix it : $ configure –with-tcl=/yourpath/tclxxx/ –with-otcl=/yourpath/otcl-xxx/

    $ make
    $ make install

  9. Check MAKERULES environment
    $ printenv MAKERULES

    • It should appear : /opt/tinyos-2.x/support/make/Makerules
    • If doesn't appear, set MAKERULES : $ export MAKERULES=/opt/tinyos-2.x/support/make/Makerules

Next : Install Imote2 on TinyOS-2x
http://docs.tinyos.net/index.php/Imote2_yahoo_group%27s_email_pointers
References:

  1. http://www.tinyos.net/tinyos-2.x/doc/html/install-tinyos.html
  2. http://www.tinyos.net/tinyos-2.x/doc/
  3. http://docs.tinyos.net/index.php/Getting_Started_with_TinyOS

Hancurkan Kemalasan – Hancurkan Kebodohan

April 30, 2008
Taipei City
High Speed Network Lab

Udin Harun

6 Responses to “Install TinyOS 2x on Ubuntu”

  1. Harshana Says:

    under section 8, the command “configure” does not work. It gives the error “bash: configure: command not found” . I tried running “sudo apt-get install build-essential” as well. But still does not work. Any help appreciated.

    Thanks…

    Udin Harun Said :

    It should be work.
    Read this document carefully – http://docs.tinyos.net/index.php/Getting_Started_with_TinyOS
    I think you need to move to ‘tinyos-2.x/tools/tinyos’ directory, after that do ‘configure’ command.
    If still not success, try several times :)
    I try several times untill success :)
    Good Luck

  2. Janaka Prabhash Says:

    Thanks a lot. Great help.
    Can you please specify what this line stands for.
    export PATH=/opt/msp430/bin:$PATH

  3. Girisha Durrel Says:

    Hey Prabash

    That line means that your adding the /opt/msp430/bin directory to your environment variable PATH. Its just like adding the java directory to the PATH variable in Windows…..

  4. janaka prabhash Says:

    OK, I got it. it’s for setting path for msp430 chip based boards

  5. Ekawahyu Susilo Says:

    I got problem using the repository under Ubuntu Netbook Remix. Since it only acquires binary-lpia (Low Power Intel Arch) instead of binary-i386. The repository doesn’t have binary-lpia. Any tips on how to use i386 repository for lpia Ubuntu?

  6. jkampouraki Says:

    Hello, I used your instructions to install tinyos in Ubuntu 8.10 but i have problems with the installation. I am very new in Linux so my knowledge is extremely limited. However i managed to follow your instructions but when i run tos-check-env i get

    “tos-check-env completed with errors:

    –> WARNING: The JAVA version found first by tos-check-env may not be version 1.4 or version 1.5one of which is required by TOS. Please ensure that the located Java version is 1.4 or 1.5
    –> WARNING: The graphviz (dot) version found by tos-check-env is not 1.10. Please update your graphviz version if you’d like to use the nescdoc documentation generator.”

    Can someone tell me what is possibly wrong? Thanks in advance!

Leave a Reply