SlideShare a Scribd company logo
Contiki:Open
SourceOS for the
Internet ofThings
WhyChoose
Contiki?
 Contiki is an open source operating system for the
Internet ofThings.
 Contiki connects tiny low-cost, low-power
microcontrollers to the Internet
TheContiki
Operating
System
 Contiki is an open source operating system that
runs on tiny low-power microcontrollers and makes
it possible to develop applications that make
efficient use of the hardware while providing
standardized low-power wireless communication
for a range of hardware platforms.
 Contiki is used in numerous commercial and non-
commercial systems, such as city sound monitoring,
street lights, networked electrical power meters,
industrial monitoring, radiation monitoring,
construction site monitoring, alarm systems,
remote house monitoring, and so on.
GetStarted with
Contiki
Firstly
 Cooja makes Contiki easy to install and get started
with it.
 Download Instant Contiki
 http://sourceforge.net/projects/contiki/files/Instant
%20Contiki/
 InstallVMWare Player
 https://my.vmware.com/web/vmware/free#deskto
p_end_user_computing/vmware_player/6_0
 Register and reboot
 Start Instant Contiki
 Start Instant Contiki by running
InstantContiki2.6.vmx.Wait for the virtual Ubuntu
Linux boot up.
 Log into Instant Contiki.The password is user.
BootUbuntu
Log in
Step 2:StartCooja
 Cooja is a highly useful tool for Contiki
development as it allows developers to test their
code and systems long before running it on the
target hardware.
 Developers regularly set up new simulations both
to debug their software and to verify the behavior
of their systems.
Open a
terminal
window
 We will now compile and start Cooja, the Contiki
network simulator.
 Starting the terminal
StartCooja
 Start Cooja by
 In the terminal window, go to the Cooja directory:
 Start Cooja with the command:

Running
Cooja
CoojaUI
Step 3: RunContiki
in simulation
Creating
Simulation
 Click the File menu and click New simulation

Create New Simulation:
Simulation
Window
Network
window (motes)
Timeline
Window->all
communications
Simulation
windows
Network window -Top left
-shows all motes in the simulated
area
Timeline window - At the bottom of screen
- Shows all communication
events in the simulation over
time
- very handy for understanding
what goes on in the network
Notes window - On the top right is where we can
put notes for our simulation.
Mote output window - on the right side of the screen
- shows all serial port printouts
from all the motes.
Simulation control -window is where we start, pause,
and reload our simulation
Add mote to
the interface
 Before we can simulate our network, we must add
one or more motes.
 We do this via the Motes menu, where we click on
 Add motes....
 Since this is the first mote we add, we must first
create a mote type to add.
 Click Create new mote type... and select one of
the available mote types.
 For this example, we click Sky mote... to create an
emulatedTmote Sky mote type.
 Choose the hardware then install the firmware with
any functionality that you desire
Add mote to
the interface
Simulation
window
Step 4
RunContiki on
hardware
Platform
porting
 we assume you have a Zolertia Z1 mote connected to a
USB port of your PC
 Enable the Z1 in Instant Contiki, so that Instant Contiki
is able to talk to it
 cd contiki/examples/FOLDER/
 Then upload the compiled firmware to the hardware
 Then make login
 To access the burnt firmware on the device
Hi.c file
MakeFile
./hi.native
 If there are not errors then some files will be
produced like .native
 filename.native
UploadContikitothe
hardware
Connection prob.
Platform in contiki
platforms
TmoteSky
platform
 TheTmote Sky platform is a wireless sensor board
from Moteiv.
 It is an MSP430-based board with an 802.15.4-
compatible CC2420 radio chip,
 a 1 megabyte external serial flash memory, and two
light sensors.
 Contiki was ported to theTmote Sky by Björn
Grönvall as part of the RUNES project.
 TheTmote Sky port was integrated into the Contiki
build system in March 2007.
TmoteSky
platform
 The platform-specific source code for theTmote
Sky port can be found in the directories
platform/sky and cpu/msp430 in the Contiki
source tree.
 Code for writing to the on-chip flash ROM is in the
cpu/msp430/flash.c
 Code for reading and writing to the external flash is
the file platform/sky/dev/xmem.c
 Code for reading the light sensors is in
platform/sky/dev/light.c.
BlinkApplication
-Code
-explanation
-Cooja runnin’
-video
Blink
example
Code detail
PROCESS ( name,
strname )
Declare a process.
PROCESS(blink_process, "Blink");
AUTOSTART_PROCESSES(&blink_process); Starting a process automatically
&blink_process
ROCESS_THREAD(name,
ev,data )
-Define the body of a process
-The process is called whenever an event
occurs in the system
-Start with the PROCESS_BEGIN() macro -
Ends with the PROCESS_END() macro.
PROCESS_EXITHANDLER(handler ) -Specify an action when a process exits.
-Comes before declaring PROCESS_BEGIN()
PROCESS_BEGIN( ) ,PROCESS_END()
-specify the beginning and the End of a
process
Code detail
etimer et; -This structure is used for declaring a timer.
The timer must be set with etimer_set()
before it can be used.
PROCESS_WAIT_EVENT_UNTIL(c) Wait for an event to be posted to the process,
with an extra condition.
-This macro is similar to
PROCESS_WAIT_EVENT()
in that it blocks the currently running process
until the process receives an event.
PROCESS_WAIT_EVENT_UNTIL(etimer_expir
ed(&et));
-Check if an event timer has expired.
-Parameters:
et :a pointer to the event timer.
-return true if the time expires
leds_on(LEDS_ALL); On the LEDS
leds_off(LEDS_ALL); Off the LEDs
LEDAPI
 Simple and important to communicate with the
