All Products
Search
Document Center

IoT Platform:CoAP standard

Last Updated:Jan 11, 2024

This topic describes the Constrained Application Protocol (CoAP) supported by IoT Platform.

Protocol version

IoT Platform supports CoAP. 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 clients

For more information, see libcoap-develop.

Note

Alibaba Cloud does not provide technical support for third-party code.

Limits

  • You can establish connections over CoAP only in the China (Shanghai)and Japan (Tokyo) regions.

  • You can establish short-lived CoAP connections between devices and IoT Platform only in the China (Shanghai) and Japan (Tokyo) regions. You can view the status changes of devices with short-lived CoAP connections in the IoT Platform console when the devices become connected to or disconnected from IoT Platform. You can configure an AMQP server-side subscription to receive messages about device status changes.

  • The resource discovery feature is not supported.

  • Only the User Data Protocol (UDP) is supported. DTLS and symmetric encryption are used to ensure data security.

  • After you register a device, you can use only one protocol to connect the device to IoT Platform. You cannot use multiple protocols for the same device.

Usage notes

  • You can use the Uniform Resource Identifier (URI) resources of CoAP in the same manner as using the URI resources of Message Queuing Telemetry Transport (MQTT). For more information, see MQTT protocol.

  • You can use CoAP topics in the same manner as using MQTT topics. Replace ${topic} in the coap://host:port/topic/${topic} topic syntax with an actual topic name. This topic name can also be used for messaging over MQTT.

  • If a client passes authentication, IoT Platform returns a token. The client caches the token and uses the token to initiate requests.

  • The size of transmitted data changes based on the specified maximum transmission unit (MTU). We recommend that you specify an MTU size of up to 1 KB.

  • If IoT Platform identifies that a device submits data at least once over CoAP in the previous 10 minutes, the status of the device is displayed as Online in the IoT Platform console.