SlideShare a Scribd company logo
CoAP
6LowPAN &
Raspberry Pi
M2M Community

Cristina Peña Alcega
Carlos Ralli Ucendo
Telefónica Digital
19.12.2013

(@CrisisP)
(@carlosralli)
Index
I

II

DIY Scenarios & Solutions

• Intro
• Scenario #1: z-wave + REST
• Scenario #2: 6LoWPAN + CoAP

Behind the scenes: Constrained Application Protocol

• Introduction and CoAP Architecture
• Messaging Model, Sub-layers, Reliability, Request/Response rules, and
• Proxying and Caching
• Endpoints and URIs
• Discovery
• Multicast
• Security
• Status, advantages and limitations
• Available implementations

Message Format.
I. DIY Scenarios
& Solutions
01

How it all started…
Things (Devices) are getting smarter, from Class-1 to Consumer Electronics.
If a Thing is an Internet node, it’s subject of APIzation.
REST is the most successful Internet/Web API.

CoRE /CoAP
So we decided to start ourselves investing some 480€ to play with:
- 4 6LowPAN capable Motes (360€), 2 Raspberry PI (120€).
- Plus lots of hours of DIY “fun”!
M2M Community
Telefónica Digital

4

Recommended for you

IoT Networking
IoT NetworkingIoT Networking
IoT Networking

This document discusses IoT networking and quality of service (QoS) for IoT networks. It begins by describing the characteristics of IoT devices such as low processing power, small size, and energy constraints. It then discusses enabling the classical Internet for IoT devices through standards developed by the IETF, including 6LoWPAN, ROLL, and CoRE. CoRE provides a framework for IoT applications and services discovery. The document concludes by examining policies for QoS in IoT networks to guarantee intended service, covering resource utilization, data timeliness, availability, and delivery.

iotnetworkingengineering
1. Introduction to IoT
1. Introduction to IoT1. Introduction to IoT
1. Introduction to IoT

The document provides an introduction to IoT including definitions, characteristics, genesis, applications and challenges. It describes the physical design of IoT including IoT devices, protocols, and the generic block diagram of an IoT device. It also describes the logical design including IoT functional blocks, communication models like publish-subscribe, request-response, levels of IoT deployment from level 1 to 6, and enabling technologies.

iot
Internet of thing (IoT and cloud convergence opportunitis and challenges
 Internet of thing (IoT and cloud convergence opportunitis and challenges  Internet of thing (IoT and cloud convergence opportunitis and challenges
Internet of thing (IoT and cloud convergence opportunitis and challenges

This document discusses the convergence of IoT and cloud computing. It describes how IoT platforms have major requirements for connectivity, dynamic management of devices and data, and deriving value from connected devices. The cloud offers resources that can meet these IoT needs, including scalability, elasticity, and ubiquitous access. There are two main convergence approaches - cloud-centric IoT, which brings IoT functionality to the cloud, and IoT-centric cloud, which brings cloud functionality to distributed IoT networks. Examples are given of existing platforms that take each approach. Key challenges of the IoT-cloud convergence include distributed processing and storage of massive IoT data, interoperability, and ensuring real-time communication across devices, applications

cloudiotinternet of thing
02

Is CoAP Rocket Science? No, it’s just REST
Traditional REST WEB APIs relays on HTTP-TCP-IP
CoRE/CoAP = REST APIs over UDP-IP

M2M Community
Telefónica Digital

5
03

Scenario1: Building a CoAP (IoT) Gateway

M2M Community
Telefónica Digital

6
04

Scenario1: Software Architecture

M2M Community
Telefónica Digital

7
05

Scenario1: Step 1

1.1) Install & compile ccoap in your laptop
https://github.com/ipflavors/ccoap/tree/master/doc

M2M Community
Telefónica Digital

?
8

Recommended for you

Market oriented Cloud Computing
Market oriented Cloud ComputingMarket oriented Cloud Computing
Market oriented Cloud Computing

This document discusses the vision, hype and reality of delivering IT services as computing utilities. It outlines the need for a market oriented cloud architecture to regulate supply and demand of cloud resources. Emerging cloud platforms like Amazon EC2, Google App Engine, Microsoft Live Mesh and Sun Grid are presented. The limitations of present cloud service providers are discussed. Finally, the concept of a Global Cloud Exchange is proposed to address these limitations through features like a market directory, banking system, brokers and price setting mechanisms.

brokeragesmarketingcloud computing
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium

This document provides an overview of a hands-on workshop on the Constrained Application Protocol (CoAP). It outlines the agenda which includes introductions to CoAP, the Californium CoAP framework, and hands-on projects. Attendees will work through example CoAP client and server code using the Californium libraries and test their implementations. Advanced CoAP topics like security, proxies, and resource directories are also discussed.

iotcoaptutorial
Iot presentation
Iot presentationIot presentation
Iot presentation

The Internet of things describes physical objects that are embedded with sensors, processing ability, software, and other technologies that connect and exchange data with other devices and systems over the Internet or other communications networks.

#computerscience#internetofthingscomputer
06

Scenario1: Step 2

1.2) Install Firefox Navigator plus Copper (CU) Plugin
https://addons.mozilla.org/en-US/firefox/addon/copper-270430/

M2M Community
Telefónica Digital

?
9
07

Scenario1: Step 3

1.3) Test Firefox Copper with a CoAP server available in the Internet:
coap://vs0.inf.ethz.ch:5683/

M2M Community
Telefónica Digital

10
08

Scenario1: Step 3b

1.3b) GET operation (of a long resource: 5x64bytes blocks):
coap://vs0.inf.ethz.ch:5683/

M2M Community
Telefónica Digital

11
09

Scenario1: Steps 4 & 5

1.4) Install z-way-server & configure z-wave devices w/ RaspberryPI.
pi@raspberrypi:~$ wget -q -O - razberry.z-wave.me/install | sudo bash

To test installation: http://[IP_address]:8083

1.5) Install libcoap4.0.1 run server example in RaspberryPI.
Download libcoap-4.0.1.tar.gz - http://sourceforge.net/projects/libcoap/
pi@raspberrypi:~$ tar xvzf libcoap-4.0.1.tar.gz
pi@raspberrypi:~$ cd libcoap-4.0.1
pi@raspberrypi:~$ ./configure
pi@raspberrypi:~$make

M2M Community
Telefónica Digital

12

Recommended for you

IoT transport protocols
IoT transport protocolsIoT transport protocols
IoT transport protocols

This document discusses various Internet of Things (IoT) protocols. It defines IoT as interconnected devices that can transmit and receive data over a network. It then covers common network topologies and constraints of IoT devices. Several wireless protocols are described in detail, including their typical range, power usage, data rates, and costs. Popular protocols for messaging (MQTT) and REST-like interfaces (CoAP) are also summarized. The document aims to provide an overview of the IoT protocol landscape to help people get started with IoT development.

iotwpantransport
5G Edge Computing IoT Presentation
5G Edge Computing IoT Presentation 5G Edge Computing IoT Presentation
5G Edge Computing IoT Presentation

John Chiappetta prezo on 5G EdgeComputing and IoT and how interdependent they are. Held Nov 19, 2019 at Milton Education Village Innovation Centre, Milton, Ontario, Canada. Learn more here: https://siliconhalton.com/event/meetup-119-what-is-5g-and-edge-computing/

5giotedge
IoT Communication Protocols
IoT Communication ProtocolsIoT Communication Protocols
IoT Communication Protocols

This slide features the list of communication protocols that are suitable for Internet of things. It features from http to CoAP

iotpradeepkumarnsnamcom
10

