SlideShare a Scribd company logo
1 of 13
CoAP
U & P U Patel Department of Computer Engineering
What Is CoAP Protocol?
• CoAP is an IoT protocol. CoAP stands for Constrained Application Protocol, and it is defined in RFC 7252.
• CoAP is a simple protocol with low overhead specifically designed for constrained devices (such as
microcontrollers) and constrained networks.
• Web transfer protocol for use with constrained nodes and networks.
• Designed for Machine to Machine (M2M) applications such as smart energy and building automation.
• Based on Request‐Response model between end‐points
• Client‐Server interaction is asynchronous over a datagram oriented transport protocol such as UDP
U & P U Patel Department of Computer Engineering
Features of CoAP protocols
• The main features of CoAP protocols are:
• Web protocol used in M2M with constrained requirements
• Asynchronous message exchange
• Low overhead and very simple to parse
• URI and content-type support
• Proxy and caching capabilities
U & P U Patel Department of Computer Engineering
Protocol Layers
• There are two different layers that make CoAp protocol:
Messages and Request/Response.
• The Messages layer deals with UDP and with
asynchronous messages.
• The Request/Response layer manages
request/response interaction based on
request/response messages.
• CoAP supports four different message types:
• Confirmable
• Non-confirmable
• Acknowledgment
• Reset
U & P U Patel Department of Computer Engineering
CoAP terminology
• Endpoint: An entity that participates in the CoAP protocol. Usually, an
Endpoint is identified with a host
• Sender: The entity that sends a message
• Recipient: The destination of a message
• Client: The entity that sends a request and the destination of the response
• Server: The entity that receives a request from a client and sends back a
response to the client
U & P U Patel Department of Computer Engineering
CoAP Messages Model
• This is the lowest layer of CoAP.
• This layer deals exchawith UDP nging messages between endpoints.
• Each CoAP message has a unique ID; this is useful to detect message
duplicates.
• A CoAP message is built by these parts:
• A binary header
• A compact options
• Payload
U & P U Patel Department of Computer Engineering
Confirmable message
Confirmable message
• A confirmable message is a reliable message.
• When exchanging messages between two endpoints,
these messages can be reliable.
• In CoAP, a reliable message is obtained using a
Confirmable message (CON).
• Using this kind of message, the client can be sure that
the message will arrive at the server.
• A Confirmable message is sent again and again until
the other party sends an acknowledge message (ACK).
• The ACK message contains the same ID of the
confirmable message (CON).
U & P U Patel Department of Computer Engineering
Rest message
• If the server has troubles
managing the incoming
request, it can send back a
Rest message (RST) instead of
the Acknowledge message
(ACK)
U & P U Patel Department of Computer Engineering
Non-confirmable messages
• The other message category is the Non-confirmable
(NON) messages.
• These are messages that don’t require an
Acknowledge by the server.
• They are unreliable messages or in other words
messages that do not contain critical information
that must be delivered to the server.
• To this category belongs messages that contain
values read from sensors.
• Even if these messages are unreliable, they have a
unique ID.
U & P U Patel Department of Computer Engineering
CoAp Request/Response Model
• The CoAP Request/Response is the second layer in the
CoAP abstraction layer.
• The request is sent using a Confirmable (CON) or Non-
Confirmable (NON) message.
• There are several scenarios depending on if the server
can answer immediately to the client request or the
answer if not available.
• If the server can answer immediately to the client
request, then if the request is carried using a
Confirmable message (CON), the server sends back to
the client an Acknowledge message containing the
response or the error code
• In the CoAP message, there is a Token. The Token is
different from the Message-ID and it is used to match
the request and the response.
U & P U Patel Department of Computer Engineering
CoAp Request/Response Model
• If the server can’t answer to the request coming
from the client immediately, then it sends an
Acknowledge message with an empty response.
• As soon as the response is available, then the
server sends a new Confirmable message to the
client containing the response.
• At this point, the client sends back an
Acknowledge message:
• If the request coming from the client is carried
using a NON-confirmable message, then the
server answer using a NON-confirmable message.
U & P U Patel Department of Computer Engineering
CoAp Message Format
Where:
• Ver: It is a 2 bit unsigned integer indicating the version
• T: it is a 2 length
• Code: It is the code bit unsigned integer indicating the message type: 0 confirmable, 1 non-
confirmable
• TKL: Token Length is the token 4 bit response (8 bit length)
• Message ID: It is the message ID expressed with 16 bit
U & P U Patel Department of Computer Engineering
References
https://dzone.com/articles/coap-protocol-step-by-step-guide
https://coap.technology/impls.html

