Your SlideShare is downloading. ×
0
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
A Low-Power CoAP for Contiki
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

A Low-Power CoAP for Contiki

6,021

Published on

Presentation at the IEEE Workshop on Internet of Things Technology and Architectures (IoTech 2011), Valencia, Spain. …

Presentation at the IEEE Workshop on Internet of Things Technology and Architectures (IoTech 2011), Valencia, Spain.
http://iotech-ws.com/

Published in: Technology, Business
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,021
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
275
Comments
0
Likes
6
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. A Low-Power CoAP for ContikiMatthias Kovatsch, Simon Duquennoy, and Adam Dunkelskovatsch@inf.ethz.ch simonduq@sics.se adam@sics.seMonday, 17 Oct 2011
  • 2. Internet of Things Protocol Stack Layer Protocol Application CoAP / REST Engine (Erbium) Transport UDP Network IPv6 / RPL Adaption 6LoWPAN MAC CSMA / link-layer bursts Radio Duty Cycling ContikiMAC Physical IEEE 802.15.4Matthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 2
  • 3. ContikiMAC Radio on D Data frame A ACK frame Sender D D D D A Receiver D A Channel check Transmission detectedMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 3
  • 4. Link-layer Bursts Radio on D Data frame A ACK frame Sender D D D D A D A D A D A Receiver D A D A D A D A Channel check Transmission detectedMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 4
  • 5. Constrained Application Protocol (CoAP) RESTful Web services for networked embedded devices  Idealized architectural style of the Web  HTTP for the Internet of Things coap://sky2/ coap://sky1/ coap://sky3/Matthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 5
  • 6. «Erbium» CoAP for Contiki Implements draft-ietf-core-coap-07 Available in the Contiki repository on SourceForgeMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 6
  • 7. «Erbium» CoAP Reliable UDP transport Observing resources Blockwise transfers Resource discovery Separate responses Blocking client requestsMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 7
  • 8. «Erbium» REST Engine CoRE Link Format title="Hello world"; rt="TemperatureC"; 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 ObservableMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 8
  • 9. «Erbium» Memory Footprint ROM [kB] RAM [kB] CoAP REST Engine total 8.5 1.5 Measured stack usage – 0.1 REST Engine 0.7 0 CoAP-07 base 4.5 0 CoAP-07 server 1.9 0.3 CoAP-07 transport 0.4 0.9 CoAP-07 observing 0.9 0.2 CoAP-07 separate 0.1 0Matthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 9
  • 10. Experimental Set-up 4 hops Energy data over USB 100 Requests each 3 hops Laptop with Static routing border router 1 hop 2 hopsMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 10
  • 11. No duty cycling ContikiMACEnergy vs Latency for 64B Payload 8 Hz channel check rate 1.0 0.6% RDC 400 0.8 300 Energy [mJ] Latency [s] 0.6 200 0.4 100 0.2 0 0 1 2 3 4 1 2 3 4 Number of hops Number of hopsMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 11
  • 12. 4 hops 2 hops Transmitting Large Data 1 hop 70 65 2 3 4 5 6 1.8 Bursts avoid 60 1.6 steps in latency 55 1.4 50 45 1.2Energy [mJ] Latency [s] 40 1.0 35 30 Steps become 0.8 25 less noticable 0.6 20 15 0.4 10 0.2 5 0 0 0 128 256 384 512 0 128 256 384 512 Payload [Bytes] Payload [Bytes] Matthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 12
  • 13. Transmitting Large Data Radio on D Data frame Number of frames sent depends on link quality, not number of fragments A ACK frame Sender D D D D A D D D A Receiver D A D A Channel check Transmission detectedMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 13
  • 14. Separate Responses Client Server Client Server Request Request ACK Retry Request Request processing processing Retry … Benchmark and switch Response automatically Response ACKMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 14
  • 15. Without WithSeparate Responses over 4 Hops Savings marginal for CoAP’s default parameters 150 125 Energy [mJ] 100 75 Retransmissions after 2-3, 4-6, 8-12, and 50 16-24 seconds 25 0 5 10 15 20 25 Server processing time [s]Matthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 15
  • 16. 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-grainedMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 16
  • 17. 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»-based App Server https://github.com/mkovatsc/CaliforniumMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 17
  • 18. THANK YOUQuestions?Matthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 18
  • 19. Blockwise TransfersAutomatic 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); Unaware: fill buffer up to Chunk-aware: use offset and REST_MAX_CHUNK_SIZE fill buffer up to preferred_size (update offset and set to -1 when finished)Matthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 19
  • 20. Observing ResourcesPost-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); } Every x-th is CON to resolve orphansMatthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 20
  • 21. «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)Matthias Kovatsch – ETH Zürich A Low-Power CoAP for Contiki 21

×