0% found this document useful (0 votes)
43 views43 pages

20dit057 Iot

Uploaded by

20dit057
Copyright
© © All Rights Reserved
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)
43 views43 pages

20dit057 Iot

Uploaded by

20dit057
Copyright
© © All Rights Reserved
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/ 43

IT444 - Internet of Things 20DIT057

PRACTICAL - 1

AIM : Installation and configuration of Instant Contiki OS with Cooja.

IMPLIMANTATION :
Step 1: Simply follow this link to download Instant Contiki.

Step 2: Unzip the downloaded file.

Step 3: Start your virtualization software like Vmware or Virtualbox and load your Instant
Contiki File. In Vmware click Open a Virtual Machine as shown below

DEPSTAR-IT 1
IT444 - Internet of Things 20DIT057

Step 4: Navigate to you’re the extracted folder .vmx file

Step 5: Power on your machine

Step 6: Select “I copied it” option.

Step 7: Enter your credentials and start using Instant Contiki (Username and Password is
user).

CONCLUSION : By performing this practical we learned about how to install Contiki.

DEPSTAR-IT 2
IT444 - Internet of Things 20DIT057

PRACTICAL - 2

AIM : Study of different types of motes and deploy them using IoT
architecture. Simulate Hello World program using Cooja.
THEORY :

MicaZ mote:

 The MICAz is a 2.4 GHz Mote module used for enabling low-power, wireless sensor
networks.
 Supported by MoteWorks™ wireless sensor network platform for reliable, ad-hoc
mesh networking
 MoteWork enables the development of custom sensor applications and is specifically
optimized for low-power, battery-operated networks.

Sky mote:

 Tmote Sky is an ultra low power wireless module for use in sensor networks,
monitoring applications, and rapid application prototyping.
 Tmote Sky leverages industry standards like USB and IEEE 802.15.4 to interoperate
seamlessly with other devices.

ESB:

 The ESB (Embedded Sensor Board) is a prototype wireless sensor network device
developed at FU Berlin.
 The ESB consists of a Texas Instruments MSP430 low-power microcontroller with
2k RAM and 60k flash ROM, a TR1001 radio transceiver, a 32k serial EEPROM, an
RS232 port, a JTAG port, a beeper, and a number of sensors (passive IR, active IR
sender/receiver, vibration/tilt, microphone, temperature).
 The Contiki/ESB port contains drivers for most of the sensors. The drivers were
mostly adapted from sources from FU Berlin.

CC430 mote:

 The TI CC430 family of ultra-low-power system-on-chip (SoC) microcontrollers


with integrated RF transceiver cores consists of several devices that feature different
sets of peripherals targeted for a wide range of applications.
 The architecture, combined with five low-power modes, is optimized to achieve
extended battery life in portable measurement applications.

Z1 mote:

DEPSTAR-IT 3
IT444 - Internet of Things 20DIT057

 The Z1 module is a general purpose development platform for wireless sensor


networks (WSN) designed for researchers, developers, enthusiasts and hobbyists.
 It is a platform compatible with the successful Tmote-family motes with several
enhancements that offers roughly a 2x performance in several aspects.

IMPLIMANTATION :

 Let’s Simulate Hello World Program using Cooja, for that click on Cooja which
shows in Contiki’s home screen.

 Now open Contiki simulator, and create new simulation.

 New simulation.

DEPSTAR-IT 4
IT444 - Internet of Things 20DIT057

 Now add new motes.

 Add hello-world.c file in it and click on create.

 Now add number of motes.

DEPSTAR-IT 5
IT444 - Internet of Things 20DIT057

 Check these options of view.

DEPSTAR-IT 6
IT444 - Internet of Things 20DIT057

 Now run the file.

CONCLUSION : By Learning and performing thus practical we learned about how to


Simulate Hello World program using Cooja.

DEPSTAR-IT 7
IT444 - Internet of Things 20DIT057

PRACTICAL - 3

AIM : Create a scenario by adding some motes. Do the simulation for the
same. Also observe the result for said scenario. When one mote send the
signal then led should turn green while one receive then it should show red
color.

IMPLIMANTATION :
1) Make a folder inside the contiki directory named ‘led programming’.
2) Copy the MakeFile file from the ‘hello world’ folder and copy it in the ‘led
programming’.

