Get Started With Coap; Coap Terms; Coap Quick Start Example - Digi XBee 3 Cellular LTE-M User Manual

Smart modem
Table of Contents

Advertisement

Examples: IOT protocols with transparent mode

Get started with CoAP

Constrained Application Protocol (CoAP) is based on UDP connection and consumes low power to
deliver similar functionality to HTTP. This guide contains information about sending GET, POST, PUT
and DELETE operations by using the Coap Protocol with XCTU and Python code working with the XBee
Smart Modem and Coapthon library (Python 2.7 only).
The Internet Engineering Task Force describes CoAP as:
The protocol is designed for machine-to-machine (M2M) applications such as smart energy and
building automation. CoAP provides a request/response interaction model between application
endpoints, supports built-in discovery of services and resources, and includes key concepts of
the Web such as URIs and Internet media types. CoAP is designed to easily interface with HTTP
for integration with the Web while meeting specialized requirements such as multicast
support, very low overhead, and simplicity for constrained environments (source).

CoAP terms

When describing CoAP, we use the following terms:
Term
Meaning
Method
COAP's method action is similar to the HTTP method. This guide discusses the GET,
POST, PUT and DELETE methods. With these methods, the XBee Smart Modem can
transport data and requests.
URI
URI is a string of characters that identifies a resource served at the server.
Token
A token is an identifier of a message. The client uses the token to verify if the
received message is the correct response to its query.
Payload
The message payload is associated with the POST and PUT methods. It specifies the
data to be posted or put to the URI resource.
Message ID
The message ID is also an identifier of a message. The client matches the message
ID between the response and query.

CoAP quick start example

The following diagram shows the message format for the CoAP protocol; see
details:
This is an example GET request:
44 01 C4 09 74 65 73 74 B7 65 78 61 6D 70 6C 65
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
Get started with CoAP
ISSN: 2070-1721
for
67

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xbee 3 cellular nb-iot

Table of Contents