user
 The platform startup code initializes the LEDs
library by calling leds_init() initializes the API
 ledv: is LED vector platform independent
 #define LEDS_GREEN 1
 #define LEDS_YELLOW 2
 #define LEDS_RED 4
 #define LEDS_ALL 7
 leds_on() takes a LEDs vector argument, ledv,
and switches on the LEDs set in the vector.
 Led_off() takes the LED in ledv and switch it off.
 leds_invert() inverts the current status of the
LEDs set in the argument ledv.
Youtube
Demo
 http://www.youtube.com/watch?v=9WohGp8udO
Q
APIs
ESB
platform
sensors
 button_battery_sensor - query the battery voltage
level
 sensor - query the on-board button
 pir_sensor - query the passive IR sensor (motion
detector)
 radio_sensor - query the radio signal strength
 sound_sensor - query the microphone
 temperature_sensor - query the temperature
sensor
 vib_sensor - query the vibration senso
Sensor
functions
 Each sensor has a set of functions for controlling it
and query it for its state. Some sensors also
generate an events when the sensors change. A
sensor must be activated before it generates events
or relevant values.
 SENSORS_ACTIVATE(Button_sensor ) ) - activate
the button sensor
 SENSORS_DEACTIVATE(sensor)
 sensor.value(0) - query the sensor for its last value
(button either pressed or not)
 sensors_event - event sent when a sensor has
changed (the data argument will referer to the
actual sensor)
process
PROCESS_BEGIN() -Define the beginning of a process
PROCESS_END() -Define the end of a process.
PROCESS_WAIT_EVENT()
-Wait for an event to be posted to the
process.
-blocks the currently running process until
the process receives an event.
PROCESS_WAIT_EVENT_UNTIL(c) Wait for an event to be posted to the
process, with an extra condition.
PROCESS_YIELD() Yield the currently running process.
PROCESS_YIELD_UNTIL(c) Yield the currently running process until a
condition occurs.
PROCESS_WAIT_UNTIL(c) Wait for a condition to occur.
PROCESS_EXIT() Exit the currently running process.
PROCESS_PAUSE() Yield the process for a short while.
LED
functions
 Basic LED functions
 leds_on() - turn LEDs on
 leds_off() - turn LEDs off
 leds_invert() - invert LEDs
 leds_blink() - blink all LEDs
Beeper
functions
 Implements a beep function to emit a beep sound
 Also play polyphonic tune using buzzer
 beep()- click the beeper
 beep_beep()- beep
 beep_down()- pitchbend down beep
 beep_quick() - a number of quick beeps
 beep_spinup()- pitchbend up beep
Timer
functions
EventTimer Callback timer Simple timer
-generates an
event when the
timer expires a
-call a function
when the timer
expires
-have to be actively
queried to check
when they have
expired
•etimer_expired()
•etimer_reset
•etimer_set()
•etimer_restart()
•ctimer_expired()
•ctimer_reset
•ctimer_set()
•ctimer_restart()
•timer_expired()
•timer_reset
•timer_set()
•timer_restart()
The Contiki kernel does not provide support for timed
events. Rather, an application that wants to use timers
needs to explicitly use the timer library.
Sky websense
Light and temperatur sensor web demo
Border
router set-up
 Having able to connect to sensors is very significant
step in IOT
 This example features a simple webserver running
on top of the IPv6 Contiki stack on Sky motes to
provide sensor values, and with a RPL border router
to bridge the sensor network to Internet.
 Server is located in :
[Contiki home]examplesipv6rpl-border-router
 Simulation in Cooja is in
 examplesipv6sky-websense
Steps
1. Start COOJA and load the simulation "example-
sky-websense.csc"
makeTARGET=cooja example-sky-websense.csc
2. Connect to the COOJA simulation using tunslip6:
make connect-router-cooja
3.You should now be able to browse to the nodes
using your web browser:
 Router: http://[aaaa::0212:7401:0001:0101]/
 Node 2: http://[aaaa::0212:7402:0002:0202]/
tunslip6
 Before being able to view the sensor readings from
the webserver,
 A serial connection to the server through the
command
output
 The Cooja simulator provides you with important
details about every sensor node in the network
Websense
code details
 Including the required libraries
 Define processes
 Opens the tcp server socket which defined in httpd.c
Websense
code details
 The second process is
 It does the sensing through the web in a way
A protothread that handles reading or getting the
parameters of temperature and light from sensors
ReviewQuestion
Question
• what is uIPTCP/I P ?
 provides Internet communication abilities to
Contiki
What are the applications of it?
Network enabling an embedded
microcontroller makes it possible to
control electronic consumer devices or
appliances such
 as smart meters,
 heating, air conditioning, lighting systems, grid
connected electric car chargers and even door
locks, radiation systems, ..anything 
Questions
 What is used for?
Contiki is designed for microcontrollers with small
amounts of memory.
 Operating system for memory-efficient networked
embedded systems and wireless sensor networks
 What is the typical size of Contiki?
A typical Contiki configuration is 2 kilobytes of
RAM and 40 kilobytes of ROM.
Question
 What is COOJA?
 Cooja is a simulator provided by Contiki, which
unlike most simulators also allows real hardware
platforms to be emulated
References
 http://www.contiki-os.org/start.html
 http://virtual-
