If you set the Verify Update Package? parameter to Yes when you add an update package, you must verify the update package on tested devices before you perform a batch update. The update package can be pushed to devices for an over-the-air (OTA) update only after tested devices are updated. This topic describes how to verify an update package in the IoT Platform console.
Prerequisites
An update package is added. For more information, see Add an update package.Procedure
- Log on to the IoT Platform console.
- On the Overview page, find the instance that you want to manage and click the instance name to go to the Instance Details page. Important Enterprise Edition instances are available in the China (Shanghai) and Japan (Tokyo) regions. If the Enterprise Edition instances are unavailable in the region that you select, skip this step.
- 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.
- On the Update Packages tab, find the update package that you want to verify and click Verify in the Actions column. In the Verify Update Package dialog box, set the parameters as required and click OK to verify the update package on one or more devices. The following table describes the parameters.
Parameter Description Version number to be upgraded - The version number for the OTA module of the devices to be updated. If you perform a full update, this parameter is optional.
The drop-down list displays the OTA module versions of all devices in the current product, except for the version to be updated to. You can select one or more versions. After you select the required versions, the related devices are added to the Deviceto be verified drop-down list as candidate devices.
If you do not set this parameter, no limit is set on the OTA module versions of the devices to be verified.
- If you perform a differential update, the value of this parameter is the version number that you specify when you add the update package.
Deviceto be verified The devices to be verified. You can select one or more devices. Whether IoT Platform Actively Pushes Update Task Specifies whether IoT Platform automatically pushes update tasks to devices. Valid values: - Yes: After an update batch is created, IoT Platform automatically pushes update tasks to the specified online devices. This is the default value.
In this case, a device can still initiate a request to obtain the information about the OTA update task from IoT Platform.
- No: A device must initiate a request to obtain the information about the OTA update task from IoT Platform.
APP Confirm Upgrade Specifies whether to control the update by using a mobile app. You must develop the mobile app as needed. Valid values: - Yes: To perform an OTA update on a device, you must confirm the update by using your mobile app. You can call the ConfirmOTATask operation to confirm multiple update tasks that are pending for confirmation at a time. Then, the device can obtain the information about the OTA update task based on the setting of the Whether IoT Platform Actively Pushes Update Task parameter.
- No: A device obtains the information about the OTA update task based on the setting of the Whether IoT Platform Actively Pushes Update Task parameter. This is the default value.
Update Package Download Protocol The protocol used to download the update package. Valid values: HTTPS and MQTT. After a device receives the update package URL pushed by IoT Platform, this protocol is used to download the update package. Important If you need to download the update package by using the Message Queuing Telemetry Transport (MQTT) protocol, take note of the following items:- Your service must be deployed in the China (Shanghai), China (Beijing), or China (Shenzhen) region.
- The OTA update package can contain only one file, and the size of the file cannot exceed 16 MB.
- You must use the latest version of Link SDK for C to develop the device features to perform OTA updates and download files over MQTT. For more information, see Sample code.
Device upgrade time-out (minutes) The timeout period of the update for a single device. If a specified device has not been updated within this period, the update times out. Valid values: 1 to 1440. Unit: minutes. If you perform an OTA update by using the update package for the first time, we recommend that you set this parameter to its maximum value. This increases the success rate of the update. The console shows a recommended value based on update records.
Note- The update period starts from the first time the specified device reports the update progress.
During the update, the update package may be repeatedly pushed to the specified device because the device goes online and offline multiple times. However, the start time of the update period does not change.
- After the device is updated, the device must immediately report the updated version number. Otherwise, the update may fail due to a timeout error.
For example, you set the timeout period to 60 minutes and the device first reports the update progress at 10:00. If the device does not report the updated version number before 11:00, the update fails.
Batch label Click Add Tag. In the fields that appears, specify the tag key and tag value.
If an update batch that you created is in the updating state, you can modify the tag or add more tags. For more information, see Manage update batches.
The tags of an update batch are sent to devices when IoT Platform pushes update notifications to these devices.
You can move the pointer over the icon to view the rules based on which you can configure tags.
- The version number for the OTA module of the devices to be updated. If you perform a full update, this parameter is optional.
Results
In the Verify Update Package dialog box, click Close.
On the Update Packages tab, find the update package that is in the Verifying state and click View in the Actions column. On the Update Package Information tab, you can view the verification progress.
What to do next
After tested devices are updated and the status of the update package is displayed as Verified, you can perform a batch update. For more information, see Initiate a batch update.
Related API operations
Operation | Description |
---|---|
CreateOTAVerifyJob | Creates a verification task for an update package. |
QueryOTAFirmware | Queries the details of an update package. |
For more information about API operations related to the OTA update feature, see OTA updates.