3) Make a file named led.c and write the following code in it.

DEPSTAR-IT 8
IT444 - Internet of Things 20DIT057

4) Create a new simulation and add new sky motes. Add new process source and select
the before created led.c file. Compile and create the motes.

5) Now right click on the motes and select Show LED Click button.
6) Start the simulation and observe.

CONCLUSION : In this practical, we learned how to configure an LED light to turn on


using the Cooja simulator.

DEPSTAR-IT 9
IT444 - Internet of Things 20DIT057

PRACTICAL - 4

AIM : Simulate BGP and RPL protocol in Cooja.

IMPLIMANTATION :

1) For this task, we will add a sky mote as router and other motes to receive signals and
we will observe the radio traffic between them.First of all, we will open Cooja
simulator and create new simulator.

2) We will browse through example folder to find ipv6 > rpl-borer-router >
borderrouter.c. We will compile it and press create.

3) We will need only 1 router so number of new motes will be 1 only.

DEPSTAR-IT 10
IT444 - Internet of Things 20DIT057

4) To create receiving motes, we will follow the same process to add sky motes. This
time, we will browse to ipv6 > sky-websense > sky-websense.c.

5) We will need more receivers for better visualization so we will add 5 motes.

DEPSTAR-IT 11
IT444 - Internet of Things 20DIT057

6) We can change some view options as our convenience.see the traffic, we will right
click on server and go to Mote tools for Sky 1 > Serial Socket (SERVER)

7) We will be able to see a new window like below.

8) To get more information about traffic, we can go to tools > Radio messages.

DEPSTAR-IT 12
IT444 - Internet of Things 20DIT057

9) Run the simulator.

10) Now, to visualize the content of simulator in browser, we will run the following
command into different terminal.
Commands :
cd Contiki/examples/ipv6/rpl-border-router/ Make connect-router-cooja

11) Now, if we write ip address of router in browser like firefox, we will be able to see
its neighbour’s information.

DEPSTAR-IT 13
IT444 - Internet of Things 20DIT057

12) And if we search for ip address of any receiver mote, we will be able to get its sensed
data like light and temperature.

CONCLUSION : In this practical, we learned about BGP and RPL, we implemented


those concepts in cooja by sky motes and observed the radio traffic between motes.

DEPSTAR-IT 14
IT444 - Internet of Things 20DIT057

PRACTICAL - 5

AIM : Simulate client server architecture using UDP on contiki-os.

IMPLIMANTATION :

1) Create new simulation.

2) Add new sky mote of udp-server and udp-client.

DEPSTAR-IT 15
IT444 - Internet of Things 20DIT057

3) Now add the number of motes.

DEPSTAR-IT 16
IT444 - Internet of Things 20DIT057

4) Check the view section’s options.

DEPSTAR-IT 17
IT444 - Internet of Things 20DIT057

5) Run the simulator.

CONCLUSION : By performing this practical we learned to simulate client server


architecture using UDP on contiki-os.

DEPSTAR-IT 18
IT444 - Internet of Things 20DIT057

PRACTICAL - 6

AIM : Demonstrate message publish & subscribe mechanism of MQTT


protocol using node red.

IMPLIMANTATION :

THEORY :

Node Red:

 Node-RED is a programming tool for wiring together hardware devices, APIs


and online services in new and interesting ways.
 It provides a browser-based editor that makes it easy to wire together flows using
the wide range of nodes in the palette that can be deployed to its runtime in a
single-click.
 Node-RED provides a browser-based flow editor that makes it easy to wire
together flows using the wide range of nodes in the palette. Flows can be then
deployed to the runtime in a single-click.
 JavaScript functions can be created within the editor using a rich text editor.
 A built-in library allows you to save useful functions, templates or flows for re-
use.
 The light-weight runtime is built on Node.js, taking full advantage of its event-
driven, non-blocking model. This makes it ideal to run at the edge of the network
on low-cost hardware such as the Raspberry Pi as well as in the cloud.

MQTT:

 MQTT is an OASIS standard messaging protocol for the Internet of Things (IoT).
 It is designed as an extremely lightweight publish/subscribe messaging transport that
is ideal for connecting remote devices with a small code footprint and minimal
network bandwidth.
 MQTT today is used in a wide variety of industries, such as automotive,
