SlideShare a Scribd company logo
Wireless sensor networks
Dr. Narmada Alaparthi
2
Wireless sensor networks
A sensor node (mote)
 8K RAM, 4Mhz processor
 magnetism, heat, sound, vibration, infrared
 wireless (radio broadcast) communication up to 100 feet
 costs ~$10 (right now costs $200)
3
New Class of Computing
year
log(peoplepercomputer)
streaming
information
to/from physical
world
Number Crunching
Data Storage
productivity
interactive
Mainframe
Minicomputer
Workstation
PC
Laptop
PDA
4
Why use a WSN?
• Ease of deployment
 Wireless communication means no need for a communication
infrastructure setup
 Drop and play
• Low-cost of deployment
 Nodes are built using off-the-shelf cheap components
• Fine grain monitoring
 Feasible to deploy nodes densely for fine grain monitoring
5
Challenges in sensor networks
• Energy constraint
• Unreliable communication
• Unreliable sensors
• Ad hoc deployment
• Large scale networks
• Limited computation power
• Distributed execution
: Nodes are battery powered
: Radio broadcast, limited
bandwidth, bursty traffic
: False positives
: Pre-configuration inapplicable
: Algorithms should scale well
: Centralized algorithms
inapplicable
: Difficult to debug & get it right
6
Outline
• Applications
• Platforms (hw&sw)
• WSN services (layers? what layers?)
• Comparison with the Internet architecture
7
• Monitoring nesting behavior of birds
 Great Ducks experiment
• Detecting forest fires
• Detecting chemical or biological attacks
• Monitoring Redwood trees
Ecology monitoring
8
Dense Self-Organized Multihop Network
9R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R
8
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
Temperature vs. Time
Temperature(C)
Humidity vs. Time
35
45
55
65
75
85
95
RelHumidity(%)
101 104 109 110 111
2003, unpublished
Bottom Top
36m
34m
30m
20m
10m
10
Precision agriculture
• Wireless sensor networks can be placed on farm lands to
monitor temperature, humidity, fertilizer and pesticide levels
• Pesticide and fertilizer can only be applied when and where
required
 Pesticide and fertilizer per one acre costs $20
 Considering 100,000 acres savings of $2 million possible
Vineyards
BC
11
Equipment Health Monitoring in
Semiconductor Fab
Fab Equipment
Mote + Vibration Sensors
Ad Hoc Mote
Network
Intranet
802.11 Mesh
Intranet isolation
Root Node
• Equipment failures in production fabs is very costly
 Predict and perform preemptive maintenance
• Typical fab has ~5,000 vibration sensors
 Pumps, scrubbers, …
 Electricians collect data by hand few times a year
 Sample: 10’s kilohertz, high precision, few seconds
12
Put tripwires anywhere—in deserts, other areas where physical terrain
does not constrain troop or vehicle movement—to detect, classify &
track intruders
Project ExScal: Concept of
operation
13
Envisioned ExScal customer application
Gas pipeline
Border control
Canopy precludes aerial
techniques
Rain forest – mountains – water
environmental challenges
Convoy protection
IED
Hide Site
Detect anomalous activity
along roadside
14
ExScal summary
• Application has tight constraints of event detection scenarios: long
life but still low latency, high accuracy over large perimeter area
• Demonstrated in December 2004 in Florida
• Deployment area: 1,260m x 288m
• ~1000 XSMs, the largest WSN
• ~200 XSSs, the largest 802.11b ad hoc network
15
Line in the sand project
• Thick line allows detection & classification as intruders enter the protected
region; also allows fine grain intruder localization
• Grid of thin lines allows bounded uncertainty tracking
Thick Entry Line
A S S E T
1 km
250 m
16
ExScal sample scenarios
Intruding person walks through thick line
• (pir) detection, classification, and fine-grain localization
Intruding vehicle enters perimeter and crosses thick line
• (acoustic) detection, classification, and fine-grain localization
Person/ATV traverses through the lines
• coarse-grain tracking
Management operations to control signal chains, change parameters, and
programs dynamically; query status and execute commands
WSN Platforms:
Hardware & Software
18
Types of sensor platforms
1. RFID equipped sensors
1. Smart-dust tags
 typically act as data-collectors or “trip-wires”
 limited processing and communications