Scenario1: Steps 4 & 5

1.6) Run CoAP server example in RaspberryPI.

M2M Community
Telefónica Digital

13
11

Scenario1: Step 6
1.6) Test against our RasPI server with Firefox Copper:
coap://[2a02:9113:****:1f00:b***:****:****:***f]:5683/

M2M Community
Telefónica Digital

14
12

Scenario1: Step 6b

1.6b) Discover resources of our CoAP-RasPI server with Firefox Copper:
coap://[2a02:9113:****:1f00:b***:****:****:***f]:5683/

M2M Community
Telefónica Digital

15
13

Scenario1: Step 6c

1.6c) GET operation (Firefox Copper):
coap://[2a02:9113:****:1f00:b***:****:****:***f]:5683/

M2M Community
Telefónica Digital

16

Recommended for you

Internet of things (iot)
Internet of things (iot)Internet of things (iot)
Internet of things (iot)

This document provides an introduction to the Internet of Things (IOT). It defines IOT as the collection of physical devices connected over the internet that can exchange data with less human involvement. The history and key technologies that enabled IOT are discussed, including wireless sensor networks, RFID, and cloud computing. The document also outlines the typical architecture of an IOT system including sensing, network, service, and application layers. Common IOT standards, protocols, and applications are summarized along with research areas and challenges in IOT development.

iot
Cisco Internet of Things
Cisco Internet of ThingsCisco Internet of Things
Cisco Internet of Things

This document summarizes Cisco's Internet of Things (IoT) solutions and strategy. It notes that IoT adoption is growing rapidly, with 50 billion smart devices projected by 2020. Cisco's IoT system provides an integrated architecture to connect devices, aggregate and analyze data, and deliver business outcomes across industries like manufacturing, transportation, utilities and more. The system includes components for edge computing, security, analytics and application enablement to help customers build customized IoT solutions. Cisco is working with partners to develop its IoT portfolio and address the complex challenges of IoT projects.

eps2015
Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6

This document discusses various techniques for transitioning from IPv4 to IPv6, including dual stacking, tunneling, and translation services. It provides examples of configuring dual stacking and manual IPv6 tunnels on Cisco routers to connect isolated IPv6 networks over an IPv4 infrastructure. Dual stacking allows hosts and devices to run both IPv4 and IPv6 simultaneously, while tunneling encapsulates IPv6 packets in IPv4 to enable connectivity across non-IPv6 networks. The document demonstrates establishing an IPv6 tunnel between two routers and routing IPv6 packets over the tunnel using RIPng.

14

Scenario1: Step 6d

1.6d) OBSERVE operation (PUSH Notifications) (Firefox Copper):
coap://[2a02:9113:****:1f00:b***:****:****:***f]:5683/

M2M Community
Telefónica Digital

17
15

Scenario1: Step 7

1.7) Modify server example to create CoAP resources based on z-wave dev:

- Follow IPSO Alliance Recs:
http://www.ipso-alliance.org/wp-content/media/draft-ipso-app-framework-04.pdf

M2M Community
Telefónica Digital

18
16

Scenario1: Implementing all this in FI-WARE

We are updating some FI-WARE IoT Ges to support this:
- “FIGWAY” SW to export CoAP resources too.

https://github.com/telefonicaid/fiware-raspberryPI-M2M-Gateway
M2M Community
Telefónica Digital

19
17

Scenario1: A nice Project out there

WEBIPOI – Exports RasPI GPIO (wired) devices (CoRE & REST)
http://code.google.com/p/webiopi/wiki/INTRODUCTION

M2M Community
Telefónica Digital

?
20

Recommended for you

Cluster and Grid Computing
Cluster and Grid ComputingCluster and Grid Computing
Cluster and Grid Computing

Cluster Computing Architecture Key Components Grid Computing Architecture Key Components Resource Management Discovery QoS Support Scheduling

resource managementgrid computingcluster
An introduction to M2M / IoT technologies
An introduction to M2M / IoT technologiesAn introduction to M2M / IoT technologies
An introduction to M2M / IoT technologies

This 2 x 3-hour course was recently taught to Electronics, Systems and Telecommunications "Master 2" students, at University of Nice.

iotm2m
RFID with INTERNET OF THINGS
RFID with INTERNET OF THINGSRFID with INTERNET OF THINGS
RFID with INTERNET OF THINGS

This document discusses RFID and the Internet of Things (IoT). It describes RFID as an automatic identification technology that uses radio waves to identify objects. The IoT allows physical objects to be connected to the internet and be remotely monitored and controlled. The architecture of an IoT system generally has three layers - a perception layer to collect data from sensors and RFID tags, a network layer to transmit the information, and a service layer to process and analyze the data. RFID has applications in various fields including healthcare, transportation, and access control. Challenges to the wider adoption of RFID include collision problems, security issues, and high tag costs.

internet of thingsiot layersiot
18

Scenario2: CoAP (6LowPAN) Devices!
Two (or more) Contiki-supported motes

…

http://www.contiki-os.org/hardware.html
http://www.advanticsys.com/
http://www.zolertia.com
http://www.libelium.com (own Stack / OS)

“Nooliberry” -> 6LowPAN RasPI GPIO card
Your laptop
- MACOSX, Linux, Windows…

Install Instant-Contiki VM in your Laptop
http://www.contiki-os.org/start.html

App coding:
- Device: expose REST Resources over CoAP
- Client: consume REST Resources (CoAP or HTTP)
Web development as usual! Examples:
https://github.com/contiki-os/contiki/blob/master/examples/rest-example/coap?
M2M Community
Telefónica Digital

client-server-example.csc
21
19

Scenario2: How it looks like?

M2M Community
Telefónica Digital

22
20

Scenario2: Who’re already on board?

“Talking at CES today, Cerf described his home's
sensor network, which uses IPv6 radios and the
Arch Rock PhyNet smart grid system to track
information like light levels, temperature, and
humidity. This is important for a wine cellar…”

M2M Community
Telefónica Digital

23
II. Constrained
Application
Protocol

Recommended for you

Private Cloud Architecture
Private Cloud ArchitecturePrivate Cloud Architecture
Private Cloud Architecture

The document discusses the private cloud architecture being implemented at the University of the Witwatersrand. It outlines plans to build a private cloud infrastructure using open source technologies like OpenStack, Fedora, iRODS and Zimbra. The cloud will provide scalable compute and storage resources along with hosted services and a digital archive. Key steps are identifying support staff, collaborating with technology partners, and having the initial infrastructure in place by mid-November.

infrastructureafricacloud
Internet of Things with Cloud Computing and M2M Communication
Internet of Things with Cloud Computing and M2M CommunicationInternet of Things with Cloud Computing and M2M Communication
Internet of Things with Cloud Computing and M2M Communication

The IoT is the network of physical objects with intelligence. It can be more secure with MQTT protocol for Machine to Machine Communication and more storage capability can be achieved by using cloud computing.

internet of thingsm2m communicationiot
Sap sap so h 2013
Sap sap so h 2013Sap sap so h 2013
Sap sap so h 2013

This document discusses how SAP applications and IT landscapes are changing with the adoption of in-memory computing technologies like SAP HANA. It presents examples of how SAP HANA allows organizations to deliver real-time value by enabling smarter, faster and simpler business processes, interactions and reporting. The document also outlines the evolution of enterprise architectures and data center landscapes towards a consolidated environment on SAP HANA that can optimize transactional and analytical workloads.

hanasapolap
01

CoAP: Constrained Application Protocol
Internet
Constrained Enviroments




