If you set the Verify Update Package? parameter to Yes when you create an update package, you must verify the package on test devices before you start a batch update. The update package can be used for an over-the-air (OTA) update only after it is successfully installed on all test devices. This topic describes how to verify an update package in the IoT Platform console.
Prerequisites
Add an update packageProcedure
Log on to the IoT Platform console.
On the Overview page, find the instance that you want to manage and click the instance ID or instance name.
- In the left-side navigation pane, choose .Note To provide better services, IoT Platform improves the OTA update feature and adds statistics on update package versions. When you use the new OTA update feature in the console for the first time, you must associate the uploaded update packages with products. You can associate an update package with only one product. For more information about how to associate update packages with products, see the instructions in the console.
- In the list of update packages, find the package you want to verify and click Verify in the Actions column. Configure the parameters and click OK to start the verification on one or more devices.
Parameter Description Version to be updated - For a full update, this parameter is optional.
The drop-down list displays all firmware versions of the devices that belong to the current product, excluding the target version of the update. You can select one or more source versions. The corresponding devices then become available for selection in the Device to be verified list.
If you do not select a version, you can verify devices with any current OTA module version.
- For a differential update, this parameter defaults to the source version that you specified when you added the update package.
Device to be verified Select the devices to use for this verification test. For Enterprise Edition instances in the China (Shanghai), China (Beijing), and China (Shenzhen) regions, you can use advanced search to find devices.
Push update task from cloud Specifies whether IoT Platform actively pushes the update task to devices. - Yes (default): After the batch task is created, IoT Platform actively pushes the OTA update task to the online devices within the update scope.
In this mode, a device can still request the OTA update task information from IoT Platform.
- No: The device must request the OTA update task information from IoT Platform.
App confirmation required If you want to manually control when a device performs an OTA update, you can configure this parameter to require confirmation from a mobile app. You must develop the mobile app. - Yes: The device cannot obtain the OTA update task until the app confirms the update. To grant confirmation, call the ConfirmOTATask API to confirm pending device update jobs. After the confirmation, the device obtains the OTA update task information based on the Push update task from cloud setting.
- No (default): The device obtains the OTA update task information directly based on the Push update task from cloud setting.
Update package download protocol The protocol that the device uses to download the update package. Valid values: HTTPS and MQTT. After the device receives the download information from IoT Platform, it downloads the update package using the specified protocol. Important To download an update package over MQTT, the following conditions must be met:- Supported regions: China (Shanghai), China (Beijing), and China (Shenzhen) only.
- OTA update package: Must contain a single file, and the file size cannot exceed 16 MB.
- Device-side SDK: You must use the latest version of the C Link SDK provided by IoT Platform to develop the OTA update and MQTT file download capabilities. For more information, see Sample code for OTA updates over MQTT.
Device update timeout The timeout period for the update on a single device. If a device fails to complete the update within this period, the update times out. Valid values: 1 to 1,440 minutes. When you perform an OTA update with this package for the first time, we recommend setting this parameter to the maximum value to improve the update success rate. The console recommends a timeout period based on historical update records.
Note- The update timer starts when the device first reports its update progress.
If the device goes offline and online multiple times during the update, which triggers the cloud to push the update package repeatedly, the timer is not reset and continues to count from when the device first reported progress.
- After the device is successfully updated, report the target version immediately to prevent the update from being marked as failed due to a timeout.
For example, if you set this parameter to 60 minutes and the device first reports its update progress at 10:00, the update fails if the device does not report the new version successfully by 11:00.
Batch Tags
Click Add Tag and enter a Tag Key and Tag Value in the displayed input boxes.
After the batch upgrade task is created, if the batch status is Upgrading, you can modify and add tags. For more information, see Manage batches.
Batch tags are sent to the device when the upgrade notification is pushed.
To view the tag configuration rules, click the help icon
. - For a full update, this parameter is optional.
Results
In the Verify Update Package dialog box that appears, click Close.
On the Update Packages tab, find the update package that has a status of Verifying and click View in the Actions column. On the Update Package Information tab, you can view the Verification Progress.
On the Update Package Information tab, if the Verification Progress shows 0%, you can click Refresh to see the latest progress.Next steps
After all test devices are successfully updated, the status of the update package changes to Verified. You can then proceed with a batch update. For more information, see Create a batch update task.
Related APIs
| API | Description |
| CreateOTAVerifyJob | Creates a verification batch for an update package. |
| QueryOTAFirmware | Queries the details of a specified update package. |
For more information about API operations related to the OTA update feature, see OTA update APIs.