• Mote/Stargate-scale nodes
• more flexible processing and communications
1. More powerful gateway nodes, potentially using wall power
19
Grain-sized nodes
 Powered by inductive coupling to a transmission from a
reader device to transmit a message back
 Available commercially at very low prices
× Computation power is severely limited
× Can only trasmit stored unique id and variable
× Hard to add any interesting sensing capability
20
Matchbox-sized nodes
• Mica series, XSM node, Telos
• 8-bit microprocessor, 4MHz CPU
 ATMEGA 128, ATMEL 8535, or Motorola HCS08
• ~4Kb RAM
 holds run-time state (values of the variables) of the program
• ~128Kb programmable Flash memory
 holds the application program
 Downloaded via a programmer-board or wirelessly
• Additional Flash memory storage space up to 512Kb.
21
Mica2 and Mica2Dot
• ATmega128 CPU
– Self-programming
• Chipcon CC1000
– FSK
– Manchester encoding
– Tunable frequency
• Low power consumption
– 2 AA battery = 3V
1 inch
22
Basic Sensor Board
• Light (Photo)
• Temperature
• Prototyping space for
new hardware designs
23
Mica Sensor Board
• Light (Photo)
• Temperature
• Acceleration
– 2 axis
– Resolution: ±2mg
• Magnetometer
– Resolution: 134µG
• Microphone
• Tone Detector
• Sounder
– 4.5kHz
24
Telos Platform
• Low Power
 Minimal port leakage
 Hardware isolation and buffering
• Robust
 Hardware flash write protection
 Integrated antenna (50m-125m)
 Standard IDC connectors
• Standards Based
 USB
 IEEE 802.15.4 (CC2420 radio)
• High Performance
 10kB RAM, 16-bit core, extensive double buffering
 12-bit ADC and DAC (200ksamples/sec)
 DMA transfers while CPU off
25
Brick-sized node: Stargate
• Mini Linux computers communicating via 802.11 radios
 Computationally powerful
 High bandwidth
 Requires more energy (AA infeasible)
• Used as a gateway between the Internet and WSN
26
Stargate
27
Outline
• Hardware
 RFID, Spec
 Mica2, XSM, Telos
 Stargate
• Software
 TinyOS
28
TinyOS
• most popular operating system for WSN
 developed by UC Berkeley
• features a component-based architecture
 software is written in modular pieces called components
 Each component denotes the interfaces that it provides
 An interface declares a set of functions called commands that the
interface provider implements and another set of functions called events
that the interface user should be ready to handle
• Easy to link components together by “wiring” their interfaces
to form larger components
 similar to using Lego blocks
29
TinyOS
• provides a component library that includes network protocols,
services, and sensor drivers
• An application consists of
 a component written by the application developer and
 the library components that are used by the components in (1)
• An application developer writes only the application
component that describes the sensors used in the application,
the middleware services configured with the appropriate
parameters based on the needs of the application
30
Benefits of using TinyOS
• Separation of concerns
 TinyOS provides a proper networking stack for wireless communication
that abstracts away the underlying problems and complexity of message
transfer from the application developer
 E.g., MAC layer
• Concurrency control
 TinyOS provides a scheduler that achieves efficient concurrency control
 An interrupt-driven execution model is needed to achieve a quick
response time for the events and capture the data
 For example, a message transmission may take up to 100msec, and without an
interrupt-driven approach the node would miss sensing and processing of
interesting data in this period
 Scheduler takes care of the intricacies of interrupt-driven execution and provides
concurrency in a safe manner by scheduling the execution in small threads.
31
Benefits of TinyOS
• Modularity
 TinyOS’s component model facilitates reuse and reconfigurability since
software is written in small functional modules. Several middleware
services are available as well-documented components
 Over 500 research groups and companies are using TinyOS and
numerous groups are actively contributing code to the public domain
32
RadioTimingSecDedEncode
The Complete Application
RadioCRCPacket
UART
UARTnoCRCPacket
ADC
phototemp
AMStandard
ClockC
bitbytepacket
SenseToRfm
HW
SW
IntToRfm
MicaHighSpeedRadioM
RandomLFSRSPIByteFIFO
SlavePin
noCRCPacket
Timer photo
ChannelMon
generic comm
CRCfilter
33
TOS Execution Model
• commands request action
 ack/nack at every boundary
 call command or post task
• events notify occurrence
 HW interrupt at lowest level
 may signal events
 call commands
 post tasks