More Related Content

Similar to InternetOFThings_network_communicqtionCoAP_.pptx

New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocolsNitesh Singh
 
Bench, a Framework for Benchmarking Kafka Using K8s and OpenMessaging Benchma...
Bench, a Framework for Benchmarking Kafka Using K8s and OpenMessaging Benchma...Bench, a Framework for Benchmarking Kafka Using K8s and OpenMessaging Benchma...
Bench, a Framework for Benchmarking Kafka Using K8s and OpenMessaging Benchma...HostedbyConfluent
 
Meetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practicesMeetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practicesAWS Vietnam Community
 
Cloud Messaging Service: Technical Overview
Cloud Messaging Service: Technical OverviewCloud Messaging Service: Technical Overview
Cloud Messaging Service: Technical OverviewMessaging Meetup
 
DevDay: Corda Enterprise: Journey to 1000 TPS per node, Rick Parker
DevDay: Corda Enterprise: Journey to 1000 TPS per node, Rick ParkerDevDay: Corda Enterprise: Journey to 1000 TPS per node, Rick Parker
DevDay: Corda Enterprise: Journey to 1000 TPS per node, Rick ParkerR3
 
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsBeyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsClemens Vasters
 
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017Mustafa AKIN
 
WSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2
 
Extensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCMExtensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCMMalwinder Singh
 
Cloud computing Module 2 First Part
Cloud computing Module 2 First PartCloud computing Module 2 First Part
Cloud computing Module 2 First PartSoumee Maschatak
 
Introducing MQ Light - IBM Interconnect 2015 session AME4181
Introducing MQ Light - IBM Interconnect 2015 session AME4181Introducing MQ Light - IBM Interconnect 2015 session AME4181
Introducing MQ Light - IBM Interconnect 2015 session AME4181Robert Nicholson
 
Architecting for the cloud scability-availability
Architecting for the cloud scability-availabilityArchitecting for the cloud scability-availability
Architecting for the cloud scability-availabilityLen Bass
 
Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Akshata Sawant
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit ivJAIGANESH SEKAR
 
HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...
 HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen... HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...
HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...Matt Leming
 

Similar to InternetOFThings_network_communicqtionCoAP_.pptx (20)

UNIT2_PPT.ppt
UNIT2_PPT.pptUNIT2_PPT.ppt
UNIT2_PPT.ppt
 
CoAP - Web Protocol for IoT
CoAP - Web Protocol for IoTCoAP - Web Protocol for IoT
CoAP - Web Protocol for IoT
 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocols
 
Bench, a Framework for Benchmarking Kafka Using K8s and OpenMessaging Benchma...
Bench, a Framework for Benchmarking Kafka Using K8s and OpenMessaging Benchma...Bench, a Framework for Benchmarking Kafka Using K8s and OpenMessaging Benchma...
Bench, a Framework for Benchmarking Kafka Using K8s and OpenMessaging Benchma...
 
Meetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practicesMeetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practices
 
Cloud Messaging Service: Technical Overview
Cloud Messaging Service: Technical OverviewCloud Messaging Service: Technical Overview
Cloud Messaging Service: Technical Overview
 
Java socket programming
Java socket programmingJava socket programming
Java socket programming
 