sense.googlecode.com/git/VirtualSense/examples/rest-
example/README
 http://www.wolfe.id.au/2014/03/02/configuring-a-simple-
ipv6-network/
 http://contiki-os.blogspot.kr/
 http://people.inf.ethz.ch/mkovatsc/wiki/general:contiki:webs
erver

More Related Content

What's hot

Wsn unit-1-ppt
Wsn unit-1-pptWsn unit-1-ppt
Wsn unit-1-ppt
Swathi Ch
 
Energy consumption of wsn
Energy consumption of wsnEnergy consumption of wsn
Energy consumption of wsn
DeepaDasarathan
 
Contiki IoT simulation
Contiki IoT simulationContiki IoT simulation
Contiki IoT simulation
nabati
 
Application Layer Protocols for the IoT
Application Layer Protocols for the IoTApplication Layer Protocols for the IoT
Application Layer Protocols for the IoT
Damien Magoni
 
WSN IN IOT
WSN IN IOTWSN IN IOT
WSN IN IOT
skumartarget
 
Embedded system and its platforms
Embedded system and its platformsEmbedded system and its platforms
Embedded system and its platforms
Mrunal Deshkar
 
Embedded system and development
Embedded system and developmentEmbedded system and development
Embedded system and development
Rajani Bhandari
 
Wireless Sensor Networks ppt
Wireless Sensor Networks pptWireless Sensor Networks ppt
Wireless Sensor Networks ppt
Devdutta Chakrabarti
 
Embedded system Design
Embedded system DesignEmbedded system Design
Embedded system Design
AJAL A J
 
VLSI Physical Design Automation.ppt
VLSI Physical Design Automation.pptVLSI Physical Design Automation.ppt
VLSI Physical Design Automation.ppt
RichikDey5
 
Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)
Bangladesh Network Operators Group
 
IOT in SMART Cities
IOT in SMART CitiesIOT in SMART Cities
IOT in SMART Cities
Dr. Shivananda Koteshwar
 
System On Chip (SOC)
System On Chip (SOC)System On Chip (SOC)
System On Chip (SOC)Shivam Gupta
 
Contention based MAC protocols
Contention based  MAC protocolsContention based  MAC protocols
Contention based MAC protocols
Darwin Nesakumar
 
Wireless Sensor Networks
Wireless Sensor NetworksWireless Sensor Networks
Wireless Sensor Networks
juno susi
 
Raspberry Pi
Raspberry Pi Raspberry Pi
Raspberry Pi
Selvaraj Seerangan
 
Case Study of Embedded Systems
Case Study of Embedded SystemsCase Study of Embedded Systems
Case Study of Embedded Systems
anand hd
 
ADC Interfacing with pic Microcontrollert
ADC Interfacing with pic MicrocontrollertADC Interfacing with pic Microcontrollert
ADC Interfacing with pic Microcontrollert
leapshare007
 
Wireless Sensor Networks
Wireless Sensor NetworksWireless Sensor Networks
Wireless Sensor Networks
Karthik
 
System on Chip (SoC)
System on Chip (SoC)System on Chip (SoC)
System on Chip (SoC)
Dimas Ruliandi
 

What's hot (20)

Wsn unit-1-ppt
Wsn unit-1-pptWsn unit-1-ppt
Wsn unit-1-ppt
 
Energy consumption of wsn
Energy consumption of wsnEnergy consumption of wsn
Energy consumption of wsn
 
Contiki IoT simulation
Contiki IoT simulationContiki IoT simulation
Contiki IoT simulation
 
Application Layer Protocols for the IoT
Application Layer Protocols for the IoTApplication Layer Protocols for the IoT
Application Layer Protocols for the IoT
 
WSN IN IOT
WSN IN IOTWSN IN IOT
WSN IN IOT
 
Embedded system and its platforms
Embedded system and its platformsEmbedded system and its platforms
Embedded system and its platforms
 
Embedded system and development
Embedded system and developmentEmbedded system and development
Embedded system and development
 
Wireless Sensor Networks ppt
Wireless Sensor Networks pptWireless Sensor Networks ppt
Wireless Sensor Networks ppt
 
Embedded system Design
Embedded system DesignEmbedded system Design
Embedded system Design
 
VLSI Physical Design Automation.ppt
VLSI Physical Design Automation.pptVLSI Physical Design Automation.ppt
VLSI Physical Design Automation.ppt
 
Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)Introduction to Software Defined Networking (SDN)
Introduction to Software Defined Networking (SDN)
 
IOT in SMART Cities
IOT in SMART CitiesIOT in SMART Cities
IOT in SMART Cities
 
System On Chip (SOC)
System On Chip (SOC)System On Chip (SOC)
System On Chip (SOC)
 
Contention based MAC protocols
Contention based  MAC protocolsContention based  MAC protocols
Contention based MAC protocols
 
Wireless Sensor Networks
Wireless Sensor NetworksWireless Sensor Networks
Wireless Sensor Networks
 
Raspberry Pi
Raspberry Pi Raspberry Pi
Raspberry Pi
 
Case Study of Embedded Systems
Case Study of Embedded SystemsCase Study of Embedded Systems
Case Study of Embedded Systems
 
ADC Interfacing with pic Microcontrollert
ADC Interfacing with pic MicrocontrollertADC Interfacing with pic Microcontrollert
ADC Interfacing with pic Microcontrollert
 
