Lab2: Introduction to TinyOS
Objective:
The objective of this lab is to introduce the students to TinyOS and its
installation procedure.
Learning Outcomes
Students will be able to install TinyOS on Windows with correct
configuration. Students will be acquainted with basic concepts of Cygwin.
Why TinyOS?
Problems with traditional OS
The traditional OS is too big for wireless sensor networks.
Also it has a multithreaded architecture that leaves a large memory footprint. Since the traditional OS
was not built considering the constraints for energy and power for wireless sensor networks there is a
need for a new memory and energy efficient operating system for wireless sensor networks. It also should
provide concurrency and diversity in design and usage. [3]
What is TinyOS?
TinyOS is a free and open source operating system developed primarily
for wireless sensor networks. It was written in NesC Programming language. TinyOS started as collaboration comprising
University of California, Berkeley in co-operation with Intel Research, and has since grown to be an international
consortium, the TinyOS Alliance. It is also intended to be incorporated into Smartdust. [1][2]
TinyOS provides an efficient solution
TinyOS uses an event driven architecture and has no user/kernel boundary
hence it provides concurrency. It is power efficient as makes the microcontroller and radio to sleep.
It has a small memory footprint as uses non-preemtable FIFO task scheduling. [2][3].
Exercises (20 Points):
1. Why there was need of new operating system for wireless sensor networks?
2. Why TinyOS is preferred as operating system for wireless sensor networks?
Installing TinyOS 2.1
There are two ways to install TinyOS:-
1. Using Live CD - It gives you a virtualized Linux with a complete TinyOS
install. Since on a CD you cannot modify anything; you can, however,
make a LiveUSB device to use as your TinyOS install.
2. Manual Install on Host Operating System - If you are installing on your
host operating system, you can either use a debian package repository or
manually install with RPMs.
XubunTOS simplifies the installation of TinyOS by using a Linux live CD. The
kernel image can be downloaded at:
http://toilers.mines.edu/Public/XubunTOS
To install TinyOS on your system please refer to the tutorial on the TinyOS
website as it is the best tutorial available to install TinyOS. It covers all the
important facts and points you need to know about the installation. Read the
tutorial given on the TinyOS Website.
http://docs.tinyos.net/index.php/Installing_TinyOS_2.1
But there may be some problems or questions unanswered so here are few hints and steps listed to follow.
1. After the installation of Cygwin open the Cygwin shell and type in the
mentioned commands. Also have all the packages downloaded and saved
in one directory.
2. Type the mentioned commands in the tutorial and install all the rpm
packages. After installing all the rpm files you also need to set the
environment variables. It can be done by going in advanced system
settings and setting the environment variables by adding new
environment variables. Also add the actual path for e.g. TOSROOT should
have value C:\cygwin\opt\tinyos-2.x if all Cygwin is installed using
default settings.
3. Also if you still have problems see the FAQs on the TinyOS Website and if
problems persist report your problems here.
http://webs.cs.berkeley.edu/tos/contrib.html
TOSSIM
TOSSIM is basically a TinyOS Mote Simulator it allows programmers to
test and debug their algorithms in a controlled and repeatable
environment. [12]
TOSSIM provides Bit-level Simulation that allows capturing network at
high fidelity. [13]
Read the TOSSIM document to understand TOSSIM and its use more
clearly.
http://www-users.itlabs.umn.edu/classes/Spring-2008/csci8211/notes/6-TOSSIM.pdf
Note: You can find all the mentioned files in this document in the resources
folder for the Labs.
Exercises: (Show your output to the instructor to earn points)
1. Type
tos-check-env
Test if the TinyOS environment is setup correctly the output should not
show any errors and warnings. (5 Points)
2. Explain the need of TOSSIM.(3 Points)
3. Explain three of important features of TOSSIM. (6 Points)
4. Type - make micaz sim
You should get output without any errors. (10 Points)
References:-
- http://www.tinyos.net/
- http://www.cs.virginia.edu/~cl7v/cs851-talks/ tinyos chenyang.ppt
- http://www.princeton.edu/~wolf/EECS579/imotes/tos_tutorial.pdf
- http://www.princeton.edu/~wolf/EECS579/imotes/tos_tutorial.pdf
- http://docs.tinyos.net/index.php/Installing_TinyOS_2.0.2#One -step_Install_with_a_Live_CD
- http://toilers.mines.edu/Public/XubunTOS
- http://docs.tinyos.net/index.php/Installing_TinyOS_2.0.2#Manual_installation_
on_your_host_OS_with_RPMs
- http://docs.tinyos.net/index.php/Getting_started
- http://docs.tinyos.net/index.php/Java_cygwin
- http://docs.tinyos.net/index.php/Getting_Started_with_TinyOS
- http://ds.informatik.rwth-aachen.de/teaching/ws0809/tinyos/lab1.pdf
- http://www.cs.berkeley.edu/~pal/research/tossim.html
- http://www-users.itlabs.umn.edu/classes/Spring-2008/csci8211/notes/6-TOSSIM.pdf
|