CoAP protocol specifications
Updated at:
This topic describes the Constrained Application Protocol (CoAP) specifications that IoT Platform supports.
Protocol version
IoT Platform supports the RFC 7252 Constrained Application Protocol. For more information, see RFC 7252.
Channel security
IoT Platform uses Datagram Transport Layer Security (DTLS) v1.2 to ensure channel security. For more information, see DTLS v1.2.
Open source client
The recommended open source client package is libcoap-develop.
Note Alibaba Cloud does not provide technical support for third-party code.
Limits
- CoAP communication is supported only in the China (Shanghai), China (Beijing), China (Shenzhen), Japan (Tokyo) regions.
- Only the China (Shanghai) and Japan (Tokyo) regions support device connections to IoT Platform using CoAP short-lived connections. The status of these devices changes between online and offline in the IoT Platform console. You can use an Advanced Message Queuing Protocol (AMQP) server-side subscription to receive notifications about these status changes.
- Resource discovery is not supported.
- Only the UDP protocol is supported. IoT Platform currently supports two safe modes: DTLS and symmetric encryption.
- After registering a device, select only one communication protocol for the device to connect to IoT Platform. Do not use multiple communication protocols for the same device simultaneously.
Usage notes
- The CoAP URI resources are the same as Message Queuing Telemetry Transport (MQTT) topics. For more information, see MQTT protocol specifications.
- The topic specifications are the same as those for MQTT. In the CoAP
coap://host:port/topic/${topic}interface, use an MQTT topic for the${topic}parameter. - The client must cache the request token that is returned by the authentication service.
- The size of the data to be transferred depends on the Maximum Transmission Unit (MTU) size. Keep the data size within 1 KB.
- If a device reports data using the CoAP protocol within a 10-minute period, the device is displayed as online in the IoT Platform console.
Is this page helpful?