Learn why over-the-air (OTA) updates fail and how to resolve each error.
A device update times out
Issue
You choose Maintenance > OTA Update in the IoT Platform console to go to the OTA Update page. When you initiate a batch update on this page, you configure the Device upgrade time-out (minutes) parameter. The first time a device submits the update progress, timing is triggered. If the device is not updated within the timeout period that you specified for Device upgrade time-out (minutes) parameter, IoT Platform determines that the update failed.
Cause
-
The device network is unstable, so downloading the OTA update package takes longer than the specified timeout period.
-
The device fails to download the OTA update package or the update fails on the first attempt. The device restarts, receives the update task from IoT Platform, downloads the package, and performs the update again. The total duration of this process exceeds the specified timeout period.
Solution
Set Device upgrade time-out (minutes) to a value greater than 60, or leave the parameter empty.
You can modify Device upgrade time-out (minutes) only for dynamic update tasks. You can modify this parameter multiple times. Each modification applies only to devices added after the change.
A device submits an invalid firmware version number
Issue
You choose Maintenance > OTA Update in the IoT Platform console to go to the OTA Update page. When you initiate a batch update on this page, you configure the Version number to be upgraded parameter. After a device downloads an update package, starts an update, and then submits the update progress, the device goes offline. Then, the device goes online and submits a firmware version number that is not the number of the source version or destination version. In this case, IoT Platform determines that the update failed.
Cause
During an OTA update, an on-premises firmware update runs at the same time. After the on-premises update completes, the device reports a firmware version that matches neither the source version nor the destination version in the batch update task.
Solution
Before you update the on-premises firmware of a device, disconnect the device from IoT Platform. After the on-premises update completes, the device can go online and report the latest firmware version number. The device must report the version number within 2 seconds after it goes online.
In the IoT Platform console, choose Maintenance > OTA Update to go to the OTA Update page. When you initiate a batch update on this page, configure the Max. Retry Times parameter. For example, set it to 5. After a device reports an invalid firmware version number, IoT Platform retries the update up to the number of times specified by Max. Retry Times. This improves the success rate of OTA updates.
A device submits an error value
Issue
During an update, a device submits one of the following error values by using the update progress-specific topic: -1 (Update Failed), -2 (Download Failed), -3 (Verification Failed), and -4 (Burn Failed). Then, IoT Platform determines that the update failed.
Cause
Various errors can occur during an OTA update. When an error occurs, the device reports one of the error values along with a custom description for troubleshooting.
The error value descriptions are predefined by IoT Platform. You can modify the descriptions. The device can also report a custom description based on the specific error.
Solution
In the IoT Platform console, choose Maintenance > OTA Update to go to the OTA Update page. When you initiate a batch update on this page, configure the Max. Retry Times parameter. For example, set it to 5.
After a device reports an error value, IoT Platform retries the update up to the number of times specified by Max. Retry Times. This improves the success rate of OTA updates.
A device has multiple update tasks at the same time
Issue
A device can have only one ongoing update task. If you initiate another update task for the same device, a conflict occurs and IoT Platform marks the new task as failed.
Cause
When you initiate another update task for a device that already has an ongoing update task, you set Override Previous Device Update Tasks to No.
Solution
-
In the IoT Platform console, choose Maintenance > OTA Update to go to the OTA Update page. When you initiate a batch update, set Override Previous Device Update Tasks to Yes.
-
On the Batch Details page of the IoT Platform console, cancel the tasks that are in the To Be Pushed, Pushed, and In upgrade states. Then, initiate a new update task on the device.
You can cancel update tasks in the In upgrade state, but you cannot overwrite them.