CoAP Connector
Connector details CoAP
The CoAP connector allows the platform to receive data from CoAP-enabled devices and services.
Typically, the devices use NB-IoT or LTE Cat-M mobile networks as bearer protocols.
Ports
The platform can receive CoAP data on two ports:
- 5683/UDP → CoAP: Unencrypted or protected with OSCORE ([RFC 8613])
- 5684/UDP → CoAPs: CoAP over DTLS, secure
Using the Generic CoAP Connector
Every server provides a standard generic CoAP connector. To use it:
- Create a generic node
- As
secret
, define:
- As
generic_coap_[your secret identifier]
- POST CoAP data from your device or service:
coap://staging.yggio.net:5683/in/generic
- Use content format:
application/json
.
- JSON message body example:
{
"secret": "[your secret identifier]",
"encodedData": {
"hexEncoded": "32874387bd387342fed74843832"
}
}
- Add and existing or develop a new translator to decode the incoming data
Example: Node-RED CoAP Request
Below is an example Node-RED CoAP Request node that sends CoAP data to a device using the generic CoAP connector:
Additional Information
-
DTLS Encryption
-
The platform supports CoAP over DTLS.
-
PSK - Pre Shared Key, RPK - Raw Public Key or X.509 Certificates are required.
DTLS Key Type Security Complexity Use Case PSK (Pre-Shared Key) Medium Low Constrained devices, small fleets RPK (Raw Public Key) High Medium Medium-scale deployments, secure key exchange without CA X.509 Certificates Very High High Large-scale deployments, enterprise/industrial IoT -
→ Contact your support representative if you want to enable DTLS.
-
-
LwM2M Support
- CoAP is commonly used as the transport protocol for LwM2M-enabled devices.
- The platform includes a built-in LwM2M server.
- → Contact your support representative if you want to use LwM2M.
-
OSCORE (RFC 8613)
- CoAP can be secured with end-to-end encryption using OSCORE.
- The platform has built-in OSCORE support.
- → Contact your support representative if you want to enable OSCORE.
-
Vendor-Specific CoAP Endpoints
- Many NB-IoT/Cat-M CoAP device manufacturers define their own CoAP API to post data.
- Except LwM2M, there is no firm standard in CoAP, and variations often involve different CoAP endpoints (similar to custom HTTP endpoints).
- To support such devices, a customized CoAP connector is usually required.
- → Contact your support representative for assistance.