Low-power
Lossy, high packet error rates
Low thtoughpunt of 10s of kbps

Sensor
Resources

CoAP

HTTP

Proxy

Server

HTTP

Client

CoAP
UDP
6LoWPAN
802.15.4





Contiki, Tiny OS, …
8-bit microcontrollers
Aprox. 100KB of RAM for code,
heap, data…
No filesystem

CoAP is an application layer protocol that enables web services for even the
most constrained devices and networks, while integrating with the web
architecture and HTTP.
M2M Community
Telefónica Digital

25
02

CoAP: Designed for M2M

•

CoAP implements the REST architectural style:
 can be transparently mapped to HTTP

•

CoAP goes beyond HTTP providing:






M2M Community
Telefónica Digital

Very low over-head, avoids the need of IPv6 fragmentation
Built-in discovery of services and resources
Multicast support
Asynchronous messages exchanges
Native push notification

26
02

CoAP: The Web Architecture vs CoAP Architecture
The interaction model of CoAP is similar to the client/server model of
the Web. However, M2M interactions typically result in a CoAP
implementation acting in both client and server roles.

M2M Community
Telefónica Digital

27
03

CoAP: Messaging Model

•
•
•
•

•
•

•

Short fixed-length binary header (4bytes)
Messages must fit in a single IP datagram
 Default IP: 1280bytes,
 6LoWPAN and IEEE802.15.4 127bytes

Messages can be confirmable (CON) or non confirmable (NON).
Naturally runs over UDP and supports :
 multicast IP destination addresses
 DTLS security

Piggy-backed REST request/response
 The response to a CON message is carried in the ACK

Request methods: GET, PUT, POST, and DELETE almost as in
HTTP.
Response methods: 2.xx (success), 4.xx (client error), 5.xx (server
error).

M2M Community
Telefónica Digital

28

Recommended for you

Internet of Things (IoT) protocols COAP MQTT OSCON2014
Internet of Things (IoT) protocols  COAP MQTT OSCON2014Internet of Things (IoT) protocols  COAP MQTT OSCON2014
Internet of Things (IoT) protocols COAP MQTT OSCON2014

Introduction to protocols for the Internet of Things. Constrained Environment. Constrained Application Protocol (CoAP) and MQTT Protocol.

coap mqtt constrained internet iot oma lwdm
Predictive Analytics: Context and Use Cases
Predictive Analytics: Context and Use CasesPredictive Analytics: Context and Use Cases
Predictive Analytics: Context and Use Cases

This document provides an overview of predictive analytics, including its evolution, definition, process, tools and techniques. It discusses how predictive analytics is being used across various industries to optimize outcomes, increase revenue and reduce costs. Specific use cases are outlined, such as using IoT sensor data and predictive models to improve risk calculations for auto insurance, optimize energy usage in buildings, enhance customer recommendations, and optimize policy interventions. Business cases focus on how companies in various sectors leverage customer data and predictive analytics to increase digital marketing effectiveness, revenues, and customer loyalty. Overall, the document examines current and emerging applications of predictive analytics across different domains.

predictive analyticsa/b testingdata mining
Blockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis GuardaBlockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis Guarda

Blockchain in IOT And other considerations: IoT, Business Strategy, Tech, Security and Blockchain as a foundation tech How to manage IoT / Blockchain for business strategy, technical set up, security, plus blockchain The natural tech evolution marriage that has yet to properly consummate? Why IOT products may not live up to their promise and how to overcome these to build successful IoT / Blockchain products.

blockchainsecuritycyber security
04

CoAP: Sub-layers

Source: Matthias Kovatsch

M2M Community
Telefónica Digital

29
05

CoAP: Unreliable Transmission

•
•
•

Tipically, repeated readings from a sensor
If server lacks context to answer the request, sends Reset (RST)
Client can send the same mesage several times to ensure it reaches
the server

M2M Community
Telefónica Digital

30
06

CoAP: Observing resources without reliability
Source: Klaus Hartke

M2M Community
Telefónica Digital

31
07

CoAP: Reliable Transmission

•

Normally bounded to non-reliable transport protocols, CoAP
implements a lightweight reliability mechanism based on:
 Stop&wait retransmisssion for CON
 Duplicated detection for CON and NON

M2M Community
Telefónica Digital

32

Recommended for you

Supply Chain Strategy
Supply Chain StrategySupply Chain Strategy
Supply Chain Strategy

This document provides an overview of supply chain strategy and how it relates to business strategy. It discusses various views on defining supply chain strategy, including: - Matching supply chain strategy to product characteristics, such as using efficient supply chains for functional products and responsive supply chains for innovative products. - Considering demand and supply uncertainty, such as using agile supply chains for high supply and demand uncertainty. - Examining market characteristics and using lean strategies for stable markets with predictable demand, and agile strategies for dynamic markets with unpredictable demand. - The concept of "leagile", using elements of both lean and agile strategies such as applying lean upstream and agile downstream. The document serves as an introduction to

supply chain managementstrategic managementsupply chain strategy
CBGTBT - Part 1 - Workshop introduction & primer
CBGTBT - Part 1 - Workshop introduction & primerCBGTBT - Part 1 - Workshop introduction & primer
CBGTBT - Part 1 - Workshop introduction & primer

A Complete Beginners Guide to Blockchain Technology Part 1 of 6. Slides from the #StartingBlock2015 tour by @blockstrap Part 1: http://www.slideshare.net/Blockstrap/cbgtbt-part-1-workshop-introduction-primer Part 2: http://www.slideshare.net/Blockstrap/02-blockchains-101 Part 3: http://www.slideshare.net/Blockstrap/03-transactions-101 Part 4: http://www.slideshare.net/Blockstrap/cbgtbt-part-4-mining Part 5: http://www.slideshare.net/Blockstrap/05-blockchains-102 Part 6: http://www.slideshare.net/Blockstrap/06-transactions-102

blockstrapblockchainbitcoin
KONG-APIGateway.pptx
KONG-APIGateway.pptxKONG-APIGateway.pptx
KONG-APIGateway.pptx

Kong is a scalable, open source API Platform (also known as an API Gateway or API Middleware). Kong was originally built by Kong Inc. (formerly known as Mashape) to secure, manage, and extend over 15,000 Microservices for its API Marketplace, which generates billions of requests per month.

apiapi-gatewaydocker
08

CoAP: Observing resources with reliability
Source: Klaus Hartke

M2M Community
Telefónica Digital

33
09

CoAP:
Request/Response
Rules

M2M Community
Telefónica Digital

Source: http://www.coapsharp.com
34
10

CoAP: Message Format

Source: Matthias Kovatsch
M2M Community
Telefónica Digital

35
11

CoAP: Proxying and Caching

•

CoAP supports caching





Cacheability determined by response code
An option number mask determines if it is a cache key.
Max-age option indicates cache lifetime
Validity checked using the Etag Option

•

Caching can be at endpoint or intermediary (proxy).

•

Proxy can be used to
 Improve performance (reduce network load)
 Access sleeping nodes
 Security reasons

•

Very easy mapping CoAP (Cross-protocol-proxy)HTTP

M2M Community
Telefónica Digital

36

Recommended for you

Practice of large Hadoop cluster in China Mobile
Practice of large Hadoop cluster in China MobilePractice of large Hadoop cluster in China Mobile
Practice of large Hadoop cluster in China Mobile

