IoT-Protocol CoAP
IoT-Protocol CoAP
(CoAP)
MMS
Institut Teknologi Del
Overview
• What is CoAP
• CoAP Message Format
• CoAP Implementation
• Architecture
• URI
• Reliable CoAP Transmission
• Service Discovery
What is CoAP
• Developed by IETF Contrained RESTful
Environments (CoRE) working group
• Generic framework for resource-oriented
application (constrained node and network)
• CoAP framework defines simple and flexible ways
to manipulate sensors and actuators for data or
device management
• RFCs
• RFC 7252 CoAP Protocol
• RFC 6690, 7641, 7959, 8075
CoAP Message format
• CoAP messaging model is to facilitate message
exchange over UDP endpoints
• Use DTLS (Datagram Transport Layer Security) for
message security
2 2 4 8 16 (bits)
Message Types
• Describe the datagram’s message type for the
request and response
• Request
• 0 : Confirmable : This message expects a corresponding
Acknowledgement message.
• 1 : Non-confirmable : This message does not expect a
confirmation message.
• Response
• 2 : Acknowledgement : This message is a response that
acknowledge a confirmable message
• 3 : Reset : This message indicates that it had received a
message but could not process it.
Message Code
• Similar to HTTP code, indicated the request method
and the response status
• REQUEST RESPONSE
• 001 GET 201 Created
• 002 POST 202 Deleted
• 003 PUT 203 Valid
• 004 DELETE 205 Changed
205 Content
coap://172.21.12.12:10000/.well-known/core
coap://californium.eclipse.org:5683/
coaps://localhost:2332/