Delivering a Command
LwM2M Object Resource
The IoT platform delivers an asynchronous command to a device by packing the command into the payload of the LwM2M write message through the /19/1/0 resource object.
Operation |
CoAP Method |
URI |
Success |
Failure |
---|---|---|---|---|
Write |
PUT |
/19/1/0 |
2.04 Changed |
4.00 Bad Request, 4.04 Not Found, 4.01 Unauthorized, 4.05 Method Not Allowed, 4.06 Not Acceptable |
1. For devices connected using LwM2M, IoTDA supports only asynchronous command delivery.
2. After receiving the command, IoTDA calls the codec you upload to the platform to encode the command and delivers the encoded command to the device. For details, see Developing a Codec.
Example Request
If the encoded value is c4 0d 5a 6e 96 0b c3 0e 2b 30 37, the delivery example is as follows:
CON-PUT MID=48587, Token=2d82e7f54b, OptionSet={"Uri-Path":["19","1","0"], "Content-Format":"application/octet-stream"}, c4 0d 5a 6e 96 0b c3 0e 2b 30 37
Example Response
ACK-2.04 MID=48587, Token=2d82e7f54b, OptionSet={"Content-Format":"application/octet-stream"}, no payload
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot