0% found this document useful (0 votes)
30 views16 pages

11 2 3-CoAP

CoAP is a lightweight application layer protocol developed by IETF for IoT devices, intended as a replacement for HTTP. It features low overhead, asynchronous message exchanges, and security through DTLS, supporting various message types and reliable transport. CoAP is designed to facilitate communication in constrained environments, making it suitable for smart devices in homes and other applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views16 pages

11 2 3-CoAP

CoAP is a lightweight application layer protocol developed by IETF for IoT devices, intended as a replacement for HTTP. It features low overhead, asynchronous message exchanges, and security through DTLS, supporting various message types and reliable transport. CoAP is designed to facilitate communication in constrained environments, making it suitable for smart devices in homes and other applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

R-Pi

Team Emertxe
IoT Protocols
CoAP
CoAP
Introduction

 Is one of the latest application layer protocol developed by IETF for smart devices to connect to Internet

 Many devices exist as components in vehicles and buildings with constrained resources, it leads a lot of variation in

power computing, communication bandwidth etc

 lightweight protocol CoAP is intended to be used and considered as a replacement of HTTP for being an IoT application

layer protocol
CoAP
Features

 Constrained web protocol fulfilling M2M requirements

 Security binding to DTLS(Datagram Transport Layer Security)

 Asynchronous message exchanges

 Low header overhead and parsing complexity

 URI and content type support

 Simple proxy and caching capabilities

 UDP binding with optional reliability supporting unicast and multicast requests
CoAP
Structure Model

 The bottom layer is Message layer that has been designed to deal with UDP and asynchronous switching

 The request/response layer concerns communication method and deal with request/response message
CoAP: Structure Model
Message Layer Model

 Message Layer supports 4 types of messages

 CON (confirmable)

 NON (non-confirmable)

 ACK (Acknowledgement)

 RST (Reset)
CoAP: Structure Model
Message Layer Model

 Reliable message transport

 Keep retransmission until get ACK with the same message ID (like 0x8c56 in fig.)
 Using default time out and decreasing counting time exponentially when transmitting CON
 If recipient fail to process message, it responses by replacing ACK with RST.
 Fig shows a reliable message transport
CoAP: Structure Model
Request/Response Layer Model

 Piggy-backed

 Client sends request using CON type or NON type message and receives response ACK with confirmable
message immediately
 fig. shows successful response, ACK contain response message (identify by using token), for failure response,
ACK contain failure response code
CoAP: Structure Model
Request/Response Layer Model

 Separate response

 If server receive a CON type message but not able to response this request immediately, it will send an empty
ACK in case of client resend this message
 When server ready to response this request, it will send a new CON to client and client reply a confirmable
message with acknowledgment
 ACK is just to confirm CON message, no matter CON message carry request or response
CoAP: Structure Model
Request/Response Layer Model

 Non confirmable request and response

 unlike Piggy-backed response carry confirmable message, in Non confirmable request client send NON type
message indicate that Server don't need to confirm
 Server will resend a NON type message with response
CoAP: Structure Model
Message Format

 CoAP is based on the exchange of compact messages that, by default, are transmitted over UDP (i.e. each CoAP

message occupies the data section of one UDP datagram)

 Message of CoAP uses simple binary format

 Message= fixed-size 4-byte header plus a variable-length Token plus a sequence of CoAP options plus payload
CoAP: Security + Application
Why use DTLS for CoAP Security

 CoAP is now becoming the standard protocol for IoT applications

 Security is important to protect the communication between devices

 A security protocol DTLS is introduced

 There are three main elements when considering security, namely integrity, authentication and confidentiality, DTLS can
achieve all of them

 DTLS employ TCP, which is too complex

 DTLS solves two problems

 reordering and packet lost

 It adds three implements

 packet retransmission

 assigning sequence number within the handshake

 replay detection
CoAP: Security + Application
Why use DTLS for CoAP Security

 DTLS in application layer protect end-to-end communication

 No end-to-end communication protection will make it easy for attacker to access to all text data that passes through a
compromised node

 DTLS also avoids cryptographic overhead problems that occur in lower layer security protocols
CoAP: Security + Application
Structure of DTLS
CoAP: Security + Application
Application for Smart Homes
THANK YOU

You might also like