Download presentation
Presentation is loading. Please wait.
Published byAvery Layer Modified over 8 years ago
1
Monday, 17 Oct 2011 A Low-Power CoAP for Contiki Matthias Kovatsch, Simon Duquennoy, and Adam Dunkels kovatsch@inf.ethz.chkovatsch@inf.ethz.ch simonduq@sics.seadam@sics.sesimonduq@sics.seadam@sics.se
2
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Internet of Things Protocol Stack 2 LayerProtocol ApplicationCoAP / REST Engine (Erbium) TransportUDP NetworkIPv6 / RPL Adaption6LoWPAN MACCSMA / link-layer bursts Radio Duty CyclingContikiMAC PhysicalIEEE 802.15.4
3
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Internet of Things Protocol Stack 3 LayerProtocol ApplicationCoAP / REST Engine (Erbium) TransportUDP NetworkIPv6 / RPL Adaption6LoWPAN MACCSMA / link-layer bursts Radio Duty CyclingContikiMAC PhysicalIEEE 802.15.4 / link-layer bursts
4
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich ContikiMAC 4 A D A D A ACK frame Data frame Radio on Sender Receiver Transmission detected DDDD Channel check
5
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Link-layer Bursts 5 A AD Sender Receiver Transmission detected DDDD Channel check A AD DA AD DA AD D D A ACK frame Data frame Radio on
6
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Constrained Application Protocol (CoAP) RESTful Web services for networked embedded devices Idealized architectural style of the Web HTTP for the Internet of Things 6 coap://sky3/ coap://sky2/ coap://sky1/ GET /sensors/temperature
7
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Implements draft-ietf-core-coap-07 Available in the Contiki repository on SourceForge «Erbium» CoAP for Contiki 7
8
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich «Erbium» CoAP Reliable UDP transport Observing resources Blockwise transfers Resource discovery Separate responses Blocking client requests 8
9
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich «Erbium» REST Engine Resource abstraction RESOURCE(handle, METHODs, URI-Path, Web Linking info); Resource handler PERIODIC_RESOURCE(handle, METHODs, URI-Path, info, period); Additional periodic handler EVENT_RESOURCE(handle, METHODs, URI-Path, info); Additional event handler 9 Observable CoRE Link Format title="Hello world"; rt="TemperatureC";
10
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich «Erbium» Memory Footprint ROM [kB]RAM [kB] CoAP REST Engine total8.51.5 Measured stack usage–0.1 REST Engine0.70 CoAP-07 base4.50 CoAP-07 server1.90.3 CoAP-07 transport0.40.9 CoAP-07 observing0.90.2 CoAP-07 separate0.10 10
11
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Experimental Set-up 11 3 hops 2 hops 1 hop Energy data over USB 100 Requests each Laptop with border router Static routing 4 hops
12
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Energy vs Latency for 64B Payload 12 Number of hops Energy [mJ] Latency [s] No duty cycling ContikiMAC 1234 0 100 200 300 400 1234 0 0.2 0.4 0.6 0.8 1.0 8 Hz channel check rate 0.6% RDC
13
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Transmitting Large Data 13 Payload [Bytes] Energy [mJ] Latency [s] Bursts avoid steps in latency 23456 Steps become less noticable 4 hops 2 hops 1 hop
14
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Transmitting Large Data 14 A AD Sender Receiver Transmission detected DDDD Channel check AD AD ADA AD D D A ACK frame Data frame Radio on AD
15
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Separate Responses 15 Client Server Request processing Request Retry Retry … Response Request processing Response ACK Request ACK Benchmark and switch automatically Benchmark and switch automatically
16
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Separate Responses over 4 Hops 16 Without With Energy [mJ] Server processing time [s] Savings marginal
17
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Conclusion Internet of Things stack Isolated layers with different goals work together Layered architecture lowers complexity Optimize for single fragments No need to optimize payload size once fragmented CoAP Draft 07 implementation for Contiki Block size most important parameter for memory-constrained devices: Exponential sizes too coarse-grained 17
18
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Future Work Extend «Erbium» CoAP Blocking resource handler for UART Hierarchical resources / URI-Path handling Improve observer handling (only one buffer) Study RESTful approach Long-term deployment with smart appliances Separate application logic from device firmware and combine with «Californium» App Server 18
19
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich THANK YOU Questions? 19
20
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Radio Duty Cycling 20
21
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Constrained Application Protocol (CoAP) RESTful Web services for networked embedded devices Idealized architectural style of the Web Usually implemented with HTTP Central mechanisms Reliable UDP transport («confirmable») Group communication (IP multicast) Push notifications («observing») Resource discovery («CoAP link format») Larger data transport («blockwise transfers») 21 coap://sky3/ coap://sky2/
22
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Blockwise Transfers Automatic or controlled by handler RESOURCE(handle, METHODs, URI-Path, Web Linking info); Resource handler handle_handler(void* request, void* response, uint8_t *buffer, uint16_t preferred_size, int32_t *offset); 22 Unaware: fill buffer up to REST_MAX_CHUNK_SIZE Chunk-aware: use offset and fill buffer up to preferred_size (update offset and set to -1 when finished)
23
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Observing Resources Post-handler registers observers automatically PERIODIC_RESOURCE(handle, METHODs, URI-Path, info, period); Additional periodic handler EVENT_RESOURCE(handle, METHODs, URI-Path, info); Additional event handler int handle_event_handler(resource_t *r) {... REST.notify_subscribers(r->url, CON/NON, seqno, buf, len); } 23 Every x-th is CON to resolve orphans
24
A Low-Power CoAP for Contiki Matthias Kovatsch – ETH Zürich Erbium REST Engine Manipulate messages with REST API REST.set_header_etag(response, etag_buf, etag_len); REST.get_query_variable(request, name, value_buffer); Link implementation coap-03 coap-06 coap-07 … HTTP (not yet implemented for Erbium) 24
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.