manufacturing, telecommunications, oil and gas, etc.

PRACTICAL :

 We can install node red on windows by following command.


 npm install -g --unsafe-perm node-red
 Then we can run “node-red” command in cmd to start the node-red.

DEPSTAR-IT 19
IT444 - Internet of Things 20DIT057

 It will give us an IP address to use web-based node-red.

 First, we will install broker for MQTT protocol.


 For that, we will go to menu situated at top right corner.
 We will see Manage Palette option there.
 By clicking on it, User settings will be opened.
 We go to Install tab and search MQTT.

 We will install “node-red-contrib-mqtt-broker” or “node-red-contrib-aedes”

DEPSTAR-IT 20
IT444 - Internet of Things 20DIT057

 Then we will add 4 nodes.


 Inject node, which will be renamed as Timestamp.
 Debug node, which will be renamed as msg.payload.
 MQTT in
 MQTT out
 We will connect timestamp node to MQTT out and debug node to MQTT in.

 Then we will add MOSCA MQTT broker or AEDES MQTT broker.

DEPSTAR-IT 21
IT444 - Internet of Things 20DIT057

 We can double click on node to see and change their propertied.

 We will first configure MQTT out node.

 We will add new mttt-broker. So we click on the button beside it.


 We will add name and server IP address.
 We can add additional settings like security too if we want.

DEPSTAR-IT 22
IT444 - Internet of Things 20DIT057

 When we click add, the server will be created and we will fill a couple of fields there
like topic and QoS.
 We will provide same configuration for MQTT in node but we don’t need to create
MQTT Broker again.

 We will give input string in timestamp node. We change the timestamp to string of
“Hello world” and give it the topic name same as MQTT nodes.

 Now we can deploy our model by “Deploy” button on top right corner.
 We can see “Successfully deployed” message.
 And in a moment, we will be able to see connected status if there is no error.
 In debug console, which can be opened from right panel, we can see the output
received by.

DEPSTAR-IT 23
IT444 - Internet of Things 20DIT057

 Debug node after clicking inject node to send the text.

 We can see the status on top too.

CONCLUSION : In this practical, we learned about Node red and MQTT. We


implemented the MQTT connection using Node red.

DEPSTAR-IT 24
IT444 - Internet of Things 20DIT057

PRACTICAL - 7

AIM : Simulate CoAP protocol in contiki os.

IMPLIMANTATION :

THEORY :

Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with
constrained nodes and constrained networks in the Internet of Things. CoAP is designed to
enable simple, constrained devices to join the IoT even through constrained networks with
low bandwidth and low availability. It is generally used for machine-to-machine (M2M)
applications such as smart energy and building automation. The protocol was designed by
the Internet Engineering Task Force (IETF), CoAP is specified in IETF RFC 7252.

CoAP Features

 Web Protocol Used in M2M With Constrained Requirements


 Asynchronous Message Exchange
 Low Overhead
 Very Simple To Perform Syntactic Analysis
 Uniform Resource Identifier
 Proxy and Caching Capabilities

IMPLIMANTATION :

1) First, we have to create new simulator in Cooja simulator.

DEPSTAR-IT 25
IT444 - Internet of Things 20DIT057

2) Now, create sky mote name router from rpl-border-router and select file border-
router.c.Compile the file and set quantity as 1.

3) Create 2nd sky mote and name as server, select file from er-rest-examples>er-server-
example-server.c. Begin the compilation of file.

4) Take 2 server motes.

DEPSTAR-IT 26
IT444 - Internet of Things 20DIT057

5) Check the serial socket of server.

6) Make the connection of router and server by giving the command in terminal.

7) Connection is established.

DEPSTAR-IT 27
IT444 - Internet of Things 20DIT057

8) Now start the simulation and measure/analyse the network. Set the 3rd node in such a
way that it is not in the range of router.

9) Now we can see the addresses of servers.

DEPSTAR-IT 28
IT444 - Internet of Things 20DIT057

10) Now open the browser.

11) Put the address of server as shown in the below figure.

DEPSTAR-IT 29
IT444 - Internet of Things 20DIT057

12) Select core and click the get button, we can see the results of testing, sensors,
actuators.

13) Now click the toggle button and give 1 in the outgoing section and post the data on
the network.

