0% found this document useful (0 votes)
911 views9 pages

Wireless Mobile and Sensor Networks Project #1 Assignment

This document discusses a project to simulate a wireless sensor network with two nodes using TinyOS and TOSSIM. It provides an overview of TinyOS, an operating system for sensor networks, and nesC, the programming language used to write TinyOS applications. It describes setting up the TinyOS development environment, writing sample applications, and using TOSSIM to simulate applications by running them on a PC instead of on physical sensor nodes. The project implementation section discusses generating documentation from the sample application code and presenting the results of simulating a two-node wireless sensor network with TinyOS and TOSSIM.

Uploaded by

arthi_pk
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
911 views9 pages

Wireless Mobile and Sensor Networks Project #1 Assignment

This document discusses a project to simulate a wireless sensor network with two nodes using TinyOS and TOSSIM. It provides an overview of TinyOS, an operating system for sensor networks, and nesC, the programming language used to write TinyOS applications. It describes setting up the TinyOS development environment, writing sample applications, and using TOSSIM to simulate applications by running them on a PC instead of on physical sensor nodes. The project implementation section discusses generating documentation from the sample application code and presenting the results of simulating a two-node wireless sensor network with TinyOS and TOSSIM.

Uploaded by

arthi_pk
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Wireless Mobile and Sensor Networks

Project #1 Assignment
Table of contents

1. Abstract

2. Introduction

3. Project Objectives and Software requirements

4. Getting started with Tinyos, nesC and Tossim

5. Project Implementation

6. Documents generated from Graphviz

7. Source Code

8. Problems and Tricks

9. Future Work

10. Results and Discussion

11. References
Abstract

Wireless Sensor Networks (WSNs) are composed of a large number of very small devices used for
biomedical or environmental monitoring applications. Sensor networks potentially consist of thousands of
tiny, low-power nodes, each of which executes concurrent, reactive programs that must operate with
severe memory and power constraints. In this project we present TinyOS, a flexible, application-specific
operating system for sensor networks. Using Tinyos, simulate a WSN with two nodes based on the
TinyOS simulator (TOSSIM) for wireless sensor devices. Also experiences working with TinyOS are
presented which is a platform for sensor network innovation and applications
Introduction

Tinyos is a free and open source component-based operating system and platform for wireless sensor
networks (WSNs). TinyOS is an embedded operating system written in the nesC programming language.
TinyOS applications are written in nesC, an extension of the C programming language and it is optimized
for the memory limitations of sensor networks. TinyOS programs are built out of software components,
some of which present hardware abstractions. Components are connected to each other using interfaces.
TinyOS provides interfaces and components for common use such as packet communication, routing,
sensing, actuation and storage.

Active Message
Communication
Main (includes Scheduler)

Active Message
Actuating Sensing
Communication
Application (User Components)

Mote Hardware

Figure 1: Simplified Version of Tinyos Architecture

nesC, is a systems programming language for networked embedded systems such as motes. nesC
supports a programming model that integrates reactivity to the environment, concurrency, and
communication. nesC is based on the concept of components, and directly supports Tinyos’s event based
concurrency model.

TOSSIM is a discrete event simulator for Tinyos sensor networks. Instead of compiling a TinyOS
application for a mote, users can compile it into the TOSSIM framework, which runs on a PC. This
allows users to debug, test, and analyze algorithms in a controlled and repeatable environment. As
TOSSIM runs on a PC, users can examine their Tinyos code using debuggers and other development
tools.
Project Objectives

 To build and simulate a simple wireless sensor network with two nodes (one sensor node and one
sink
 node) using Tinyos and Tossim.

 Need to install tinyos operating system and learn the nesC programming language with which
tinyos applications are built.

 To study Tossim, a simulator tool for tinyos with the help of which we can simulate wireless
sensor network.

 The simulation is to be explained, with the problems that we came through.

System Requirements

 System with windows or Linux platform.

 Cygwin installed for windows based system

 Tinyos 2.X

 Graphviz
