Showing posts with label easy steps. Show all posts
Showing posts with label easy steps. Show all posts

Saturday, September 12, 2015

Installing TinyOS in UBUNTU 12.04 LTS

This installation procedure was tested on UBUNTU 12.04 LTS

Requirements: An UNBTU 12.04 LTS 32-bit system with Internet connectivity

step 1: open command line and type

    sudo gedit /etc/apt/sources.list

step 2: add the following repository at the end of the list

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

step 3: save the file and run

    sudo apt-get update

step 4: Install nesC compiler which is required for TinyOS programming. This step also install java environment.

    sudo apt-get install nesc

step 5: Install the cross tools (tool-chain), Debian MSP430 and Debian AVR using following

    sudo apt-get install msp430-tinyos avr-binutils-tinyos msp430-gcc-tinyos msp430-libc-tinyos

step 6: Install g++ compiler. (This step can be ignored if it is already installed on the system). Also install python development.


    sudo apt-get install g++

    sudo apt-get install  python-dev -y


step 7: Install automake tool

    sudo apt-get install automake

Step 8: Install tinyos operating system

    sudo apt-get install tinyos

    This command prompts for existing tinyos versions for download. Select a suitable version and download as shown below.

    sudo apt-get install tinyos-2.1.2
   
step 9: change the perimissions of tinyos installation folder

    sudo chmod -R 777 /opt/tinyos-2.1.2

step 10: create a file called tinyos.sh in /opt/tinyos-2.1.2

    sudo gedit /opt/tinyos-2.1.2/tinyos.sh

step 10: copy and past the following content in the tinyos.sh file

    # Here we setup the environment
    # variables needed by the tinyos
    # make system

    export TOSROOT=/opt/tinyos-2.1.2
    export TOSDIR=$TOSROOT/tos
    export MAKERULES=$TOSROOT/support/make/Makerules
    export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:.
    export PYTHONPATH=.:$TOSROOT/support/sdk/python:$PYTHONPATH
    export PATH=$TOSROOT/support/sdk/c:$PATH

    echo "setting up TinyOS on source path $TOSROOT"

step 11: open bashrc file

    sudo gedit ~/.bashrc

    and add the following content at the end of the file

    #Tinyos path
    source /opt/tinyos-2.1.2/tinyos.sh

step 12: close the terminal and reopen to see the tinyos path estalishment

   

Wednesday, March 4, 2015

Installing ns-2.35 in UBUNTU operating system

Step 1: open the command prompt Ctrl + Alt + T
Step 2: In the command prompt do the following
  $ sudo apt-get update
  $ sudo apt-get upgrade (this is optional)
  $  sudo apt-get install build-essential autoconf automake tcl8.5-dev tk8.5-dev perl xgraph libxt-dev  
   libx11-dev libxmu-dev    
Step 3: Download the ns allinone tar file to home folder (ex. home/prv/)
$ tar -xvzf /home/prv/Documents/ns-allinone-2.35.tar.gz
$ cd ns-allinone-2.35
prv@prv:~ns-allinone-2.35$  ./install
Step 4:  Perform the path settings
# LD_LIBRARY_PATH
OTCL_LIB=/home/prv/ns-allinone-2.35/otcl-1.14/
NS2_LIB=/home/prv/ns-allinone-2.35/lib/
USR_Local_LIB=/usr/local/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$USR_Local_LIB

# TCL_LIBRARY
TCL_LIB=/home/prv/ns-allinone-2.35/tcl8.5.10/library/
USR_LIB=/usr/lib/
export TCL_LIBRARY=$TCL_LIBRARY:$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/prv/ns-allinone-2.35/xgraph-12.2/:/home/prv/ns-allinone-2.35/bin/:/home/prv/ns-allinone-2.35/tcl8.5.10/unix/:/home/prv/ns-allinone-2.35/tk8.5.10/unix/
NS=/home/prv/ns-allinone-2.35/ns-2.35/
NAM=/home/prv/ns-allinone-2.35/nam-1.15/
export PATH=$PATH:$XGRAPH:$NS:$NAM