• tasks provide logical concurrency
 preempted by events
RFM
Radio byte
Radio Packet
bitbytepacket
event-driven bit-pump
event-driven byte-pump
event-driven packet-pump
message-event driven
active message
application comp
encode/decode
crc
data processing
34
Event-Driven Sensor Access
Pattern
• clock event handler initiates data collection
• sensor signals data ready event
• data event handler calls output command
• device sleeps or handles other activity while waiting
• conservative send/ack at component boundary
command result_t StdControl.start() {
return call Timer.start(TIMER_REPEAT, 200);
}
event result_t Timer.fired() {
return call sensor.getData();
}
event result_t sensor.dataReady(uint16_t data) {
display(data)
return SUCCESS;
}
SENSE
Timer Photo LED
35
Programming Syntax
• TinyOS 2.0 is written in an extension of C, called nesC
• Applications are too
 just additional components composed with OS components
• Provides syntax for TinyOS concurrency and storage model
 commands, events, tasks
 local frame variable
• Compositional support
 separation of definition and linkage
 robustness through narrow interfaces and reuse
 Interpositioning
• Whole system analysis and optimization
WSN Services:
37
WSN services
• MAC protocols (BMAC, SMAC, TMAC, etc.)
• Topology control (GAF, SPAN, CEC, etc.)
• Clustering (Leach, FLOC, etc.)
• Time synchronization (Flooding time sync, reference broadcast)
• Localization (cricket, range-free techniques...)
• Routing (convergecast tree, geographic routing, hierarchical...)
• Querying (DSIB, DQT, directed diffusion, etc.)
• Tracking (Stalk, Trail, etc.)
• Network reprogramming
Comparison to
Internet architecture:
39
Compared to Internet
• No clear layering; cross layer design is norm
• No separation between edge vs core of the network
 all nodes are both routers and hosts
• End-to-end principle fails
 unreliable channels, multihop latency
• Ad hoc deployment
 timesync, localization, topology control, clustering etc services needed
• Routing needs are different...

More Related Content

DOC
22276455 wireless-geophones
PPTX
WIRELWIRELESS INTEGRATED NETWORK SENSORS
PPTX
MPL 2016 PRESENTATION
PPT
Border security using wireless integrated network sensors(wins)
PPTX
Project_updated
PPT
Bordersecurityusingwirelessintegratednetworksensorswins 130402083822-phpapp02
PDF
Wireless Sensor Network in Niger Delta Oil and Gas Field Monitoring: Issues a...
PDF
Track 5 session 3 - st dev con 2016 - mechanisms for trusted code execution...
22276455 wireless-geophones
WIRELWIRELESS INTEGRATED NETWORK SENSORS
MPL 2016 PRESENTATION
Border security using wireless integrated network sensors(wins)
Project_updated
Bordersecurityusingwirelessintegratednetworksensorswins 130402083822-phpapp02
Wireless Sensor Network in Niger Delta Oil and Gas Field Monitoring: Issues a...
Track 5 session 3 - st dev con 2016 - mechanisms for trusted code execution...

What's hot (20)

PPTX
Presentation on Wireless border security system
PPTX
Wireless applications in various areas
PPTX
wins ABHIppt - Copy
PPTX
Training manual on scada
PDF
FreshLoc Core Product Specifications
PPTX
border-security-using-wins
PDF
Practical DNP3 and Modern SCADA Systems
PDF
Track 5 session 4 - st dev con 2016 - life cycle management for web
PPTX
Wireless border security system
PDF
Border security
DOC
Scada protocols-and-communications-trends
PDF
A Border security Using Wireless Integrated Network Sensors (WINS)
PDF
Ls catalog thiet bi tu dong master rtu e_dienhathe.vn
DOC
complet finalised
PPTX
Digital Catapult Centre Brighton - Nigel Devenish
PPT
Practical Distribution and Substation Automation (incl. communications) for E...
PDF
Oj3425062509
PDF
Rubén Santamarta - SCADA Trojans: Attacking the Grid [Rooted CON 2011]
PPTX
Classification cyber security threats of modern substation
Presentation on Wireless border security system
Wireless applications in various areas
wins ABHIppt - Copy
Training manual on scada
FreshLoc Core Product Specifications
border-security-using-wins
Practical DNP3 and Modern SCADA Systems
Track 5 session 4 - st dev con 2016 - life cycle management for web
Wireless border security system
Border security
Scada protocols-and-communications-trends
A Border security Using Wireless Integrated Network Sensors (WINS)
Ls catalog thiet bi tu dong master rtu e_dienhathe.vn
complet finalised
Digital Catapult Centre Brighton - Nigel Devenish
Practical Distribution and Substation Automation (incl. communications) for E...
Oj3425062509
Rubén Santamarta - SCADA Trojans: Attacking the Grid [Rooted CON 2011]
Classification cyber security threats of modern substation
Ad