Getting started with Tinyos and nesC

The first few tutorial lessons give the basic idea of tinyos and nesC. The first step is to install tinyos-2.x
which involves the following steps.

 Install Java 1.6 JDK


 Install Cygwin
 Install native compilers
 Install TinyOS toolchain
 Install the TinyOS 2.x source tree
 Installing Graphviz

After the installation the first step is to check that environment is set up correctly. For this we have to run
the tos-check-env command. This should run successfully without errors.

Running Sample application

Studying the sample application like Blink gives us the fundamental idea for writing applications in
tinyos. Blink is composed of two components: a module, called "BlinkC.nc", and a configuration, called
"BlinkAppC.nc". We should know that all applications require a top-level configuration file, which is
typically named after the application itself. In this example BlinkAppC.nc is the configuration for the
Blink application and the source file that the nesC compiler uses to generate an executable file.
BlinkC.nc, provides the implementation of the Blink application.

Mote to mote radio communication provides information on how to use the interfaces and components.
There are various numbers of interfaces and some them that are commonly used are given below.

 Packet - Provides commands for clearing a message's contents, getting its payload length, and
getting a pointer to its payload area.
 Send - provides commands for sending a message and canceling a pending message send. The
interface provides an event to indicate whether a message was sent successfully or not.
 Receive - Provides the basic message reception interface. This interface provides an event for
receiving messages.
 PacketAcknowledgements - Provides a mechanism for requesting acknowledgements on a per-
packet basis.

 RadioTimeStamping - Provides time stamping information for radio transmission and reception.

Sensing demonstrates two sensor applications: a simple application called Sense that periodically takes
sensor readings and displays the values on the LEDs. Sensing involves two tasks: configuring a sensor
and reading the sensor data. The first task is difficult, because a sensing application like, for example,
Sense runs on TinyOS platform. It is not possible to know the configuration details of sense application
because the configuration details of sensors will be different from platform to platform. Unless Sense
knows about all sensors on all platforms it will be unable to perform the configuration task. But,
performing the second task i.e.) reading the sensor data -can be solved so that the Sense application can
collect sensor data though it is running on a different platform.

Getting Started with TOSSIM

TOSSIM simulates entire TinyOS applications. It works by replacing components with simulation
implementations. TOSSIM supports two programming interfaces: Python and C++. The first step is to
compile Tossim with the help of make micaz sim command. The make system of Tossim performs the
following steps:

 Writing an XML Schema: Describes the application


 Compiling the TinyOS Application: Changes the include paths of the application which
means that any system-specific simulation implementations will be used first, followed by
generic TOSSIM implementations, followed by standard implementations
 Compiling the Programming Interface: compiles support for the C++ and Python
programming interfaces
 Building the Shared Object: This builds a shared library that contains the TOSSIM code, the
C++ support, and the Python support
 Copying Python Support: Python code exists in lib/tossim and the make process copies it
into the local directory
Project Implementation

Documents generated from Graphviz

Graphviz is open source graph visualization software. Graph visualization is a way of representing
structural information as diagrams of abstract graphs and networks.

Clicking on MainC, which gives the wirings for the boot sequence:

Figure 2 : Pictorial representation of Wirings of boot sequence

In the navigation panel on the left, components are below interfaces. Click on WirelessSensorAppC, and
we get a figure like this:

Figure 3: Pictorial Representation of WirelessSensorC Application

Future Work

– Provide additional communication interfaces (more complex MAC layers


or messaging protocols)
– Dynamic uploading of handler functions.
– Comparison with other models
– Extension to multiple hardware platforms

References

1. http://www.tinyos.net/

2. http://webs.cs.berkeley.edu/tos/tinyos-1.x/doc/
3. www.tinyos.net/presentations/TOSposter.ppt

4. http://atc.dacya.ucm.es/atc/descargar.php?file=DCIS07.pdf

You might also like