TinyOS 2.x for Ubuntu 12.04 and above

At my point of view Ubuntu is better than Windows for TinyOS. Both Ubuntu and TinyOS are the open source. TOSSIM simulator is available in TinyOS itself.

Installation of the TinyOS 2.x

Need to add the following TinyOS repository addresses into the repository source file to install TinyOS . This can accomplished by editing the file /etc/apt/sources.list as follows:

1. To edit sources.list

$ sudo gedit /etc/apt/sources.list

image

In this editer add the following three lines at the end of this document

#tinyOS

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

Save and close it.

2. Open Terminal (ctrl+alt+t)

$ sudo apt-get update

$ sudo apt-get install tinyos

Then you’re going to a list of the TinyOS version available

3. Run the following command to install TinyOS 2.1.2.

$ sudo apt-get install tinyos 2.1.2

4. Install subversion too…

$ sudo apt-get install subversion

5. This will enable the installation of  the latest MSPGCC tools. We now have to download the latest TinyOS® version from the official repository.

$ sudo svn checkout http://tinyos-main.googlecode.com/svn/trunk/ tinyos-main-read-only

$ sudo cp -R /opt/tinyos-main-read-only /opt/tinyos-2.x

6. close terminal.

7. Open new terminal (ctrl+alt+t)

$ sudo -s

this will ask u for a pwd for root change after enter pwd its entered into root mode. which will replace $ to #

# cd  /opt/tinyos-2.1.2

8. create on .sh file for tinyos-2.1.2

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

copy the following content inside the empty gedit

#! /usr/bin/env bash

# Here we setup the environment

# variables needed by the tinyos

# make system

echo “Setting up for TinyOS 2.1.2 Repository Version”

export TOSROOT=

export TOSDIR=

export MAKERULES=

TOSROOT=”/opt/tinyos-2.1.2″

TOSDIR=”$TOSROOT/tos”

CLASSPATH=$CLASSPATH:$TOSROOT/support

/sdk/java:.:$TOSROOT/support/sdk/java/tinyos.jar

MAKERULES=”$TOSROOT/support/make/Makerules”

export TOSROOT

export TOSDIR

export CLASSPATH

export MAKERULES

save the file and exit.

9. Now repeat the step 8 for tinyos-2.x

# cd  /opt/tinyos-2.x

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

copy the following content inside the empty gedit

#! /usr/bin/env bash

# Here we setup the environment

# variables needed by the tinyos

# make system

echo “Setting up for TinyOS 2.x Repository Version”

export TOSROOT=

export TOSDIR=

export MAKERULES=

TOSROOT=”/opt/tinyos-2.x”

TOSDIR=”$TOSROOT/tos”

CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java:.:$TOSROOT/support/sdk/java/tinyos.jar

MAKERULES=”$TOSROOT/support

/make/Makerules”

export TOSROOT

export TOSDIR

export CLASSPATH

export MAKERULES

save and exit

10.Open the terminal console and execute the following command:

$ sudo gedit ~/.bashrc

Add the following lines at the end of the .bashrc file.

#Sourcing the tinyos environment variable setup script

source /opt/tinyos-2.1.2/tinyos.sh

#Sourcing the tinyos environment variable setup script

source /opt/tinyos-2.x/tinyos.sh

save and exit.

11. Close the terminal and restart the PC.

Now on your new terminal u can see….

Setting up for TinyOS 2.1.2 Repository Version

Setting up for TinyOS 2.x Repository Version

So, We successfully installed tinyos-2.x .

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s