What Should I Do If a Command Fails to Be Delivered?
If an error occurs when you call the API for delivering a command, or the API call successes but the device does not receive the command, do as follows:
- Check the device protocol.
- Check whether the API supports the device protocol. Synchronous commands can be delivered only to MQTT devices, and asynchronous commands can be delivered only to NB-IoT devices.
- Check if the command delivery is done correctly.
- Synchronous command delivery:
- Check whether the device has subscribed to the downstream topic. If not, the device cannot receive commands from the IoT platform. For details, see Delivering Commands.
- If the device has received the command, ensure that the device responds to the platform within 20s after receiving the command (however, there is no time limit on a device's response to a message delivered by the platform), and the upstream topic and message body of the response are correct. Otherwise, an error will be reported by the API. Note that the request ID in the upstream topic must be the same as that in the delivered command.
- Asynchronous command delivery:
Check the value of input parameter send_strategy to see if the command is delivered immediately or cached before delivery.
- Immediate delivery: The device receives the command immediately if the device is online.
- Delayed delivery: The device receives the command only after the device reports data.
- Synchronous command delivery:
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.