DevDay: Corda Enterprise: Journey to 1000 TPS per node, Rick Parker
DevDay: Corda Enterprise: Journey to 1000 TPS per node, Rick ParkerDevDay: Corda Enterprise: Journey to 1000 TPS per node, Rick Parker
DevDay: Corda Enterprise: Journey to 1000 TPS per node, Rick Parker
 
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsBeyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
 
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
 
WSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2 Message Broker - Product Overview
WSO2 Message Broker - Product Overview
 
Extensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCMExtensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCM
 
Cloud computing Module 2 First Part
Cloud computing Module 2 First PartCloud computing Module 2 First Part
Cloud computing Module 2 First Part
 
Introducing MQ Light - IBM Interconnect 2015 session AME4181
Introducing MQ Light - IBM Interconnect 2015 session AME4181Introducing MQ Light - IBM Interconnect 2015 session AME4181
Introducing MQ Light - IBM Interconnect 2015 session AME4181
 
Architecting for the cloud scability-availability
Architecting for the cloud scability-availabilityArchitecting for the cloud scability-availability
Architecting for the cloud scability-availability
 
Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20
 
Computer networks unit iv
Computer networks    unit ivComputer networks    unit iv
Computer networks unit iv
 
HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...
 HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen... HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...
HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...
 
RFID.pptx
RFID.pptxRFID.pptx
RFID.pptx
 
Remote procedure call
Remote procedure callRemote procedure call
Remote procedure call
 

More from 20CE112YASHPATEL

Data_Processing_and_communication_bluetooth.pptx
Data_Processing_and_communication_bluetooth.pptxData_Processing_and_communication_bluetooth.pptx
Data_Processing_and_communication_bluetooth.pptx20CE112YASHPATEL
 
Communication Technologies in IOT.pptx
Communication Technologies in IOT.pptxCommunication Technologies in IOT.pptx
Communication Technologies in IOT.pptx20CE112YASHPATEL
 
Network_Layer_and_Internet_Protocols_IPv.pptx
Network_Layer_and_Internet_Protocols_IPv.pptxNetwork_Layer_and_Internet_Protocols_IPv.pptx
Network_Layer_and_Internet_Protocols_IPv.pptx20CE112YASHPATEL
 
Money Manager Presentation-2.pptx
Money Manager Presentation-2.pptxMoney Manager Presentation-2.pptx
Money Manager Presentation-2.pptx20CE112YASHPATEL
 

More from 20CE112YASHPATEL (7)

Data_Processing_and_communication_bluetooth.pptx
Data_Processing_and_communication_bluetooth.pptxData_Processing_and_communication_bluetooth.pptx
Data_Processing_and_communication_bluetooth.pptx
 
DLP_Presentation.pptx
DLP_Presentation.pptxDLP_Presentation.pptx
DLP_Presentation.pptx
 
Communication Technologies in IOT.pptx
Communication Technologies in IOT.pptxCommunication Technologies in IOT.pptx
Communication Technologies in IOT.pptx
 
Network_Layer_and_Internet_Protocols_IPv.pptx
Network_Layer_and_Internet_Protocols_IPv.pptxNetwork_Layer_and_Internet_Protocols_IPv.pptx
Network_Layer_and_Internet_Protocols_IPv.pptx
 
Project.pptx
Project.pptxProject.pptx
Project.pptx
 
Prolog PPT_merged.pdf
Prolog PPT_merged.pdfProlog PPT_merged.pdf
Prolog PPT_merged.pdf
 
Money Manager Presentation-2.pptx
Money Manager Presentation-2.pptxMoney Manager Presentation-2.pptx
Money Manager Presentation-2.pptx
 

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 

Recently uploaded (20)

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 

