WSN PractFile
WSN PractFile
Practical 1
Aim : Create a wireless network of multiple PCs using appropriate AccessPoints.
Steps :
Step 1 : Create the following topology using the component (i.e AccessPoint-PT-A,
AccessPoint-PT, AccessPoint-PT-N, 2PCs, Laptop and Server).
Step 3 : Now turn off the port 1 or add WEP key for port 1 of A AccessPoint-PT after
adding the WEP Key the laptop and the server will form association with
AccessPoint-PT-N .
Practical 2
Aim : Exploring and understanding TinyOS computational concepts :- Events, Commands
and Task.
- nesC model
- nesC Components
Explaination :
TinyOS:
• TinyOS is an open-source operating system designed for low-power wireless devices,
particularly those used in sensor networks and Internet of Things (IoT) applications. It
is characterized by its lightweight design, efficiency, and flexibility, making it suitable
for resource-constrained devices.
• Originally developed at the University of California, Berkeley, TinyOS is written in
the nesC (network embedded systems C) programming language, which is
specifically designed for embedded systems and sensor networks.
1. Events:
• Definition: Events represent asynchronous occurrences such as sensor
readings, incoming messages, or timer expirations. They are declared within
interfaces of components using the event keyword.
• Event Handlers: Event handlers are functions that are called in response to
the occurrence of an event. They are defined using the event qualifier.
• Invocation: Events are raised (or fired) by components to signal the
occurrence of a specific event using the call statement.
• Registration: Components can subscribe to events raised by other
components using the post statement.
• Concurrency: Events are scheduled and executed in a non-preemptive
manner. It's essential to write event handlers efficiently to avoid blocking
operations.
2. Commands:
• Definition: Commands represent actions that can be performed on a
component. They are declared within interfaces of components using the
command keyword.
• Command Handlers: Command handlers are functions that implement the
behavior associated with a command. They are defined using the command
qualifier.
• Invocation: Commands are called by other components or modules to perform
specific actions using the call statement.
3. Tasks:
• Definition: Tasks represent units of computation that are executed
asynchronously. They are similar to functions or procedures in conventional
programming languages but are executed asynchronously.
• Task Handlers: Task handlers are functions that define the behavior of a task.
They are defined using the task qualifier.
• Scheduling: Tasks are scheduled for execution by the TinyOS scheduler. They
can be scheduled to execute periodically, in response to events, or based on
other criteria.
• Concurrency: Tasks can run concurrently with other tasks and event handlers.
It's crucial to manage concurrency effectively to avoid race conditions and
ensure correct behavior.
• Asynchronous Execution: Tasks execute asynchronously, meaning that they
can be preempted by higher-priority tasks or events.
A. nesC model:
• The nesC model encompasses several key features and design principles:
1. Component-Based Architecture: nesC promotes a component-based architecture,
where software is divided into modular components that interact through well-defined
interfaces. Components encapsulate functionality and can be composed to build
complex systems.
2. Interfaces: Interfaces define the contracts between components. They specify a set of
commands, events, and sometimes configuration parameters that a component must
support. Components can provide or use interfaces, allowing for modularity and code
reuse.
B. nesC components:
In nesC (network embedded systems C), components are the building blocks of the
software architecture. They encapsulate functionality, promote modularity, and enable
code reuse. Components in nesC follow a component-based architecture, where
software is divided into modular units that interact through well-defined interfaces.
Components are defined using the module keyword in nesC. Components interact
with each other through interfaces. Interfaces specify a set of commands, events, and
possibly configuration parameters that a component must support.
Practical 3
Aim : Understanding TOSSIM for
- Mote-mote radio communication
- Mote-PC serial communication
Explanation :
TOSSIM stands for TinyOS Simulator. It is a simulation environment for TinyOS-
based wireless sensor networks. TOSSIM allows developers to test and debug their TinyOS
applications without the need for physical hardware, providing a convenient and efficient way
to experiment with different network configurations, algorithms, and protocols.
Practical 4
Steps :
Step 1 : Open OMNet++ and Goto File and click on Import the Select Existing Project into
Workspace .
Step 2 : Open OMNet++ and Goto File and click on Import the Select Existing Project into
Workspace .
Step 3 : Create a new folder inside inet > samples > adhoc folder .
Step 4 : Create a new .NED file inside the folder you created .
Step 5 : After naming file click on next and select the following options.
Step 7: Then Right-click on our .NED file and Goto Run as > Omnet++ Simulation.
Practical 5
Aim : Understanding, Reading and Analyzing Routing Table of a network. Routing Table is
given we need draw the topology.
Routing Table :
Router 0 :
Router 1 :
Topology Diagram :
Configuration of Router 0:
Configuration of Router 1:
Practical 6
Aim : Create a basic MANET implementation simulation for Packet animation and Packet
Trace.
Steps :
Step 1 : Create a new folder “manetPract” in “inet/example/manetrouting”.
Step 3 : Enter the name of the file and click on “Next >”
Step 4 : Select Generated Wizards > New Adhoc Mobility Wireless Networ.
Step 7 : Right Click on the .NED file and select Run as > 1 OMNet++ Simulation.
Practical 7
Aim : Implement a Wireless sensor network simulation.
Steps :
Step 1 : Create the topology using the component mention in the aim.
Step 2 : Now copy the “Home Gateway SSID“ and paste it in the “Smart Device
SSID” .
Step 3 : Go to “Smart Device > Desktop > IoT Monitor Enter the Username and
password if signed in or else create the Username as “admin” and password as
“admin”.
Step 4 : Now Go to IoT Devices enable Advance option in bottom right corner and add
the PT-IOT-NM_1W Network Adapter. Repeat this step for all IoT Devices.
Step 5 : Now Go to IoT Devices > Config > IoT Server and choose Home Gateway.
Step 6 : Now Go to SmartDevice > Desktop > IoT Monitor and Login.
Step 7 : Now you can control your IoT Devices with your smart phone,
Step 8 : Now you can control your IoT Devices with your smart phone,
Practical 8
Steps :
Step 1 : Go to “File > Import” and select “Existing Projects into Workspace” and click
on Next .
Step 5 : Enter file name and click on Next> then select the “New Managed Mobility
Wireless Network Wizard”.
Step 7 : After Click on Finish you will get the predefined topology with 5 hosts, 1AP, 1 CC ,
and 1 configurator then click on the .NED file that you have created and
Run as > Run Configuration.
Practical 9
Aim : Create a mobile network using Cell Town and Central Office Server. Simulate
connection between them.
Steps :
Step 1 : Take Smart Phone, WRT300N, PT-HUB, Cell Tower, Central-Office Server and
Router for forming the topology.