DEPSTAR-IT 30
IT444 - Internet of Things 20DIT057

14) By giving the data from the browser check the mote interface shown in the figure.

CONCLUSION : By performing this practical, we are able to learn CoAP Protocol.

DEPSTAR-IT 31
IT444 - Internet of Things 20DIT057

PRACTICAL - 8

AIM : Implement mini project and connect with IBM Bluemix &
Thingspeak for data collection on cloud and plot the graph of it. Plotting
data on thingspeak.com. Take analog input from ESP and pass that data
to api.thingspeak.com and prepare a 2 online graph.

THEORY :
Bluemix:

 Bluemix is the IBM open cloud platform that provides mobile and web developers
access to IBM software for integration security transaction and other key functions as
well as software from business partners.
 Built on Cloud Foundry open source technology Bluemix provides pre-built Mobile
Backend as a Service (MBaaS) capabilities. Bluemix offers more control to
application developers by using its Platform as a Service (PaaS) offering. The goal is
to simplify the delivery of an application by providing services that are ready for
immediate use and hosting capabilities to enable internal scale development.
 With the broad set of services and runtimes in Bluemix the developer gains control
and flexibility and has access to various data options from predictive analytics to big
data.
Bluemix provides the following features:
 A range of services that enable you to build and extend web and mobile apps fast
 Processing power for you to deliver app changes continuously
 Fit-for-purpose programming models and services
 Manageability of services and applications
 Optimized and elastic workloads
 Continuous availability

Thingspeak:

 ThingSpeak allows you to aggregate, visualize and analyze live data streams in the
cloud. Some of the key capabilities of ThingSpeak include the ability to:
 Easily configure devices to send data to ThingSpeak using popular IoT Simulate
CoAPs.
 Visualize your sensor data in real-time.
 Aggregate data on-demand from third-party sources.
 Use the power of MATLAB to make sense of your IoT data.
 Run your IoT analytics automatically based on schedules or events.
 Prototype and build IoT systems without setting up servers or developing web
software.
 Automatically act on your data and communicate using third-party services like
Twilio or Twitter

DEPSTAR-IT 32
IT444 - Internet of Things 20DIT057

PROGRAM :
Bluemix:

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <PubSubClient.h>
#include "DHT.h"

const char* ssid = "speedzone";


const char* password = "1234567890";
#define DHTPIN 4
#define DHTTYPE DHT11
#define ORG "r9xhnn*"
#define DEVICE_TYPE "Node_MCU"
#define DEVICE_ID "1234"
#define TOKEN "sXo4VQIlswL&KUtnbV"

char server[] = ORG ".messaging.internetofthings.ibmcloud.com";


char pubTopic1[] = "iot-2/evt/status1/fmt/json";
char pubTopic2[] = "iot-2/evt/status2/fmt/json";
char authMethod[] = "use-token-auth";
char token[] = TOKEN;
char clientId[] = "d:" ORG ":" DEVICE_TYPE ":" DEVICE_ID;