InternetOFThings_network_communicqtionCoAP_.pptx

  • 2. U & P U Patel Department of Computer Engineering What Is CoAP Protocol? • CoAP is an IoT protocol. CoAP stands for Constrained Application Protocol, and it is defined in RFC 7252. • CoAP is a simple protocol with low overhead specifically designed for constrained devices (such as microcontrollers) and constrained networks. • Web transfer protocol for use with constrained nodes and networks. • Designed for Machine to Machine (M2M) applications such as smart energy and building automation. • Based on Request‐Response model between end‐points • Client‐Server interaction is asynchronous over a datagram oriented transport protocol such as UDP
  • 3. U & P U Patel Department of Computer Engineering Features of CoAP protocols • The main features of CoAP protocols are: • Web protocol used in M2M with constrained requirements • Asynchronous message exchange • Low overhead and very simple to parse • URI and content-type support • Proxy and caching capabilities
  • 4. U & P U Patel Department of Computer Engineering Protocol Layers • There are two different layers that make CoAp protocol: Messages and Request/Response. • The Messages layer deals with UDP and with asynchronous messages. • The Request/Response layer manages request/response interaction based on request/response messages. • CoAP supports four different message types: • Confirmable • Non-confirmable • Acknowledgment • Reset
  • 5. U & P U Patel Department of Computer Engineering CoAP terminology • Endpoint: An entity that participates in the CoAP protocol. Usually, an Endpoint is identified with a host • Sender: The entity that sends a message • Recipient: The destination of a message • Client: The entity that sends a request and the destination of the response • Server: The entity that receives a request from a client and sends back a response to the client
  • 6. U & P U Patel Department of Computer Engineering CoAP Messages Model • This is the lowest layer of CoAP. • This layer deals exchawith UDP nging messages between endpoints. • Each CoAP message has a unique ID; this is useful to detect message duplicates. • A CoAP message is built by these parts: • A binary header • A compact options • Payload
  • 7. U & P U Patel Department of Computer Engineering Confirmable message Confirmable message • A confirmable message is a reliable message. • When exchanging messages between two endpoints, these messages can be reliable. • In CoAP, a reliable message is obtained using a Confirmable message (CON). • Using this kind of message, the client can be sure that the message will arrive at the server. • A Confirmable message is sent again and again until the other party sends an acknowledge message (ACK). • The ACK message contains the same ID of the confirmable message (CON).
  • 8. U & P U Patel Department of Computer Engineering Rest message • If the server has troubles managing the incoming request, it can send back a Rest message (RST) instead of the Acknowledge message (ACK)
  • 9. U & P U Patel Department of Computer Engineering Non-confirmable messages • The other message category is the Non-confirmable (NON) messages. • These are messages that don’t require an Acknowledge by the server. • They are unreliable messages or in other words messages that do not contain critical information that must be delivered to the server. • To this category belongs messages that contain values read from sensors. • Even if these messages are unreliable, they have a unique ID.
  • 10. U & P U Patel Department of Computer Engineering CoAp Request/Response Model • The CoAP Request/Response is the second layer in the CoAP abstraction layer. • The request is sent using a Confirmable (CON) or Non- Confirmable (NON) message. • There are several scenarios depending on if the server can answer immediately to the client request or the answer if not available. • If the server can answer immediately to the client request, then if the request is carried using a Confirmable message (CON), the server sends back to the client an Acknowledge message containing the response or the error code • In the CoAP message, there is a Token. The Token is different from the Message-ID and it is used to match the request and the response.
  • 11. U & P U Patel Department of Computer Engineering CoAp Request/Response Model • If the server can’t answer to the request coming from the client immediately, then it sends an Acknowledge message with an empty response. • As soon as the response is available, then the server sends a new Confirmable message to the client containing the response. • At this point, the client sends back an Acknowledge message: • If the request coming from the client is carried using a NON-confirmable message, then the server answer using a NON-confirmable message.
  • 12. U & P U Patel Department of Computer Engineering CoAp Message Format Where: • Ver: It is a 2 bit unsigned integer indicating the version • T: it is a 2 length • Code: It is the code bit unsigned integer indicating the message type: 0 confirmable, 1 non- confirmable • TKL: Token Length is the token 4 bit response (8 bit length) • Message ID: It is the message ID expressed with 16 bit
  • 13. U & P U Patel Department of Computer Engineering References https://dzone.com/articles/coap-protocol-step-by-step-guide https://coap.technology/impls.html