Similar to Wsn handbook (20)

PDF
Wireless sensor networks in Internet of Things
PPTX
Wireless sensor networks
PPT
Internet of Things: Concepts and Technologies
PDF
matdid473708.pdf
PPT
Introduction to wireless sensor networks
PPT
Wireless sensor network and its application
PPTX
Wireless sensor networks (Yogesh Chandra Fulara)
PPT
Wireless sensor networks
PPT
Wireless Sensor Networks
PPTX
IoT: An Introduction and Getting Started Session
PPT
gcettb presentation on sensor network
PDF
unit-iv-wireless-sensor-networks-wsns-and-mac-protocols
PDF
Wireless sensor networks dcs
PPTX
Wsn unit-1-ppt
PPT
L26.B.FA20.ppt
PPTX
An overview of a wireless sensor network communication
PPTX
An overview of a wireless sensor network communication ppt
PPTX
Majorppt
Wireless sensor networks in Internet of Things
Wireless sensor networks
Internet of Things: Concepts and Technologies
matdid473708.pdf
Introduction to wireless sensor networks
Wireless sensor network and its application
Wireless sensor networks (Yogesh Chandra Fulara)
Wireless sensor networks
Wireless Sensor Networks
IoT: An Introduction and Getting Started Session
gcettb presentation on sensor network
unit-iv-wireless-sensor-networks-wsns-and-mac-protocols
Wireless sensor networks dcs
Wsn unit-1-ppt
L26.B.FA20.ppt
An overview of a wireless sensor network communication
An overview of a wireless sensor network communication ppt
Majorppt
Ad

More from narmada alaparthi (7)

PPT
Entrepreneurship
PPT
2 research ideas
PPT
Ns fundamentals 1
PPT
How to write a research proposal
PPT
Entrepreneurship
PPT
2 research ideas
Entrepreneurship
2 research ideas
Ns fundamentals 1
How to write a research proposal
Entrepreneurship
2 research ideas

Recently uploaded (20)

PPTX
additive manufacturing of ss316l using mig welding
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Sustainable Sites - Green Building Construction
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
PPT on Performance Review to get promotions
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
additive manufacturing of ss316l using mig welding
Lesson 3_Tessellation.pptx finite Mathematics
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Foundation to blockchain - A guide to Blockchain Tech
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Embodied AI: Ushering in the Next Era of Intelligent Systems
Sustainable Sites - Green Building Construction
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Internet of Things (IOT) - A guide to understanding
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
CYBER-CRIMES AND SECURITY A guide to understanding
PPT on Performance Review to get promotions
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Arduino robotics embedded978-1-4302-3184-4.pdf
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...