WiFiClient wifiClient;
PubSubClient client(server, 1883, NULL, wifiClient);
DHT dht(DHTPIN, DHTTYPE);
void setup()
{ Serial.begin(960
0); dht.begin();
Serial.println();
Serial.print("Connecting to ");
Serial.print(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");

Serial.print("WiFi connected, IP address: ");


Serial.println(WiFi.localIP());

if (!client.connected())
{ Serial.print("Reconnecting client to
"); Serial.println(server);
while (!client.connect(clientId, authMethod, token)) {

DEPSTAR-IT 33
IT444 - Internet of Things 20DIT057

Serial.print(".");
delay(500);
}
Serial.println("Bluemix connected");
}
}

long lastMsg = 0;
void loop() {
client.loop();
long now = millis();
if (now - lastMsg > 3000) {
lastMsg = now;
float humidity = dht.readHumidity();
float temperature = dht.readTemperature();
String payload = "{\"d\":{\"Name\":\"" DEVICE_ID "\"";
payload += ",\"temperature\":";
payload += temperature;
payload += "}}";

Serial.print("Sending payload: ");


Serial.println(payload);

if (client.publish(pubTopic1, (char*) payload.c_str()))


{ Serial.println("Publish ok");
} else {
Serial.println("Publish failed");
}
String payload1 = "{\"d\":{\"Name\":\"" DEVICE_ID "\"";
payload1 += ",\"humidity\":";
payload1 += humidity;
payload1 += "}}";

if (client.publish(pubTopic2, (char*) payload1.c_str()))


{ Serial.println("Publish ok");
} else {
Serial.println("Publish failed");
}
}
}

DEPSTAR-IT 34
IT444 - Internet of Things 20DIT057

DEPSTAR-IT 35
IT444 - Internet of Things 20DIT057

Thingspeak:

#include <ESP8266WiFi.h>

#define SENSOR A0

const char* ssid = "Rudrabarad"; //WiFiSSID


const char* password = "Rab@0412"; //PASSWORD

const char* host = "api.thingspeak.com";


// Data URL: https://thingspeak.com/channels/XXXXX/
const char* privateKey = "3YXEKIDV5QABOREZ"; //ENTER_YOUR_PRIVATE_KEY

void setup()
{ Serial.begin(960
0); delay(10);
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {


delay(500);
Serial.print(".");
}

Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}

float value = 0;

void loop()
{ delay(500
0);
value = analogRead(A0);

Serial.print("connecting to ");
Serial.println(host);

// Use WiFiClient class to create TCP


connections WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println("connection
failed"); return;
}
DEPSTAR-IT 36
IT444 - Internet of Things 20DIT057

Serial.println("connection done");
// We now create a URI for the request
String url = "/update?";
url += "key=";
url += privateKey;
url += "&field1=";
url += value;

Serial.print("Requesting URL: ");


Serial.println(url);

// This will send the request to the server


client.print(String("GET ") + url + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"Connection: close\r\n\r\n");
delay(10);

// Read all the lines of the reply from server and print them to Serial
while (client.available()) {
String line = client.readStringUntil('\r');
Serial.print(line);
}

Serial.println();
Serial.println("closing connection");
}

DEPSTAR-IT 37
IT444 - Internet of Things 20DIT057

CONCLUSION : In this practical, we learned about IBM bluemix and Thingspeak


platforms. We uploaded data to both the platforms and plotted the graph.

DEPSTAR-IT 38
IT444 - Internet of Things 20DIT057

PRACTICAL - 9

AIM : Uses of Mishellium gateway for Zigbee Communication.

THEORY :

ZigBee module:

 Zigbee is a low-cost, low-power, wireless mesh network standard targeted at battery-


powered devices in wireless control and monitoring applications.
 Zigbee delivers low-latency communication.
 Zigbee chips are typically integrated with radios and with microcontrollers.
 Zigbee operates in the industrial, scientific and medical (ISM) radio bands: 2.4 GHz in
most jurisdictions worldwide; though some devices also use 784 MHz in China, 868
MHz in Europe and 915 MHz in the US and Australia, however even those regions and
countries still use 2.4 GHz for most commercial Zigbee devices for home use.
 Data rates vary from 20 kbit/s (868 MHz band) to 250 kbit/s (2.4 GHz band).
 Zigbee builds on the physical layer and media access control defined in IEEE standard
802.15.4 for low-rate wireless personal area networks (WPANs).
 The specification includes four additional key components: network layer, application
layer, Zigbee Device Objects (ZDOs) and manufacturer-defined application objects.
 ZDOs are responsible for some tasks, including keeping track of device roles,
managing requests to join a network, as well as device discovery and security.
 The Zigbee network layer natively supports both star and tree networks, and generic
mesh networking.
 Every network must have one coordinator device. Within star networks, the coordinator
must be the central node.
 Both trees and meshes allow the use of Zigbee routers to extend communication at the
network level.
 It builds on the basic security framework defined in IEEE 802.15.4.
 Zigbee protocols are intended for embedded applications requiring low power
consumption and tolerating low data rates.
 The resulting network will use very little power—individual devices must have a
battery life of at least two years to pass certification.
 Typical application areas include:
 Home automation
 Wireless sensor networks
 Industrial control systems
 Embedded sensing
 Medical data collection
 Smoke and intruder warning
 Building automation
 Remote wireless microphone configuration

DEPSTAR-IT 39
IT444 - Internet of Things 20DIT057

 Zigbee is not for situations with high mobility among nodes. Hence, it is not suitable
for tactical ad hoc radio networks in the battlefield, where high data rate and high
mobility is present and needed.

CONCLUSION : In this practical, we learned about Zigbee module.

DEPSTAR-IT 40
IT444 - Internet of Things 20DIT057

PRACTICAL - 10

AIM : Study on Tiny OS architecture and implement blink program.

THEORY :

TinyOS is an embedded, component-based operating system and platform for low-power


wireless devices, such as those used in wireless sensor networks (WSNs), smartdust,
ubiquitous computing, personal area networks, building automation, and smart meters. It is
written in the programming language nesC, as a set of cooperating tasks and processes. It
began as a collaboration between the University of California, Berkeley, Intel Research, and
Crossbow Technology, was released as free and open-source software under a BSD license,
and has since grown into an international consortium, the TinyOS Alliance.
TinyOS has been used in space, being implemented in ESTCube-1.
TinyOS is an open-source, BSD-based operating system which uses the nesC programming
language to control and manage wireless sensor networks (WSN). The sensor devices (called
motes) in such networks are characterized by low power, limited memory and very small
form factor.

Why Is TinyOS Useful for Wireless Sensor Networks?

Low-power sensors, due to their limitations in scope, require efficient utilization of


resources. TinyOS is essentially built on a “components-based architecture” to reduce code
size to around 400 to 500 bytes and an “events-based design” which eliminates the need for
even a command shell.
The components-based architecture uses “nesC,” which is a C programming language
designed for networking embedded systems. Each code snippet consists of simple functions
placed within components and complex functions integrating all the components together.
TinyOS also uses an “events-based design” whose objective is to put the CPU to rest when
there are no pending tasks. An event can be something such as the triggering of an alert when
the temperature of a thermostat rises or falls above a certain value. As soon as the event is
over, the sensor motes can go to sleep.
The need for a design like TinyOS is mandatory in applications such as smart transit and
smart factories. Because of thousands of sensors, it is important to have a very small memory
footprint to reduce power requirements.
Where Is TinyOS Being Used?
At the moment, TinyOS has over 35,000 downloads. Its main applications lie in all kinds of
devices which utilize wireless sensor networks.

Environmental monitoring:
 Since each TinyOS system can be embedded in a small sensor, they are useful in
monitoring air pollution, forest fires, and natural disaster prevention

Smart vehicles:
 Smart vehicles are autonomous and can be understood as a network of sensors. These
sensors communicate through low-power wireless area networks (LPWAN) which
makes TinyOS a perfect fit.

DEPSTAR-IT 41
IT444 - Internet of Things 20DIT057

Smart cities:
 TinyOS is a viable solution for the low-power sensor requirements of smart cities’
utilities, power grids, Internet infrastructure and other applications.

Machine condition monitoring:


 Machine-to-machine (M2M) applications have many sensor interfaces. It is
impossible to assign a complete computing environment to each sensor. TinyOS can
perform security, power management and debugging of the sensors.

TinyOS models:

1. Data model:
Static Memory Allocation
 No Heaps or any other dynamic structures used.
 Memory requirements determined at compile time.
 This increases the runtime efficiency.
Global variables
 Allocated on per frame basis.
Local Variables
 Saved on the stack
 Defined in the function/method

2. Thread model:
Power-Aware Two-levels Scheduling
 Long running tasks and interrupt events

DEPSTAR-IT 42
IT444 - Internet of Things 20DIT057

 Sleep unless tasks in queue, wakeup on event


Tasks
 Time-flexible, background jobs
 Atomic with respect to other tasks
 Can be preempted by events
Events
 Time-critical, shorter duration
 Last-in first-out semantic (no priority)
 Can post tasks for deferred execution

3. Programming model:
Construction of Modules
 Modules implementation similar to C coding
 Programs are built out of components
 Each component specifies an interface
 Interfaces are “hooks” for wiring components
Composition of Configurations
 Components are statically wired together
 Increases programming efficiency (code reuse) a runtime efficiency.

4. Component model:
 Components should use and provide bidirectional interfaces.
 Components should call and implement commands and signal and
handle events.
 Components must handle events of used interfaces and also provide
interfaces that must implement commands.

CONCLUSION : In this practical, we learned about features and application of TinyOS


and we learned about its models and nesC language.

DEPSTAR-IT 43

You might also like