Wireless Sensor Networks
Wireless Sensor NetworksWireless Sensor Networks
Wireless Sensor Networks
 
System on Chip (SoC)
System on Chip (SoC)System on Chip (SoC)
System on Chip (SoC)
 

Similar to Contiki Operating system tutorial

15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
felicidaddinwoodie
 
MicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introductionMicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introduction
sdoro58
 
Basics of Embedded System
Basics of Embedded System Basics of Embedded System
Basics of Embedded System
Rajesh Roshan
 
GNAT GPL For Mindstorms
GNAT GPL For MindstormsGNAT GPL For Mindstorms
GNAT GPL For Mindstorms
AdaCore
 
Is Rust Programming ready for embedded development?
Is Rust Programming ready for embedded development?Is Rust Programming ready for embedded development?
Is Rust Programming ready for embedded development?
Knoldus Inc.
 
Advanced view of atmega microcontroller projects list at mega32 avr
Advanced view of atmega microcontroller projects list   at mega32 avrAdvanced view of atmega microcontroller projects list   at mega32 avr
Advanced view of atmega microcontroller projects list at mega32 avr
WiseNaeem
 
Webinar st: explorando sensor tile.box
Webinar st: explorando sensor tile.boxWebinar st: explorando sensor tile.box
Webinar st: explorando sensor tile.box
Embarcados
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
Aditya Porwal
 
Pic microcontroller step by step your complete guide
Pic microcontroller step by step your complete guidePic microcontroller step by step your complete guide
Pic microcontroller step by step your complete guide
Ashraf Said AlMadhoun - Educational Engineering Team
 
TP_Webots_7mai2021.pdf
TP_Webots_7mai2021.pdfTP_Webots_7mai2021.pdf
TP_Webots_7mai2021.pdf
kiiway01
 
Simulation of Signals with Field Signal Simulator
Simulation of Signals with Field Signal SimulatorSimulation of Signals with Field Signal Simulator
Simulation of Signals with Field Signal Simulator
IOSR Journals
 
SensorStudio deep dive (IDC 2016)
SensorStudio deep dive (IDC 2016)SensorStudio deep dive (IDC 2016)
SensorStudio deep dive (IDC 2016)
Herve Blanc
 
Letselectronic.blogspot.com robotic arm based on atmega mcu controlled by win...
Letselectronic.blogspot.com robotic arm based on atmega mcu controlled by win...Letselectronic.blogspot.com robotic arm based on atmega mcu controlled by win...
Letselectronic.blogspot.com robotic arm based on atmega mcu controlled by win...
Aymen Lachkhem
 