Wsn handbook

  • 1. Wireless sensor networks Dr. Narmada Alaparthi
  • 2. 2 Wireless sensor networks A sensor node (mote)  8K RAM, 4Mhz processor  magnetism, heat, sound, vibration, infrared  wireless (radio broadcast) communication up to 100 feet  costs ~$10 (right now costs $200)
  • 3. 3 New Class of Computing year log(peoplepercomputer) streaming information to/from physical world Number Crunching Data Storage productivity interactive Mainframe Minicomputer Workstation PC Laptop PDA
  • 4. 4 Why use a WSN? • Ease of deployment  Wireless communication means no need for a communication infrastructure setup  Drop and play • Low-cost of deployment  Nodes are built using off-the-shelf cheap components • Fine grain monitoring  Feasible to deploy nodes densely for fine grain monitoring
  • 5. 5 Challenges in sensor networks • Energy constraint • Unreliable communication • Unreliable sensors • Ad hoc deployment • Large scale networks • Limited computation power • Distributed execution : Nodes are battery powered : Radio broadcast, limited bandwidth, bursty traffic : False positives : Pre-configuration inapplicable : Algorithms should scale well : Centralized algorithms inapplicable : Difficult to debug & get it right
  • 6. 6 Outline • Applications • Platforms (hw&sw) • WSN services (layers? what layers?) • Comparison with the Internet architecture
  • 7. 7 • Monitoring nesting behavior of birds  Great Ducks experiment • Detecting forest fires • Detecting chemical or biological attacks • Monitoring Redwood trees Ecology monitoring
  • 9. 9R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R 8 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 Temperature vs. Time Temperature(C) Humidity vs. Time 35 45 55 65 75 85 95 RelHumidity(%) 101 104 109 110 111 2003, unpublished Bottom Top 36m 34m 30m 20m 10m
  • 10. 10 Precision agriculture • Wireless sensor networks can be placed on farm lands to monitor temperature, humidity, fertilizer and pesticide levels • Pesticide and fertilizer can only be applied when and where required  Pesticide and fertilizer per one acre costs $20  Considering 100,000 acres savings of $2 million possible Vineyards BC
  • 11. 11 Equipment Health Monitoring in Semiconductor Fab Fab Equipment Mote + Vibration Sensors Ad Hoc Mote Network Intranet 802.11 Mesh Intranet isolation Root Node • Equipment failures in production fabs is very costly  Predict and perform preemptive maintenance • Typical fab has ~5,000 vibration sensors  Pumps, scrubbers, …  Electricians collect data by hand few times a year  Sample: 10’s kilohertz, high precision, few seconds
  • 12. 12 Put tripwires anywhere—in deserts, other areas where physical terrain does not constrain troop or vehicle movement—to detect, classify & track intruders Project ExScal: Concept of operation
  • 13. 13 Envisioned ExScal customer application Gas pipeline Border control Canopy precludes aerial techniques Rain forest – mountains – water environmental challenges Convoy protection IED Hide Site Detect anomalous activity along roadside
  • 14. 14 ExScal summary • Application has tight constraints of event detection scenarios: long life but still low latency, high accuracy over large perimeter area • Demonstrated in December 2004 in Florida • Deployment area: 1,260m x 288m • ~1000 XSMs, the largest WSN • ~200 XSSs, the largest 802.11b ad hoc network
  • 15. 15 Line in the sand project • Thick line allows detection & classification as intruders enter the protected region; also allows fine grain intruder localization • Grid of thin lines allows bounded uncertainty tracking Thick Entry Line A S S E T 1 km 250 m
  • 16. 16 ExScal sample scenarios Intruding person walks through thick line • (pir) detection, classification, and fine-grain localization Intruding vehicle enters perimeter and crosses thick line • (acoustic) detection, classification, and fine-grain localization Person/ATV traverses through the lines • coarse-grain tracking Management operations to control signal chains, change parameters, and programs dynamically; query status and execute commands
  • 18. 18 Types of sensor platforms 1. RFID equipped sensors 1. Smart-dust tags  typically act as data-collectors or “trip-wires”  limited processing and communications • Mote/Stargate-scale nodes • more flexible processing and communications 1. More powerful gateway nodes, potentially using wall power
  • 19. 19 Grain-sized nodes  Powered by inductive coupling to a transmission from a reader device to transmit a message back  Available commercially at very low prices × Computation power is severely limited × Can only trasmit stored unique id and variable × Hard to add any interesting sensing capability
  • 20. 20 Matchbox-sized nodes • Mica series, XSM node, Telos • 8-bit microprocessor, 4MHz CPU  ATMEGA 128, ATMEL 8535, or Motorola HCS08 • ~4Kb RAM  holds run-time state (values of the variables) of the program • ~128Kb programmable Flash memory  holds the application program  Downloaded via a programmer-board or wirelessly • Additional Flash memory storage space up to 512Kb.
  • 21. 21 Mica2 and Mica2Dot • ATmega128 CPU – Self-programming • Chipcon CC1000 – FSK – Manchester encoding – Tunable frequency • Low power consumption – 2 AA battery = 3V 1 inch
  • 22. 22 Basic Sensor Board • Light (Photo) • Temperature • Prototyping space for new hardware designs
  • 23. 23 Mica Sensor Board • Light (Photo) • Temperature • Acceleration – 2 axis – Resolution: ±2mg • Magnetometer – Resolution: 134µG • Microphone • Tone Detector • Sounder – 4.5kHz
  • 24. 24 Telos Platform • Low Power  Minimal port leakage  Hardware isolation and buffering • Robust  Hardware flash write protection  Integrated antenna (50m-125m)  Standard IDC connectors • Standards Based  USB  IEEE 802.15.4 (CC2420 radio) • High Performance  10kB RAM, 16-bit core, extensive double buffering  12-bit ADC and DAC (200ksamples/sec)  DMA transfers while CPU off
  • 25. 25 Brick-sized node: Stargate • Mini Linux computers communicating via 802.11 radios  Computationally powerful  High bandwidth  Requires more energy (AA infeasible) • Used as a gateway between the Internet and WSN
  • 27. 27 Outline • Hardware  RFID, Spec  Mica2, XSM, Telos  Stargate • Software  TinyOS
  • 28. 28 TinyOS • most popular operating system for WSN  developed by UC Berkeley • features a component-based architecture  software is written in modular pieces called components  Each component denotes the interfaces that it provides  An interface declares a set of functions called commands that the interface provider implements and another set of functions called events that the interface user should be ready to handle • Easy to link components together by “wiring” their interfaces to form larger components  similar to using Lego blocks
  • 29. 29 TinyOS • provides a component library that includes network protocols, services, and sensor drivers • An application consists of  a component written by the application developer and  the library components that are used by the components in (1) • An application developer writes only the application component that describes the sensors used in the application, the middleware services configured with the appropriate parameters based on the needs of the application
  • 30. 30 Benefits of using TinyOS • Separation of concerns  TinyOS provides a proper networking stack for wireless communication that abstracts away the underlying problems and complexity of message transfer from the application developer  E.g., MAC layer • Concurrency control  TinyOS provides a scheduler that achieves efficient concurrency control  An interrupt-driven execution model is needed to achieve a quick response time for the events and capture the data  For example, a message transmission may take up to 100msec, and without an interrupt-driven approach the node would miss sensing and processing of interesting data in this period  Scheduler takes care of the intricacies of interrupt-driven execution and provides concurrency in a safe manner by scheduling the execution in small threads.
  • 31. 31 Benefits of TinyOS • Modularity  TinyOS’s component model facilitates reuse and reconfigurability since software is written in small functional modules. Several middleware services are available as well-documented components  Over 500 research groups and companies are using TinyOS and numerous groups are actively contributing code to the public domain
  • 33. 33 TOS Execution Model • commands request action  ack/nack at every boundary  call command or post task • events notify occurrence  HW interrupt at lowest level  may signal events  call commands  post tasks • tasks provide logical concurrency  preempted by events RFM Radio byte Radio Packet bitbytepacket event-driven bit-pump event-driven byte-pump event-driven packet-pump message-event driven active message application comp encode/decode crc data processing
  • 34. 34 Event-Driven Sensor Access Pattern • clock event handler initiates data collection • sensor signals data ready event • data event handler calls output command • device sleeps or handles other activity while waiting • conservative send/ack at component boundary command result_t StdControl.start() { return call Timer.start(TIMER_REPEAT, 200); } event result_t Timer.fired() { return call sensor.getData(); } event result_t sensor.dataReady(uint16_t data) { display(data) return SUCCESS; } SENSE Timer Photo LED
  • 35. 35 Programming Syntax • TinyOS 2.0 is written in an extension of C, called nesC • Applications are too  just additional components composed with OS components • Provides syntax for TinyOS concurrency and storage model  commands, events, tasks  local frame variable • Compositional support  separation of definition and linkage  robustness through narrow interfaces and reuse  Interpositioning • Whole system analysis and optimization
  • 37. 37 WSN services • MAC protocols (BMAC, SMAC, TMAC, etc.) • Topology control (GAF, SPAN, CEC, etc.) • Clustering (Leach, FLOC, etc.) • Time synchronization (Flooding time sync, reference broadcast) • Localization (cricket, range-free techniques...) • Routing (convergecast tree, geographic routing, hierarchical...) • Querying (DSIB, DQT, directed diffusion, etc.) • Tracking (Stalk, Trail, etc.) • Network reprogramming
  • 39. 39 Compared to Internet • No clear layering; cross layer design is norm • No separation between edge vs core of the network  all nodes are both routers and hosts • End-to-end principle fails  unreliable channels, multihop latency • Ad hoc deployment  timesync, localization, topology control, clustering etc services needed • Routing needs are different...

Editor's Notes