China Mobile Limited is the leading telecommunications services provider in China, with more than 800 million active users. In China Mobile, distributed big data clusters are built by branch companies in each province for their unique requirements. Meanwhile, we have built a centralized Hadoop cluster with scale more than 1600 nodes, on which we collect data from dozens of distributed clusters and make analysis for our business. In this session, we will introduce the architecture of the centralized Hadoop cluster and experience of constructing and tuning this large scale Hadoop cluster. Key points are as follows: 1. About Ambari: we improve Ambari with features like supporting HDFS Federation and Ambari HA , improving its performance and enabling it to support up to 1600 nodes. 2. About HDFS: we build a large HDFS cluster with data up to 60PB, using federation, ViewFS, FairCallQueue. Our best practice of cluster operation and management will also be included. 3. About Flume: We use the reformed Flume to collect data as much as 200TB per day. Speakers Yuxuan Pan, Software Engineer, China Mobile Software Technology Duan Yunfeng, Chief Designer of China Mobile's big data system, China Mobile Communications Corporation

apache hadoopapache ambariapache flume
How to run a bank on Apache CloudStack
How to run a bank on Apache CloudStackHow to run a bank on Apache CloudStack
How to run a bank on Apache CloudStack

Presentation for CloudStack Collaboration Conference 2014 Budapest. How we run a bank on CloudStack and how we came to that design.

apache cloudstack banking regulatory requirements
The constrained application protocol (coap)
The constrained application protocol (coap)The constrained application protocol (coap)
The constrained application protocol (coap)

The CoAP protocol allows for resource-constrained networks and nodes to use RESTful web transfers. It uses UDP as a transport protocol and supports methods like GET, POST, PUT, and DELETE. CoAP messages use a simple header format and can include options to provide information like the URI of a requested resource. The protocol supports features like asynchronous messaging, built-in discovery of resources, and optional block transfers to handle larger payloads. Implementations of CoAP are available in several programming languages and it has been integrated into commercial IoT systems and devices.

urluricoap
12

CoAP: Proxying and Caching

M2M Community
Telefónica Digital

37
13

CoAP: Endpoints and URIs

•
•
•
•
•

A CoAP endpoint is a source or destination of a message.
URI representations for resources:
 coap-URI = "coap:" "//" <HOST> [ ":" <PORT> ] <PATH> [ "?" <QUERY> ]
 coaps-URI = "coaps:" "//" <HOST> [ ":" <PORT> ] <PATH> [ "?" <QUERY> ]

HOST can be an IP address or a registered name.
PORT where CoAP server is located (default CoAP port: 5683)
Example: coap://example.com:436/sensors/temp?min=10





M2M Community
Telefónica Digital

Host: example.com
Port: 436
Path: sensors/temp
Query: min=10

38
14

CoAP: Service and Resource Discovery
1. Discovering the servers:
 If unknown, the client has to learn HOST server

2. Discovering the resources
 The client queries the well known URI of the server on port 5683
 The server returns the list of resources in CoRE Link Format
GET /.well-known/core
<sensors/temp>;sz=512;title=Temperature Sensor;ct=50,
<actuators/jack>;sz=256;title=Hydraulic Jacks;ct=50

3. Both steps can be merged, querying the well known URI of “all
4.

CoAP nodes” using multicast address FF0X:0:0:0:0:0:0:C0A7
Resource Directories can be used
Related spec:
• RFC 5785 defines the a path prefix for "well-known locations“
• RFC 5988 defines the types of web links and a registry for them
• RFC 6690 defines a link format for user Web Link in CORE.

M2M Community
Telefónica Digital

39
15

CoAP: RESTful Group Communication

•

CoAP supports making requests to IP multicast groups in NON

•
•

Leisure time
CoAP does not support yet the use of multicast with security

M2M Community
Telefónica Digital

40

Recommended for you

The constrained application protocol (CoAP)
The constrained application protocol (CoAP)The constrained application protocol (CoAP)
The constrained application protocol (CoAP)

The Constrained Application Protocol (CoAP) is a RESTful web transfer protocol for resource-constrained networks and nodes. CoAP uses a simple binary message format carried over UDP that supports asynchronous messaging with optional message confirmation and retransmission. CoAP supports features like GET, POST, PUT, DELETE methods, URIs, content formats and codes that are similar to HTTP but optimized for constrained nodes and networks.

iotcommunicationm2m
Mphasis Digital POV - Emerging Open Standard Protocol stack for IoT
Mphasis Digital POV - Emerging Open Standard Protocol stack for IoTMphasis Digital POV - Emerging Open Standard Protocol stack for IoT
Mphasis Digital POV - Emerging Open Standard Protocol stack for IoT

1) The document discusses emerging open and standardized protocols for the Internet of Things (IoT), as IoT projects currently face challenges selecting technology stacks due to a lack of standardization. 2) It describes several standardized protocols for different layers of the TCP/IP model that are being used for IoT, including IEEE 802.15.4 for the network/link layer, 6LoWPAN for adapting IPv6 packets to IEEE 802.15.4 links, UDP and DTLS for the transport layer, and CoAP and MQTT for the application layer. 3) CoAP is presented as a specialized web transfer protocol for constrained environments like IoT, serving a similar purpose to HTTP with features tailored

IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...
IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...
IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...

gogo6 IPv6 Video Series. Event, presentation and speaker details below: EVENT gogoNET LIVE! 4: IPv6 & The Internet of Things. http://gogonetlive.com November 12 – 14, 201, Silicon Valley, California Agenda: http://gogonetlive.com/gogonetlive4-agenda.asp PRESENTATION IoT Field Area Network Solutions & Integration of IPv6 Standards Abstract: http://www.gogo6.com/profiles/blogs/my-presentation-at-gogolive-integration-of-ipv4-and-non-ip Presentation video: http://www.gogo6.com/video/iot-field-area-network-solutions-integration-of-ipv6-standards-by Interview video: http://www.gogo6.com/video/interview-with-carsten-bormann-at-gogonet-live-4-ipv6-iot-confere SPEAKER Patrick Grossetete - Technical Marketing Engineer (IoT), Cisco Bio/Profile: http://www.gogo6.com/profile/PatrickGrossetete MORE Learn more about IPv6 on the gogoNET social network and our online training courses http://www.gogo6.com/main Get free IPv6 connectivity with Freenet6 http://www.gogo6.com/Freenet6 Subscribe to the gogo6 IPv6 Channel on YouTube http://www.youtube.com/subscription_center?add_user=gogo6videos Follow gogo6 on Twitter http://twitter.com/gogo6inc Like gogo6 on Facebook http://www.facebook.com/pages/IPv6-products-community-and-services-gogo6/161626696777

“internet of things”gogonet“about ipv6”
16

CoAP: Security

•
•

•
•
•
•

•

CoAP is secured using Datagram TLS (RFC6347) over UDP.
The endpoint initiates session to the server and, after the DTLS
handshake, it can send the 1st CoAP request.
All CoAP messages are sent as DTLS “application data”.
DTLS adds a limited per-datagram overhead of aprox 13 bytes.
Security info (e.g. keys, ACLs) must be provided during the
provisioning of the device.
The device can be in 1 of 4 security modes:
 NoSec: DTLS is disabled. Can be combined with alternative security
(e.g. IPSEC)
 PreSharedKey: DTLS enabled, preshared keys authenticate peers or
groups of peers.
 RawPublicKey: DTLS enabled, asymmetric keys without certificate.
 Certificate: DTLS enabled, asymmetric keys with x.509 certificate.

DTLS is not appropriate to group keying (multicast).

M2M Community
Telefónica Digital

41
17

CoAP: Status, Advantages and Limitations

•

Proposed standard since July, 2013: draft-ietf-core-coap-18.

•

Advantages:





•

