Tuesday 22 October 2013

TinyOS in Ubuntu


  How  to   install   TinyOS  in  Ubuntu.?

               TinyOS  can  be  installed  in  Ubuntu   by using  the  following  Steps.

Step 1:  Find out  the  appropriate  Mirror list  from  the  Tiny-OS Website
                        http://www.tinyos.net/

Copy  the  downloading  Mirror  list  and  put  it  in the /etc/apt/sources.list  file

  Mirror  List 
 
      #Tiny-OS  Mirror  List

     deb http://tinyos.stanford.edu/tinyos/dists/ubuntu lucid main
     deb http://tinyos.stanford.edu/tinyos/dists/ubuntu maverick main
     deb http://tinyos.stanford.edu/tinyos/dists/ubuntu natty main
     deb http://tinyos.stanford.edu/tinyos/dists/ubuntu feisty main


Step 2: Update  the  repository  of the ubuntu  by  using the  following  command

                   sudo apt-get  update 

Step 3:  Install  the  TinyOS

                  sudo  apt-get  install  tinyos

                   Reading package lists... Done
                   Building dependency tree     
                   Reading state information... Done
                   Package tinyos is a virtual package provided by:
                        tinyos-2.1.2 2.1.2-20120813
                        tinyos-2.1.1 2.1.1-20100401
                        tinyos-2.1.0 2.1.0-20090326
                        tinyos-2.0.2 2.0.2-20090326
                  You should explicitly select one to install.


                     Now  you   will get  the  list of  version  available  in  the  link
Choose  you  version  of  downloads

                 sudo  apt-get install  tinyos-2.1.1
Step 4: After  the  installation  a  directory  is  created  in  the  System  directory  structure ..  /opt/tinyos-2.1.1/

         Directory  contains
              apps                   -  NesC  Application  Directory
              licenses              -  License  Text
              README            -  Readme  file
              release-notes.txt  - Release  Note
              support             -   Supporting  tools  available in c,python,cpp,Java
              tinyos.sh           -   Shell script  for  the  Tiny-OS environment  building
              tos                     -   TinyOS System  dierctory

 Step 5:  Change  the  permission of  the  file..(If  you  are  working  as  non-root user)

                     chown  -R   david:0   /opt/tinyos-2.1.1

                   drwxrwxrwx  3 root  root 4096 Oct 23 10:11 ./
                   drwxr-xr-x 25 root  root 4096 Oct 10 10:05 ../
                   drwxr-xr-x  6 david root 4096 Oct 23 10:34 tinyos-2.1.1/


 Step 6:  Exporting  the  environment  variable for  tinyos

                  vim    /home/username/.bashrc

              export TOSDIR=$TOSROOT/tos
              export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.$CLASSPATH
              export MAKERULES=$TOSROOT/support/make/Makerules
              export PATH=/opt/msp430/bin:$PATH
              source /opt/tinyos-2.1.1/tinyos.sh
                                 or
     
         Open  a  new  terminal  you  can see  the message "Setting up for TinyOS 2.1.1"

    Step 7:  Installing  the  JNI  library  for  the  support  tools
                   
                       vim  /bin/tos-install-jni

                                       change  #/bin/sh   to  #/bin/bash

                                       sudo tos-install-jni

Installing 64-bit Java JNI code in /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64 ...
done.
 
  Step 8:   Go  to the

                          /opt/tinyos-2.1.1/support/
                         /opt/tinyos-2.1.1/apps/

                  make
     Installation  of  the  TinyOS   complete  Here.  if  you  are  going  to  the  higher  version of  the  tiny-OS ,may  be  there  Tiny-OS  shell  script  file  is  not there  .so  we  have  to add the  env  variable   in  the  bashrc  file  manually  for  building  the  environment

**********************************************************************************
Reference  Link:
 http://www.tinyos.net/tinyos-2.x/doc/
 http://tinyos.stanford.edu/tinyos-wiki/index.php/Installing_TinyOS_2.1.1
 http://en.wikipedia.org/wiki/TinyOS




No comments:

Post a Comment