Introduction to robotics part 1 (Lego NXT
Introduction to robotics part 1 (Lego NXTIntroduction to robotics part 1 (Lego NXT
Introduction to robotics part 1 (Lego NXTWayne Hamilton
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - Introduction
Francis Seriña
 
Information Gathering 2
Information Gathering 2Information Gathering 2
Information Gathering 2Aero Plane
 
Advanced view of atmega microcontroller projects list at mega32 avr
Advanced view of atmega microcontroller projects list   at mega32 avrAdvanced view of atmega microcontroller projects list   at mega32 avr
Advanced view of atmega microcontroller projects list at mega32 avr
WiseNaeem
 
Industrial automation sustem
Industrial automation sustemIndustrial automation sustem
Industrial automation sustem
Paras kumar
 
Opencv
OpencvOpencv
Opencv
Ethishkumar
 

Similar to Contiki Operating system tutorial (20)

15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
 
MicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introductionMicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introduction
 
Basics of Embedded System
Basics of Embedded System Basics of Embedded System
Basics of Embedded System
 
GNAT GPL For Mindstorms
GNAT GPL For MindstormsGNAT GPL For Mindstorms
GNAT GPL For Mindstorms
 
Is Rust Programming ready for embedded development?
Is Rust Programming ready for embedded development?Is Rust Programming ready for embedded development?
Is Rust Programming ready for embedded development?
 
Advanced view of atmega microcontroller projects list at mega32 avr
Advanced view of atmega microcontroller projects list   at mega32 avrAdvanced view of atmega microcontroller projects list   at mega32 avr
Advanced view of atmega microcontroller projects list at mega32 avr
 
Webinar st: explorando sensor tile.box
Webinar st: explorando sensor tile.boxWebinar st: explorando sensor tile.box
Webinar st: explorando sensor tile.box
 
Microprocessors and microcontrollers
Microprocessors and microcontrollersMicroprocessors and microcontrollers
Microprocessors and microcontrollers
 
Pic microcontroller step by step your complete guide
Pic microcontroller step by step your complete guidePic microcontroller step by step your complete guide
Pic microcontroller step by step your complete guide
 
TP_Webots_7mai2021.pdf
TP_Webots_7mai2021.pdfTP_Webots_7mai2021.pdf
TP_Webots_7mai2021.pdf
 
Simulation of Signals with Field Signal Simulator
Simulation of Signals with Field Signal SimulatorSimulation of Signals with Field Signal Simulator
Simulation of Signals with Field Signal Simulator
 
MouthMouse
MouthMouseMouthMouse
MouthMouse
 
SensorStudio deep dive (IDC 2016)
SensorStudio deep dive (IDC 2016)SensorStudio deep dive (IDC 2016)
SensorStudio deep dive (IDC 2016)
 
Letselectronic.blogspot.com robotic arm based on atmega mcu controlled by win...
Letselectronic.blogspot.com robotic arm based on atmega mcu controlled by win...Letselectronic.blogspot.com robotic arm based on atmega mcu controlled by win...
Letselectronic.blogspot.com robotic arm based on atmega mcu controlled by win...
 
Introduction to robotics part 1 (Lego NXT
Introduction to robotics part 1 (Lego NXTIntroduction to robotics part 1 (Lego NXT
Introduction to robotics part 1 (Lego NXT
 
Game Programming I - Introduction
Game Programming I - IntroductionGame Programming I - Introduction
Game Programming I - Introduction
 
Information Gathering 2
Information Gathering 2Information Gathering 2
Information Gathering 2
 
Advanced view of atmega microcontroller projects list at mega32 avr
Advanced view of atmega microcontroller projects list   at mega32 avrAdvanced view of atmega microcontroller projects list   at mega32 avr
Advanced view of atmega microcontroller projects list at mega32 avr
 
Industrial automation sustem
Industrial automation sustemIndustrial automation sustem
Industrial automation sustem
 
Opencv
OpencvOpencv
Opencv
 

More from Salah Amean

ICT role in Yemen
ICT role in Yemen ICT role in Yemen
ICT role in Yemen
Salah Amean
 
Contiki os timer tutorial
Contiki os timer tutorialContiki os timer tutorial
Contiki os timer tutorial
Salah Amean
 
WSN protocol 802.15.4 together with cc2420 seminars
WSN protocol 802.15.4 together with cc2420 seminars WSN protocol 802.15.4 together with cc2420 seminars
WSN protocol 802.15.4 together with cc2420 seminars
Salah Amean
 
protothread and its usage in contiki OS
protothread and its usage in contiki OSprotothread and its usage in contiki OS
protothread and its usage in contiki OS
Salah Amean
 
ContikiMAC : Radio Duty Cycling Protocol
ContikiMAC : Radio Duty Cycling ProtocolContikiMAC : Radio Duty Cycling Protocol
ContikiMAC : Radio Duty Cycling Protocol
Salah Amean
 
Location in ubiquitous computing, LOCATION SYSTEMS
Location in ubiquitous computing, LOCATION SYSTEMSLocation in ubiquitous computing, LOCATION SYSTEMS
Location in ubiquitous computing, LOCATION SYSTEMS
Salah Amean
 
Bonjour protocol
Bonjour protocolBonjour protocol
Bonjour protocol
Salah Amean
 
Optimization Analysis
Optimization AnalysisOptimization Analysis
Optimization Analysis
Salah Amean
 
Mobile apps-user interaction measurement & Apps ecosystem
Mobile apps-user interaction measurement & Apps ecosystemMobile apps-user interaction measurement & Apps ecosystem
Mobile apps-user interaction measurement & Apps ecosystem
Salah Amean
 
ict culturing conference presentation _presented 2013_12_07
 ict culturing conference presentation _presented 2013_12_07 ict culturing conference presentation _presented 2013_12_07
ict culturing conference presentation _presented 2013_12_07
Salah Amean
 
Data Mining: Concepts and Techniques_ Chapter 6: Mining Frequent Patterns, ...
Data Mining:  Concepts and Techniques_ Chapter 6: Mining Frequent Patterns, ...Data Mining:  Concepts and Techniques_ Chapter 6: Mining Frequent Patterns, ...
Data Mining: Concepts and Techniques_ Chapter 6: Mining Frequent Patterns, ...
Salah Amean
 
Data mining :Concepts and Techniques Chapter 2, data
Data mining :Concepts and Techniques Chapter 2, dataData mining :Concepts and Techniques Chapter 2, data
Data mining :Concepts and Techniques Chapter 2, data
Salah Amean
 
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsData Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Salah Amean
 
Data mining: Concepts and Techniques, Chapter12 outlier Analysis
Data mining: Concepts and Techniques, Chapter12 outlier Analysis Data mining: Concepts and Techniques, Chapter12 outlier Analysis
Data mining: Concepts and Techniques, Chapter12 outlier Analysis
Salah Amean
 
Data Mining: Concepts and techniques classification _chapter 9 :advanced methods
Data Mining: Concepts and techniques classification _chapter 9 :advanced methodsData Mining: Concepts and techniques classification _chapter 9 :advanced methods
Data Mining: Concepts and techniques classification _chapter 9 :advanced methods
Salah Amean
 
Data Mining: Concepts and techniques: Chapter 13 trend
Data Mining: Concepts and techniques: Chapter 13 trendData Mining: Concepts and techniques: Chapter 13 trend
Data Mining: Concepts and techniques: Chapter 13 trend
Salah Amean
 
Data Mining: Concepts and techniques: Chapter 11,Review: Basic Cluster Analys...
Data Mining: Concepts and techniques: Chapter 11,Review: Basic Cluster Analys...Data Mining: Concepts and techniques: Chapter 11,Review: Basic Cluster Analys...
Data Mining: Concepts and techniques: Chapter 11,Review: Basic Cluster Analys...
Salah Amean
 
Data Mining Concepts and Techniques, Chapter 10. Cluster Analysis: Basic Conc...
Data Mining Concepts and Techniques, Chapter 10. Cluster Analysis: Basic Conc...Data Mining Concepts and Techniques, Chapter 10. Cluster Analysis: Basic Conc...
Data Mining Concepts and Techniques, Chapter 10. Cluster Analysis: Basic Conc...
Salah Amean
 
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
Salah Amean
 
Data Mining: Concepts and Techniques (3rd ed.) — Chapter 5
Data Mining:  Concepts and Techniques (3rd ed.)— Chapter 5 Data Mining:  Concepts and Techniques (3rd ed.)— Chapter 5
Data Mining: Concepts and Techniques (3rd ed.) — Chapter 5
Salah Amean
 

More from Salah Amean (20)

ICT role in Yemen
ICT role in Yemen ICT role in Yemen
ICT role in Yemen
 
Contiki os timer tutorial
Contiki os timer tutorialContiki os timer tutorial
Contiki os timer tutorial
 
WSN protocol 802.15.4 together with cc2420 seminars
WSN protocol 802.15.4 together with cc2420 seminars WSN protocol 802.15.4 together with cc2420 seminars
WSN protocol 802.15.4 together with cc2420 seminars
 
protothread and its usage in contiki OS
protothread and its usage in contiki OSprotothread and its usage in contiki OS
protothread and its usage in contiki OS
 
ContikiMAC : Radio Duty Cycling Protocol
ContikiMAC : Radio Duty Cycling ProtocolContikiMAC : Radio Duty Cycling Protocol
ContikiMAC : Radio Duty Cycling Protocol
 
Location in ubiquitous computing, LOCATION SYSTEMS
Location in ubiquitous computing, LOCATION SYSTEMSLocation in ubiquitous computing, LOCATION SYSTEMS
Location in ubiquitous computing, LOCATION SYSTEMS
 
Bonjour protocol
Bonjour protocolBonjour protocol
Bonjour protocol
 
Optimization Analysis
Optimization AnalysisOptimization Analysis
Optimization Analysis
 
Mobile apps-user interaction measurement & Apps ecosystem
Mobile apps-user interaction measurement & Apps ecosystemMobile apps-user interaction measurement & Apps ecosystem
Mobile apps-user interaction measurement & Apps ecosystem
 
ict culturing conference presentation _presented 2013_12_07
 ict culturing conference presentation _presented 2013_12_07 ict culturing conference presentation _presented 2013_12_07
ict culturing conference presentation _presented 2013_12_07
 
Data Mining: Concepts and Techniques_ Chapter 6: Mining Frequent Patterns, ...
Data Mining:  Concepts and Techniques_ Chapter 6: Mining Frequent Patterns, ...Data Mining:  Concepts and Techniques_ Chapter 6: Mining Frequent Patterns, ...
Data Mining: Concepts and Techniques_ Chapter 6: Mining Frequent Patterns, ...
 
Data mining :Concepts and Techniques Chapter 2, data
Data mining :Concepts and Techniques Chapter 2, dataData mining :Concepts and Techniques Chapter 2, data
Data mining :Concepts and Techniques Chapter 2, data
 
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsData Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
 
Data mining: Concepts and Techniques, Chapter12 outlier Analysis
Data mining: Concepts and Techniques, Chapter12 outlier Analysis Data mining: Concepts and Techniques, Chapter12 outlier Analysis
Data mining: Concepts and Techniques, Chapter12 outlier Analysis
 
Data Mining: Concepts and techniques classification _chapter 9 :advanced methods
Data Mining: Concepts and techniques classification _chapter 9 :advanced methodsData Mining: Concepts and techniques classification _chapter 9 :advanced methods
Data Mining: Concepts and techniques classification _chapter 9 :advanced methods
 
Data Mining: Concepts and techniques: Chapter 13 trend
Data Mining: Concepts and techniques: Chapter 13 trendData Mining: Concepts and techniques: Chapter 13 trend
Data Mining: Concepts and techniques: Chapter 13 trend
 
Data Mining: Concepts and techniques: Chapter 11,Review: Basic Cluster Analys...
Data Mining: Concepts and techniques: Chapter 11,Review: Basic Cluster Analys...Data Mining: Concepts and techniques: Chapter 11,Review: Basic Cluster Analys...
Data Mining: Concepts and techniques: Chapter 11,Review: Basic Cluster Analys...
 
Data Mining Concepts and Techniques, Chapter 10. Cluster Analysis: Basic Conc...
Data Mining Concepts and Techniques, Chapter 10. Cluster Analysis: Basic Conc...Data Mining Concepts and Techniques, Chapter 10. Cluster Analysis: Basic Conc...
Data Mining Concepts and Techniques, Chapter 10. Cluster Analysis: Basic Conc...
 
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
 
Data Mining: Concepts and Techniques (3rd ed.) — Chapter 5
Data Mining:  Concepts and Techniques (3rd ed.)— Chapter 5 Data Mining:  Concepts and Techniques (3rd ed.)— Chapter 5
Data Mining: Concepts and Techniques (3rd ed.) — Chapter 5
 

Recently uploaded

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 

Recently uploaded (20)

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 

Contiki Operating system tutorial

  • 2.
  • 3. WhyChoose Contiki?  Contiki is an open source operating system for the Internet ofThings.  Contiki connects tiny low-cost, low-power microcontrollers to the Internet
  • 4. TheContiki Operating System  Contiki is an open source operating system that runs on tiny low-power microcontrollers and makes it possible to develop applications that make efficient use of the hardware while providing standardized low-power wireless communication for a range of hardware platforms.  Contiki is used in numerous commercial and non- commercial systems, such as city sound monitoring, street lights, networked electrical power meters, industrial monitoring, radiation monitoring, construction site monitoring, alarm systems, remote house monitoring, and so on.
  • 6. Firstly  Cooja makes Contiki easy to install and get started with it.  Download Instant Contiki  http://sourceforge.net/projects/contiki/files/Instant %20Contiki/  InstallVMWare Player  https://my.vmware.com/web/vmware/free#deskto p_end_user_computing/vmware_player/6_0  Register and reboot  Start Instant Contiki  Start Instant Contiki by running InstantContiki2.6.vmx.Wait for the virtual Ubuntu Linux boot up.  Log into Instant Contiki.The password is user.
  • 10.  Cooja is a highly useful tool for Contiki development as it allows developers to test their code and systems long before running it on the target hardware.  Developers regularly set up new simulations both to debug their software and to verify the behavior of their systems.
  • 11. Open a terminal window  We will now compile and start Cooja, the Contiki network simulator.  Starting the terminal
  • 12. StartCooja  Start Cooja by  In the terminal window, go to the Cooja directory:  Start Cooja with the command: 
  • 15. Step 3: RunContiki in simulation
  • 16. Creating Simulation  Click the File menu and click New simulation  Create New Simulation:
  • 18. Simulation windows Network window -Top left -shows all motes in the simulated area Timeline window - At the bottom of screen - Shows all communication events in the simulation over time - very handy for understanding what goes on in the network Notes window - On the top right is where we can put notes for our simulation. Mote output window - on the right side of the screen - shows all serial port printouts from all the motes. Simulation control -window is where we start, pause, and reload our simulation
  • 19. Add mote to the interface  Before we can simulate our network, we must add one or more motes.  We do this via the Motes menu, where we click on  Add motes....  Since this is the first mote we add, we must first create a mote type to add.  Click Create new mote type... and select one of the available mote types.  For this example, we click Sky mote... to create an emulatedTmote Sky mote type.  Choose the hardware then install the firmware with any functionality that you desire
  • 20. Add mote to the interface
  • 23. Platform porting  we assume you have a Zolertia Z1 mote connected to a USB port of your PC  Enable the Z1 in Instant Contiki, so that Instant Contiki is able to talk to it  cd contiki/examples/FOLDER/  Then upload the compiled firmware to the hardware  Then make login  To access the burnt firmware on the device
  • 26. ./hi.native  If there are not errors then some files will be produced like .native  filename.native
  • 30. TmoteSky platform  TheTmote Sky platform is a wireless sensor board from Moteiv.  It is an MSP430-based board with an 802.15.4- compatible CC2420 radio chip,  a 1 megabyte external serial flash memory, and two light sensors.  Contiki was ported to theTmote Sky by Björn Grönvall as part of the RUNES project.  TheTmote Sky port was integrated into the Contiki build system in March 2007.
  • 31. TmoteSky platform  The platform-specific source code for theTmote Sky port can be found in the directories platform/sky and cpu/msp430 in the Contiki source tree.  Code for writing to the on-chip flash ROM is in the cpu/msp430/flash.c  Code for reading and writing to the external flash is the file platform/sky/dev/xmem.c  Code for reading the light sensors is in platform/sky/dev/light.c.
  • 34. Code detail PROCESS ( name, strname ) Declare a process. PROCESS(blink_process, "Blink"); AUTOSTART_PROCESSES(&blink_process); Starting a process automatically &blink_process ROCESS_THREAD(name, ev,data ) -Define the body of a process -The process is called whenever an event occurs in the system -Start with the PROCESS_BEGIN() macro - Ends with the PROCESS_END() macro. PROCESS_EXITHANDLER(handler ) -Specify an action when a process exits. -Comes before declaring PROCESS_BEGIN() PROCESS_BEGIN( ) ,PROCESS_END() -specify the beginning and the End of a process
  • 35. Code detail etimer et; -This structure is used for declaring a timer. The timer must be set with etimer_set() before it can be used. PROCESS_WAIT_EVENT_UNTIL(c) Wait for an event to be posted to the process, with an extra condition. -This macro is similar to PROCESS_WAIT_EVENT() in that it blocks the currently running process until the process receives an event. PROCESS_WAIT_EVENT_UNTIL(etimer_expir ed(&et)); -Check if an event timer has expired. -Parameters: et :a pointer to the event timer. -return true if the time expires leds_on(LEDS_ALL); On the LEDS leds_off(LEDS_ALL); Off the LEDs
  • 36. LEDAPI  Simple and important to communicate with the user  The platform startup code initializes the LEDs library by calling leds_init() initializes the API  ledv: is LED vector platform independent  #define LEDS_GREEN 1  #define LEDS_YELLOW 2  #define LEDS_RED 4  #define LEDS_ALL 7  leds_on() takes a LEDs vector argument, ledv, and switches on the LEDs set in the vector.  Led_off() takes the LED in ledv and switch it off.  leds_invert() inverts the current status of the LEDs set in the argument ledv.
  • 37.
  • 39. APIs
  • 40. ESB platform sensors  button_battery_sensor - query the battery voltage level  sensor - query the on-board button  pir_sensor - query the passive IR sensor (motion detector)  radio_sensor - query the radio signal strength  sound_sensor - query the microphone  temperature_sensor - query the temperature sensor  vib_sensor - query the vibration senso
  • 41. Sensor functions  Each sensor has a set of functions for controlling it and query it for its state. Some sensors also generate an events when the sensors change. A sensor must be activated before it generates events or relevant values.  SENSORS_ACTIVATE(Button_sensor ) ) - activate the button sensor  SENSORS_DEACTIVATE(sensor)  sensor.value(0) - query the sensor for its last value (button either pressed or not)  sensors_event - event sent when a sensor has changed (the data argument will referer to the actual sensor)
  • 42. process PROCESS_BEGIN() -Define the beginning of a process PROCESS_END() -Define the end of a process. PROCESS_WAIT_EVENT() -Wait for an event to be posted to the process. -blocks the currently running process until the process receives an event. PROCESS_WAIT_EVENT_UNTIL(c) Wait for an event to be posted to the process, with an extra condition. PROCESS_YIELD() Yield the currently running process. PROCESS_YIELD_UNTIL(c) Yield the currently running process until a condition occurs. PROCESS_WAIT_UNTIL(c) Wait for a condition to occur. PROCESS_EXIT() Exit the currently running process. PROCESS_PAUSE() Yield the process for a short while.
  • 43. LED functions  Basic LED functions  leds_on() - turn LEDs on  leds_off() - turn LEDs off  leds_invert() - invert LEDs  leds_blink() - blink all LEDs
  • 44. Beeper functions  Implements a beep function to emit a beep sound  Also play polyphonic tune using buzzer  beep()- click the beeper  beep_beep()- beep  beep_down()- pitchbend down beep  beep_quick() - a number of quick beeps  beep_spinup()- pitchbend up beep
  • 45. Timer functions EventTimer Callback timer Simple timer -generates an event when the timer expires a -call a function when the timer expires -have to be actively queried to check when they have expired •etimer_expired() •etimer_reset •etimer_set() •etimer_restart() •ctimer_expired() •ctimer_reset •ctimer_set() •ctimer_restart() •timer_expired() •timer_reset •timer_set() •timer_restart() The Contiki kernel does not provide support for timed events. Rather, an application that wants to use timers needs to explicitly use the timer library.
  • 46. Sky websense Light and temperatur sensor web demo
  • 47. Border router set-up  Having able to connect to sensors is very significant step in IOT  This example features a simple webserver running on top of the IPv6 Contiki stack on Sky motes to provide sensor values, and with a RPL border router to bridge the sensor network to Internet.  Server is located in : [Contiki home]examplesipv6rpl-border-router  Simulation in Cooja is in  examplesipv6sky-websense
  • 48. Steps 1. Start COOJA and load the simulation "example- sky-websense.csc" makeTARGET=cooja example-sky-websense.csc 2. Connect to the COOJA simulation using tunslip6: make connect-router-cooja 3.You should now be able to browse to the nodes using your web browser:  Router: http://[aaaa::0212:7401:0001:0101]/  Node 2: http://[aaaa::0212:7402:0002:0202]/
  • 49. tunslip6  Before being able to view the sensor readings from the webserver,  A serial connection to the server through the command
  • 50. output  The Cooja simulator provides you with important details about every sensor node in the network
  • 51. Websense code details  Including the required libraries  Define processes  Opens the tcp server socket which defined in httpd.c
  • 52. Websense code details  The second process is  It does the sensing through the web in a way A protothread that handles reading or getting the parameters of temperature and light from sensors
  • 54. Question • what is uIPTCP/I P ?  provides Internet communication abilities to Contiki What are the applications of it? Network enabling an embedded microcontroller makes it possible to control electronic consumer devices or appliances such  as smart meters,  heating, air conditioning, lighting systems, grid connected electric car chargers and even door locks, radiation systems, ..anything 
  • 55. Questions  What is used for? Contiki is designed for microcontrollers with small amounts of memory.  Operating system for memory-efficient networked embedded systems and wireless sensor networks  What is the typical size of Contiki? A typical Contiki configuration is 2 kilobytes of RAM and 40 kilobytes of ROM.
  • 56. Question  What is COOJA?  Cooja is a simulator provided by Contiki, which unlike most simulators also allows real hardware platforms to be emulated
  • 57. References  http://www.contiki-os.org/start.html  http://virtual- sense.googlecode.com/git/VirtualSense/examples/rest- example/README  http://www.wolfe.id.au/2014/03/02/configuring-a-simple- ipv6-network/  http://contiki-os.blogspot.kr/  http://people.inf.ethz.ch/mkovatsc/wiki/general:contiki:webs erver

Editor's Notes

  1. The password is user.
  2. make login
  3. No addition stack is needed Basically is used to handle the memory constraint in limited devices.
  4. The function leds_toggle() is an alias for leds_invert(), and is only kept for backward compatibility.
  5. Platform dependent blink
  6. In step 2 , the user need to open the terminal and go to the same folder and connect to the webserver using the command “make connect-router-cooja” Then , ping the COOJA nodes to test the connectivity. Type in the terminal the ping6 aaaa::0212:7402:0002:0202 ping6 aaaa::0212:7403:0003:0303
  7. In the Make file in sky-websense folder configuration of the tunslip6 is handled there, Here is the configuration of the tunslip6 which is included in the MakeFile $(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c (cd $(CONTIKI)/tools && $(MAKE) tunslip6) connect-router: $(CONTIKI)/tools/tunslip6 sudo $(CONTIKI)/tools/tunslip6 aaaa::1/64 connect-router-cooja: $(CONTIKI)/tools/tunslip6 sudo $(CONTIKI)/tools/tunslip6 -a 127.0.0.1 aaaa::1/64 2- more information on the SLIP http://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol https://github.com/maniacbug/contiki-avr-zigduino/wiki/Using%3ASLIP#What_is_SLIP
  8. http_appcall() function exists in apps/webserver/httpd.c