Designed for M2M, IoT
Easily mapped to HTTP, compatible with Proxy infrastructures.
Easy to map legacy protocols to CoAP
Extensions: push notifications, discovery and Multicast.

Limitations and work in progress:
 End to end secure connection required for CoAP/HTTP mapping at a
proxy using DTLS/TLS.
 Securing multicast communications.
 Semantics should be standardized.
 Caching of requests should also be allowed

M2M Community
Telefónica Digital

42
18

CoAP: available implementations

•

Implementations







•

•

Contiki-2.6: Erbium http://www.contiki-os.org/
C: libcoap http://sourceforge.net/projects/libcoap/develop
.NET (C#): CoAPSharp http://www.coapsharp.com/
Python: http://sourceforge.net/projects/coapy
JAVA: Californium https://github.com/mkovatsc/Californium
Firefox JavaScript browser plugin: Copper
https://github.com/mkovatsc/Copper,
https://addons.mozilla.org/de/firefox/addon/copper-270430/

Proxies:
 Squid 3.1.9 with transparent HTTP-CoAP mapping module
http://telecom.dei.unipd.it/pages/read/90/
 jcoap Proxy http://code.google.com/p/jcoap/
 Californium cf-proxy https://github.com/mkovatsc/Californium

Updated List:
http://en.wikipedia.org/wiki/Constrained_Application_Protocol#Implementati
ons

M2M Community
Telefónica Digital

43
CoAP Course for m2m and Internet of Things scenarios

Recommended for you

Generic network architecture discussion
Generic network architecture discussionGeneric network architecture discussion
Generic network architecture discussion

DIscussion of RINA principles, research results, implementations and demos. Presented at ETSI ISG NGP meeting # 8

rinanetwork architecturemobility
Event Detection Pipelines with Apache Kafka
Event Detection Pipelines with Apache KafkaEvent Detection Pipelines with Apache Kafka
Event Detection Pipelines with Apache Kafka

The document discusses using Apache Kafka for event detection pipelines. It describes how Kafka can be used to decouple data pipelines and ingest events from various source systems in real-time. It then provides an example use case of using Kafka, Hadoop, and machine learning for fraud detection in consumer banking, describing the online and offline workflows. Finally, it covers some of the challenges of building such a system and considerations for deploying Kafka.

apache hadoophadoophadoop summit
Deploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsDeploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack Environments

The document discusses deploying IPv6 in OpenStack environments. It covers topics like tenant IPv6 addressing using SLAAC, stateless DHCPv6, and stateful DHCPv6. It also discusses provider networks, IPv6-only networks, IPv6 prefix delegation, and using IPv6 with Heat and L3 high availability. The agenda provides reference material and GitHub links for IPv6 Heat templates. Examples are given for creating tenant networks using different IPv6 addressing modes in Neutron. Captures from network sniffers show the router advertisements and DHCP messages used to configure IPv6 addresses and options.

openstack ipv6

More Related Content

What's hot

Protocols for IoT
Protocols for IoTProtocols for IoT
Protocols for IoT
Amit Dev
 
IoT Meets the Cloud: The Origins of Edge Computing
IoT Meets the Cloud:  The Origins of Edge ComputingIoT Meets the Cloud:  The Origins of Edge Computing
IoT Meets the Cloud: The Origins of Edge Computing
Maria Gorlatova
 
Network Virtualization in Cloud Data Centers
Network Virtualization in Cloud Data CentersNetwork Virtualization in Cloud Data Centers
Network Virtualization in Cloud Data Centers
rjain51
 
IoT Networking
IoT NetworkingIoT Networking
IoT Networking
Hitesh Mohapatra
 
1. Introduction to IoT
1. Introduction to IoT1. Introduction to IoT
1. Introduction to IoT
Abhishek Das
 
Internet of thing (IoT and cloud convergence opportunitis and challenges
 Internet of thing (IoT and cloud convergence opportunitis and challenges  Internet of thing (IoT and cloud convergence opportunitis and challenges
Internet of thing (IoT and cloud convergence opportunitis and challenges
Dr.-Ing Abdur Rahim Biswas
 
Market oriented Cloud Computing
Market oriented Cloud ComputingMarket oriented Cloud Computing
Market oriented Cloud Computing
Jithin Parakka
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
Julien Vermillard
 
Iot presentation
Iot presentationIot presentation
Iot presentation
huma742446
 
IoT transport protocols
IoT transport protocolsIoT transport protocols
IoT transport protocols
Gwenole Gendrot
 
5G Edge Computing IoT Presentation
5G Edge Computing IoT Presentation 5G Edge Computing IoT Presentation
5G Edge Computing IoT Presentation
Rick Stomphorst
 
IoT Communication Protocols
IoT Communication ProtocolsIoT Communication Protocols
IoT Communication Protocols
Pradeep Kumar TS
 
Internet of things (iot)
Internet of things (iot)Internet of things (iot)
Internet of things (iot)
sankar s
 
Cisco Internet of Things
Cisco Internet of ThingsCisco Internet of Things
Cisco Internet of Things
Panduit
 
Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6
Jhoni Guerrero
 
Cluster and Grid Computing
Cluster and Grid ComputingCluster and Grid Computing
Cluster and Grid Computing
Sayed Chhattan Shah
 
An introduction to M2M / IoT technologies
An introduction to M2M / IoT technologiesAn introduction to M2M / IoT technologies
An introduction to M2M / IoT technologies
Pascal Bodin
 
RFID with INTERNET OF THINGS
RFID with INTERNET OF THINGSRFID with INTERNET OF THINGS
RFID with INTERNET OF THINGS
Bino Mathew Varghese
 
Private Cloud Architecture
Private Cloud ArchitecturePrivate Cloud Architecture
Private Cloud Architecture
Derek Keats
 
Internet of Things with Cloud Computing and M2M Communication
Internet of Things with Cloud Computing and M2M CommunicationInternet of Things with Cloud Computing and M2M Communication
Internet of Things with Cloud Computing and M2M Communication
Sherin C Abraham
 

What's hot (20)

Protocols for IoT
Protocols for IoTProtocols for IoT
Protocols for IoT
 
IoT Meets the Cloud: The Origins of Edge Computing
IoT Meets the Cloud:  The Origins of Edge ComputingIoT Meets the Cloud:  The Origins of Edge Computing
IoT Meets the Cloud: The Origins of Edge Computing
 
Network Virtualization in Cloud Data Centers
Network Virtualization in Cloud Data CentersNetwork Virtualization in Cloud Data Centers
Network Virtualization in Cloud Data Centers
 
IoT Networking
IoT NetworkingIoT Networking
IoT Networking
 
1. Introduction to IoT
1. Introduction to IoT1. Introduction to IoT
1. Introduction to IoT
 
Internet of thing (IoT and cloud convergence opportunitis and challenges
 Internet of thing (IoT and cloud convergence opportunitis and challenges  Internet of thing (IoT and cloud convergence opportunitis and challenges
Internet of thing (IoT and cloud convergence opportunitis and challenges
 
Market oriented Cloud Computing
Market oriented Cloud ComputingMarket oriented Cloud Computing
Market oriented Cloud Computing
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
 
Iot presentation
Iot presentationIot presentation
Iot presentation
 
IoT transport protocols
IoT transport protocolsIoT transport protocols
IoT transport protocols
 
5G Edge Computing IoT Presentation
5G Edge Computing IoT Presentation 5G Edge Computing IoT Presentation
5G Edge Computing IoT Presentation
 
IoT Communication Protocols
IoT Communication ProtocolsIoT Communication Protocols
IoT Communication Protocols
 
Internet of things (iot)
Internet of things (iot)Internet of things (iot)
Internet of things (iot)
 
Cisco Internet of Things
Cisco Internet of ThingsCisco Internet of Things
Cisco Internet of Things
 
Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6
 
Cluster and Grid Computing
Cluster and Grid ComputingCluster and Grid Computing
Cluster and Grid Computing
 
An introduction to M2M / IoT technologies
An introduction to M2M / IoT technologiesAn introduction to M2M / IoT technologies
An introduction to M2M / IoT technologies
 
RFID with INTERNET OF THINGS
RFID with INTERNET OF THINGSRFID with INTERNET OF THINGS
RFID with INTERNET OF THINGS
 
Private Cloud Architecture
Private Cloud ArchitecturePrivate Cloud Architecture
Private Cloud Architecture
 
Internet of Things with Cloud Computing and M2M Communication
Internet of Things with Cloud Computing and M2M CommunicationInternet of Things with Cloud Computing and M2M Communication
Internet of Things with Cloud Computing and M2M Communication
 

Viewers also liked

Sap sap so h 2013
Sap sap so h 2013Sap sap so h 2013
Sap sap so h 2013
deepersnet
 
Internet of Things (IoT) protocols COAP MQTT OSCON2014
Internet of Things (IoT) protocols  COAP MQTT OSCON2014Internet of Things (IoT) protocols  COAP MQTT OSCON2014
Internet of Things (IoT) protocols COAP MQTT OSCON2014
Vidhya Gholkar
 
Predictive Analytics: Context and Use Cases
Predictive Analytics: Context and Use CasesPredictive Analytics: Context and Use Cases
Predictive Analytics: Context and Use Cases
Kimberley Mitchell
 
Blockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis GuardaBlockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis Guarda
Dinis Guarda
 
Supply Chain Strategy
Supply Chain StrategySupply Chain Strategy
Supply Chain Strategy
Behzad Behdani
 
CBGTBT - Part 1 - Workshop introduction & primer
CBGTBT - Part 1 - Workshop introduction & primerCBGTBT - Part 1 - Workshop introduction & primer
CBGTBT - Part 1 - Workshop introduction & primer
Blockstrap.com
 

Viewers also liked (6)

Sap sap so h 2013
Sap sap so h 2013Sap sap so h 2013
Sap sap so h 2013
 
Internet of Things (IoT) protocols COAP MQTT OSCON2014
Internet of Things (IoT) protocols  COAP MQTT OSCON2014Internet of Things (IoT) protocols  COAP MQTT OSCON2014
Internet of Things (IoT) protocols COAP MQTT OSCON2014
 
Predictive Analytics: Context and Use Cases
Predictive Analytics: Context and Use CasesPredictive Analytics: Context and Use Cases
Predictive Analytics: Context and Use Cases
 
Blockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis GuardaBlockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis Guarda
 
Supply Chain Strategy
Supply Chain StrategySupply Chain Strategy
Supply Chain Strategy
 
CBGTBT - Part 1 - Workshop introduction & primer
CBGTBT - Part 1 - Workshop introduction & primerCBGTBT - Part 1 - Workshop introduction & primer
CBGTBT - Part 1 - Workshop introduction & primer
 

Similar to CoAP Course for m2m and Internet of Things scenarios

KONG-APIGateway.pptx
KONG-APIGateway.pptxKONG-APIGateway.pptx
KONG-APIGateway.pptx
Agusto Sipahutar
 
Practice of large Hadoop cluster in China Mobile
Practice of large Hadoop cluster in China MobilePractice of large Hadoop cluster in China Mobile
Practice of large Hadoop cluster in China Mobile
DataWorks Summit
 
How to run a bank on Apache CloudStack
How to run a bank on Apache CloudStackHow to run a bank on Apache CloudStack
How to run a bank on Apache CloudStack
gjdevos
 
The constrained application protocol (coap)
The constrained application protocol (coap)The constrained application protocol (coap)
The constrained application protocol (coap)
Hamdamboy
 
The constrained application protocol (CoAP)
The constrained application protocol (CoAP)The constrained application protocol (CoAP)
The constrained application protocol (CoAP)
Hamdamboy (함담보이)
 
Mphasis Digital POV - Emerging Open Standard Protocol stack for IoT
Mphasis Digital POV - Emerging Open Standard Protocol stack for IoTMphasis Digital POV - Emerging Open Standard Protocol stack for IoT
Mphasis Digital POV - Emerging Open Standard Protocol stack for IoT
Aniruddha Chakrabarti
 
IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...
IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...
IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...
gogo6
 
Generic network architecture discussion
Generic network architecture discussionGeneric network architecture discussion
Generic network architecture discussion
ARCFIRE ICT
 
Event Detection Pipelines with Apache Kafka
Event Detection Pipelines with Apache KafkaEvent Detection Pipelines with Apache Kafka
Event Detection Pipelines with Apache Kafka
DataWorks Summit
 
Deploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsDeploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack Environments
Shannon McFarland
 
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networkingIntro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Packet
 
APIs at the Edge
APIs at the EdgeAPIs at the Edge
APIs at the Edge
Red Hat
 
Scaling the Container Dataplane
Scaling the Container Dataplane Scaling the Container Dataplane
Scaling the Container Dataplane
Michelle Holley
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
RX-M Enterprises LLC
 
DevCon 5 (July 2013) - WebSockets
DevCon 5 (July 2013) - WebSocketsDevCon 5 (July 2013) - WebSockets
DevCon 5 (July 2013) - WebSockets
Crocodile WebRTC SDK and Cloud Signalling Network
 
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Jakub Botwicz
 
Kafka talk
Kafka talkKafka talk
Kafka talk
Maheedhar Gunturu
 
Haystack + DASH7 Security
Haystack + DASH7 SecurityHaystack + DASH7 Security
Haystack + DASH7 Security
Haystack Technologies
 
Building the Internet of Things with Eclipse IoT - IoTBE meetup
Building the Internet of Things with Eclipse IoT - IoTBE meetupBuilding the Internet of Things with Eclipse IoT - IoTBE meetup
Building the Internet of Things with Eclipse IoT - IoTBE meetup
Benjamin Cabé
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
Evan McGee
 

Similar to CoAP Course for m2m and Internet of Things scenarios (20)

KONG-APIGateway.pptx
KONG-APIGateway.pptxKONG-APIGateway.pptx
KONG-APIGateway.pptx
 
Practice of large Hadoop cluster in China Mobile
Practice of large Hadoop cluster in China MobilePractice of large Hadoop cluster in China Mobile
Practice of large Hadoop cluster in China Mobile
 
How to run a bank on Apache CloudStack
How to run a bank on Apache CloudStackHow to run a bank on Apache CloudStack
How to run a bank on Apache CloudStack
 
The constrained application protocol (coap)
The constrained application protocol (coap)The constrained application protocol (coap)
The constrained application protocol (coap)
 
The constrained application protocol (CoAP)
The constrained application protocol (CoAP)The constrained application protocol (CoAP)
The constrained application protocol (CoAP)
 
Mphasis Digital POV - Emerging Open Standard Protocol stack for IoT
Mphasis Digital POV - Emerging Open Standard Protocol stack for IoTMphasis Digital POV - Emerging Open Standard Protocol stack for IoT
Mphasis Digital POV - Emerging Open Standard Protocol stack for IoT
 
IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...
IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...
IoT Field Area Network Solutions & Integration of IPv6 Standards by Patrick G...
 
Generic network architecture discussion
Generic network architecture discussionGeneric network architecture discussion
Generic network architecture discussion
 
Event Detection Pipelines with Apache Kafka
Event Detection Pipelines with Apache KafkaEvent Detection Pipelines with Apache Kafka
Event Detection Pipelines with Apache Kafka
 
Deploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsDeploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack Environments
 
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networkingIntro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networking
 
APIs at the Edge
APIs at the EdgeAPIs at the Edge
APIs at the Edge
 
Scaling the Container Dataplane
Scaling the Container Dataplane Scaling the Container Dataplane
Scaling the Container Dataplane
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
 
DevCon 5 (July 2013) - WebSockets
DevCon 5 (July 2013) - WebSocketsDevCon 5 (July 2013) - WebSockets
DevCon 5 (July 2013) - WebSockets
 
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
 
Kafka talk
Kafka talkKafka talk
Kafka talk
 
Haystack + DASH7 Security
Haystack + DASH7 SecurityHaystack + DASH7 Security
Haystack + DASH7 Security
 
Building the Internet of Things with Eclipse IoT - IoTBE meetup
Building the Internet of Things with Eclipse IoT - IoTBE meetupBuilding the Internet of Things with Eclipse IoT - IoTBE meetup
Building the Internet of Things with Eclipse IoT - IoTBE meetup
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
 

Recently uploaded

Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
Eric D. Schabell
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
SynapseIndia
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
Enterprise Wired
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 

Recently uploaded (20)

Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxRPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptx
 
7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf7 Most Powerful Solar Storms in the History of Earth.pdf
7 Most Powerful Solar Storms in the History of Earth.pdf
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 

CoAP Course for m2m and Internet of Things scenarios

  • 1. CoAP 6LowPAN & Raspberry Pi M2M Community Cristina Peña Alcega Carlos Ralli Ucendo Telefónica Digital 19.12.2013 (@CrisisP) (@carlosralli)
  • 2. Index I II DIY Scenarios & Solutions • Intro • Scenario #1: z-wave + REST • Scenario #2: 6LoWPAN + CoAP Behind the scenes: Constrained Application Protocol • Introduction and CoAP Architecture • Messaging Model, Sub-layers, Reliability, Request/Response rules, and • Proxying and Caching • Endpoints and URIs • Discovery • Multicast • Security • Status, advantages and limitations • Available implementations Message Format.
  • 3. I. DIY Scenarios & Solutions
  • 4. 01 How it all started… Things (Devices) are getting smarter, from Class-1 to Consumer Electronics. If a Thing is an Internet node, it’s subject of APIzation. REST is the most successful Internet/Web API. CoRE /CoAP So we decided to start ourselves investing some 480€ to play with: - 4 6LowPAN capable Motes (360€), 2 Raspberry PI (120€). - Plus lots of hours of DIY “fun”! M2M Community Telefónica Digital 4
  • 5. 02 Is CoAP Rocket Science? No, it’s just REST Traditional REST WEB APIs relays on HTTP-TCP-IP CoRE/CoAP = REST APIs over UDP-IP M2M Community Telefónica Digital 5
  • 6. 03 Scenario1: Building a CoAP (IoT) Gateway M2M Community Telefónica Digital 6
  • 7. 04 Scenario1: Software Architecture M2M Community Telefónica Digital 7
  • 8. 05 Scenario1: Step 1 1.1) Install & compile ccoap in your laptop https://github.com/ipflavors/ccoap/tree/master/doc M2M Community Telefónica Digital ? 8
  • 9. 06 Scenario1: Step 2 1.2) Install Firefox Navigator plus Copper (CU) Plugin https://addons.mozilla.org/en-US/firefox/addon/copper-270430/ M2M Community Telefónica Digital ? 9
  • 10. 07 Scenario1: Step 3 1.3) Test Firefox Copper with a CoAP server available in the Internet: coap://vs0.inf.ethz.ch:5683/ M2M Community Telefónica Digital 10
  • 11. 08 Scenario1: Step 3b 1.3b) GET operation (of a long resource: 5x64bytes blocks): coap://vs0.inf.ethz.ch:5683/ M2M Community Telefónica Digital 11
  • 12. 09 Scenario1: Steps 4 & 5 1.4) Install z-way-server & configure z-wave devices w/ RaspberryPI. pi@raspberrypi:~$ wget -q -O - razberry.z-wave.me/install | sudo bash To test installation: http://[IP_address]:8083 1.5) Install libcoap4.0.1 run server example in RaspberryPI. Download libcoap-4.0.1.tar.gz - http://sourceforge.net/projects/libcoap/ pi@raspberrypi:~$ tar xvzf libcoap-4.0.1.tar.gz pi@raspberrypi:~$ cd libcoap-4.0.1 pi@raspberrypi:~$ ./configure pi@raspberrypi:~$make M2M Community Telefónica Digital 12
  • 13. 10 Scenario1: Steps 4 & 5 1.6) Run CoAP server example in RaspberryPI. M2M Community Telefónica Digital 13
  • 14. 11 Scenario1: Step 6 1.6) Test against our RasPI server with Firefox Copper: coap://[2a02:9113:****:1f00:b***:****:****:***f]:5683/ M2M Community Telefónica Digital 14
  • 15. 12 Scenario1: Step 6b 1.6b) Discover resources of our CoAP-RasPI server with Firefox Copper: coap://[2a02:9113:****:1f00:b***:****:****:***f]:5683/ M2M Community Telefónica Digital 15
  • 16. 13 Scenario1: Step 6c 1.6c) GET operation (Firefox Copper): coap://[2a02:9113:****:1f00:b***:****:****:***f]:5683/ M2M Community Telefónica Digital 16
  • 17. 14 Scenario1: Step 6d 1.6d) OBSERVE operation (PUSH Notifications) (Firefox Copper): coap://[2a02:9113:****:1f00:b***:****:****:***f]:5683/ M2M Community Telefónica Digital 17
  • 18. 15 Scenario1: Step 7 1.7) Modify server example to create CoAP resources based on z-wave dev: - Follow IPSO Alliance Recs: http://www.ipso-alliance.org/wp-content/media/draft-ipso-app-framework-04.pdf M2M Community Telefónica Digital 18
  • 19. 16 Scenario1: Implementing all this in FI-WARE We are updating some FI-WARE IoT Ges to support this: - “FIGWAY” SW to export CoAP resources too. https://github.com/telefonicaid/fiware-raspberryPI-M2M-Gateway M2M Community Telefónica Digital 19
  • 20. 17 Scenario1: A nice Project out there WEBIPOI – Exports RasPI GPIO (wired) devices (CoRE & REST) http://code.google.com/p/webiopi/wiki/INTRODUCTION M2M Community Telefónica Digital ? 20
  • 21. 18 Scenario2: CoAP (6LowPAN) Devices! Two (or more) Contiki-supported motes … http://www.contiki-os.org/hardware.html http://www.advanticsys.com/ http://www.zolertia.com http://www.libelium.com (own Stack / OS) “Nooliberry” -> 6LowPAN RasPI GPIO card Your laptop - MACOSX, Linux, Windows… Install Instant-Contiki VM in your Laptop http://www.contiki-os.org/start.html App coding: - Device: expose REST Resources over CoAP - Client: consume REST Resources (CoAP or HTTP) Web development as usual! Examples: https://github.com/contiki-os/contiki/blob/master/examples/rest-example/coap? M2M Community Telefónica Digital client-server-example.csc 21
  • 22. 19 Scenario2: How it looks like? M2M Community Telefónica Digital 22
  • 23. 20 Scenario2: Who’re already on board? “Talking at CES today, Cerf described his home's sensor network, which uses IPv6 radios and the Arch Rock PhyNet smart grid system to track information like light levels, temperature, and humidity. This is important for a wine cellar…” M2M Community Telefónica Digital 23
  • 25. 01 CoAP: Constrained Application Protocol Internet Constrained Enviroments    Low-power Lossy, high packet error rates Low thtoughpunt of 10s of kbps Sensor Resources CoAP HTTP Proxy Server HTTP Client CoAP UDP 6LoWPAN 802.15.4     Contiki, Tiny OS, … 8-bit microcontrollers Aprox. 100KB of RAM for code, heap, data… No filesystem CoAP is an application layer protocol that enables web services for even the most constrained devices and networks, while integrating with the web architecture and HTTP. M2M Community Telefónica Digital 25
  • 26. 02 CoAP: Designed for M2M • CoAP implements the REST architectural style:  can be transparently mapped to HTTP • CoAP goes beyond HTTP providing:      M2M Community Telefónica Digital Very low over-head, avoids the need of IPv6 fragmentation Built-in discovery of services and resources Multicast support Asynchronous messages exchanges Native push notification 26
  • 27. 02 CoAP: The Web Architecture vs CoAP Architecture The interaction model of CoAP is similar to the client/server model of the Web. However, M2M interactions typically result in a CoAP implementation acting in both client and server roles. M2M Community Telefónica Digital 27
  • 28. 03 CoAP: Messaging Model • • • • • • • Short fixed-length binary header (4bytes) Messages must fit in a single IP datagram  Default IP: 1280bytes,  6LoWPAN and IEEE802.15.4 127bytes Messages can be confirmable (CON) or non confirmable (NON). Naturally runs over UDP and supports :  multicast IP destination addresses  DTLS security Piggy-backed REST request/response  The response to a CON message is carried in the ACK Request methods: GET, PUT, POST, and DELETE almost as in HTTP. Response methods: 2.xx (success), 4.xx (client error), 5.xx (server error). M2M Community Telefónica Digital 28
  • 29. 04 CoAP: Sub-layers Source: Matthias Kovatsch M2M Community Telefónica Digital 29
  • 30. 05 CoAP: Unreliable Transmission • • • Tipically, repeated readings from a sensor If server lacks context to answer the request, sends Reset (RST) Client can send the same mesage several times to ensure it reaches the server M2M Community Telefónica Digital 30
  • 31. 06 CoAP: Observing resources without reliability Source: Klaus Hartke M2M Community Telefónica Digital 31
  • 32. 07 CoAP: Reliable Transmission • Normally bounded to non-reliable transport protocols, CoAP implements a lightweight reliability mechanism based on:  Stop&wait retransmisssion for CON  Duplicated detection for CON and NON M2M Community Telefónica Digital 32
  • 33. 08 CoAP: Observing resources with reliability Source: Klaus Hartke M2M Community Telefónica Digital 33
  • 35. 10 CoAP: Message Format Source: Matthias Kovatsch M2M Community Telefónica Digital 35
  • 36. 11 CoAP: Proxying and Caching • CoAP supports caching     Cacheability determined by response code An option number mask determines if it is a cache key. Max-age option indicates cache lifetime Validity checked using the Etag Option • Caching can be at endpoint or intermediary (proxy). • Proxy can be used to  Improve performance (reduce network load)  Access sleeping nodes  Security reasons • Very easy mapping CoAP (Cross-protocol-proxy)HTTP M2M Community Telefónica Digital 36
  • 37. 12 CoAP: Proxying and Caching M2M Community Telefónica Digital 37
  • 38. 13 CoAP: Endpoints and URIs • • • • • A CoAP endpoint is a source or destination of a message. URI representations for resources:  coap-URI = "coap:" "//" <HOST> [ ":" <PORT> ] <PATH> [ "?" <QUERY> ]  coaps-URI = "coaps:" "//" <HOST> [ ":" <PORT> ] <PATH> [ "?" <QUERY> ] HOST can be an IP address or a registered name. PORT where CoAP server is located (default CoAP port: 5683) Example: coap://example.com:436/sensors/temp?min=10     M2M Community Telefónica Digital Host: example.com Port: 436 Path: sensors/temp Query: min=10 38
  • 39. 14 CoAP: Service and Resource Discovery 1. Discovering the servers:  If unknown, the client has to learn HOST server 2. Discovering the resources  The client queries the well known URI of the server on port 5683  The server returns the list of resources in CoRE Link Format GET /.well-known/core <sensors/temp>;sz=512;title=Temperature Sensor;ct=50, <actuators/jack>;sz=256;title=Hydraulic Jacks;ct=50 3. Both steps can be merged, querying the well known URI of “all 4. CoAP nodes” using multicast address FF0X:0:0:0:0:0:0:C0A7 Resource Directories can be used Related spec: • RFC 5785 defines the a path prefix for "well-known locations“ • RFC 5988 defines the types of web links and a registry for them • RFC 6690 defines a link format for user Web Link in CORE. M2M Community Telefónica Digital 39
  • 40. 15 CoAP: RESTful Group Communication • CoAP supports making requests to IP multicast groups in NON • • Leisure time CoAP does not support yet the use of multicast with security M2M Community Telefónica Digital 40
  • 41. 16 CoAP: Security • • • • • • • CoAP is secured using Datagram TLS (RFC6347) over UDP. The endpoint initiates session to the server and, after the DTLS handshake, it can send the 1st CoAP request. All CoAP messages are sent as DTLS “application data”. DTLS adds a limited per-datagram overhead of aprox 13 bytes. Security info (e.g. keys, ACLs) must be provided during the provisioning of the device. The device can be in 1 of 4 security modes:  NoSec: DTLS is disabled. Can be combined with alternative security (e.g. IPSEC)  PreSharedKey: DTLS enabled, preshared keys authenticate peers or groups of peers.  RawPublicKey: DTLS enabled, asymmetric keys without certificate.  Certificate: DTLS enabled, asymmetric keys with x.509 certificate. DTLS is not appropriate to group keying (multicast). M2M Community Telefónica Digital 41
  • 42. 17 CoAP: Status, Advantages and Limitations • Proposed standard since July, 2013: draft-ietf-core-coap-18. • Advantages:     • Designed for M2M, IoT Easily mapped to HTTP, compatible with Proxy infrastructures. Easy to map legacy protocols to CoAP Extensions: push notifications, discovery and Multicast. Limitations and work in progress:  End to end secure connection required for CoAP/HTTP mapping at a proxy using DTLS/TLS.  Securing multicast communications.  Semantics should be standardized.  Caching of requests should also be allowed M2M Community Telefónica Digital 42
  • 43. 18 CoAP: available implementations • Implementations       • • Contiki-2.6: Erbium http://www.contiki-os.org/ C: libcoap http://sourceforge.net/projects/libcoap/develop .NET (C#): CoAPSharp http://www.coapsharp.com/ Python: http://sourceforge.net/projects/coapy JAVA: Californium https://github.com/mkovatsc/Californium Firefox JavaScript browser plugin: Copper https://github.com/mkovatsc/Copper, https://addons.mozilla.org/de/firefox/addon/copper-270430/ Proxies:  Squid 3.1.9 with transparent HTTP-CoAP mapping module http://telecom.dei.unipd.it/pages/read/90/  jcoap Proxy http://code.google.com/p/jcoap/  Californium cf-proxy https://github.com/mkovatsc/Californium Updated List: http://en.wikipedia.org/wiki/Constrained_Application_Protocol#Implementati ons M2M Community Telefónica Digital 43