Lecture4 - Software Platforms and Services
Lecture4 - Software Platforms and Services
1
Wireless Sensor (and Actuator)
Networks
Services?
End-user
Operating
Systems? Core network
Gateway e.g. Internet
Protocols?
Protocols?
Sink
Gateway Computer services
node
3
Features of the OS in embedded
systems
− Memory management
− Power management
− File management
− Networking
− Providing programming environment and tools (commands,
interpreters, compiler, etc.)
− Providing entry points to access sensitive resources such as
writing to input components.
− Providing and supporting functional aspects such as
scheduling, multi-threading, handling interrupts, memory
allocations.
4
Threads and events
5
Thread-based vs Event-based
Programming
6
Thread-based vs Event-based
Programming- II
7
Embedded Operating Systems
8
Source: The Web of Things, Marko Grobelnik, Carolina Fortuna, Jožef Stefan Institute.
TinyOS
9
TinOS - programming
10
The Contiki OS
Loadable programs
Loaded program Can be easily updated
Communication service
Kernel
11
Sensor Network Programming
14
Nodes and Applications in
Wireless Sensor Networks
− Sensor nodes
− Low power
− Consist of sensing device, memory, processor and radio
− Resource-constrained
− Sink nodes
− Another sensor node or a different wireless node
− Normally more powerful/better resources
− Gateway
− A more powerful node
− Connection to core network
− Could consist service representation, cache/storage, discovery and
other functions
Types of applications
− Event detection
− Reporting occurrences of events
− Reporting abnormalities and changes
− Could require collaboration of other nearby or remote nodes
− Event definition and classification is an issue
− Periodic measurements
− Sensors periodically measure and report the observation and measurement
data
− Reporting period is application dependent
− Approximation and pattern detection
− Sending messages along the boundaries of patterns in both space/time
− Tracking
− When the source of an event is mobile
− Sending event updates with location information
Requirements and challenges
− Fault tolerance
− The nodes can get damaged, run out of power, the wireless
communication between two nodes can be interrupted, etc.
− To tolerate node failures, redundant deployments can be necessary.
− Lifetime
− The nodes could have a limited energy supply;
− Sometimes replacing the energy sources is not practical (e.g.
underwater deployment, large/remote field deployments).
− Energy efficient operation can be a necessity.
Requirements and challenges – Cont’d
− Scalability
− A WSN can consists of a large number of nodes
− The employed architectures and protocols should scale to these
numbers.
− Wide range of densities
− Density of the network can vary
− Different applications can have different node densities
− Density does not need to be homogeneous in the entire network and
network should adapt to such variations.
Requirements and challenges – Cont’d
− Programmability
− Nodes should be flexible and their tasks could change
− The programmes should be also changeable during operation.
− Maintainability
− WSN and environment of a WSN can change;
− The system should be adaptable to the changes.
− The operational parameters can change to choose different trade-offs
(e.g. to provide lower quality when energy efficiency is more
important)
Required mechanisms
− Wired
− USB, Ethernet
− Wireless
− Wifi, Bluetooth, ZigBee, IEEE 802.15.x
− Single-hop or multi-hop
− Sink nodes, cluster heads…
− Point-to-Point or Point-to-Multi Point
− (Energy) efficient routing
Wireless Communications
Adapted from: The Web of Things, Marko Grobelnik, Carolina Fortuna, Jožef Stefan Institute.
Wireless Communications - continued
− Licensed bands
− Standard: 3GPP –WMAN, WWAN cellular communication
− 950 MHz, 1.8 and 2.1 GHz bands with data rate ranging from 20 Kbit/s to 7.2
Mbit/s, depending on the release
− Technology: GPRS, HSPA
Adapted from: The Web of Things, Marko Grobelnik, Carolina Fortuna, Jožef Stefan Institute.
IEEE 802.15.4 WPAN
Source: Jonathan W. Hui and David E. Culler, IPv6 in Low-Power Wireless Networks, Proceedings of the IEEE (Volume:98 , Issue: 11 ).
6LowPAN
Source: Jonathan W. Hui and David E. Culler, IPv6 in Low-Power Wireless Networks, Proceedings of the IEEE (Volume:98 , Issue: 11 ).
Using gateway and middleware
Gateway
Frieder Ganz, Payam Barnaghi, Francois Carrez and Klaus Moessner, "Context-aware Management for
Sensor Networks", in the Fifth International Conference on COMmunication System softWAre and
middlewaRE (COMSWARE11), July 2011.
Service interfaces to WSN
C. Bormann, A. P. Castellani, Z. Shelby, "CoAP: An Application Protocol for Billions of Tiny Internet Nodes," IEEE Internet Computing,
vol. 16, no. 2, pp. 62-67, Feb. 2012, doi:10.1109/MIC.2012.29
Constrained Application Protocol (CoAP)
Server
200 OK
GET/temperature, Txt/plain
Room A 17, Celsius
Client
CoAP protocol stack and interactions
C. Bormann, A. P. Castellani, Z. Shelby, "CoAP: An Application Protocol for Billions of Tiny Internet Nodes," IEEE Internet Computing,
vol. 16, no. 2, pp. 62-67, Feb. 2012, doi:10.1109/MIC.2012.29
Further reading and examples
− Examples: https://github.com/contiki-
os/contiki/tree/master/examples
41