To perform an over-the-air (OTA) update on IoT devices, you must add an update package to a product in the IoT Platform console. This article describes how to add an update package.

For more information about how to use the OTA update feature, see Overview.

Procedure

  1. Log on to the IoT Platform console.
  2. In the left-side navigation pane, choose Maintenance > OTA Update.
    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.
  3. Optional. If AliOS Things chips are installed on your devices, you can enable the secure update feature.

    We recommend that you enable this feature to ensure the integrity and security of update packages. If you use the secure update feature, verify the update package and update package signatures of devices. For more information, see OTA Tutorial for AliOS Things.

    1. On the OTA Update page, click Secure Update.
    2. In the Secure Update panel, turn on Secure Update for the product to be updated.
      When the secure update feature is in the Activated state, click Copy in the Public Key column to copy the public key. You can use the public key to verify the signature of a device.
  4. Optional. Add a custom OTA module.
    An OTA module indicates the module of the devices to be updated in a product. These OTA modules include the firmware, software, and driver. The default module is the firmware of a device. You can also customize an OTA module.

    On the Modules tab, click Add Module. Set the parameters as required and click OK.

    Parameter Description
    Product The product to which the module belongs.
    Module Name The name of the module. The module name must be unique in a product. The module name cannot be modified after the module is added. The module name must be 1 to 64 characters in length, and can contain letters, digits, periods (.), hyphens (-), and underscores (_).
    Module Alias The alias of the module. The module alias must be 4 to 64 characters in length, and can contain letters, digits, periods (.), hyphens (-), and underscores (_).
    Module Description The description of the module. The module description can be up to 100 characters in length.
  5. On the OTA Update page, click the Update Packages tab and click Add Update Package.
  6. Set the parameters as required, upload an update package file, and then click OK.
    Parameter Description
    Types of Update Packages
    • Full: If you select Full, you must upload a complete update package. IoT Platform pushes the complete update package to devices for update.
    • Differential: If you select Differential, you must upload a file that contains only the differences between the previous update package version and the new update package version. IoT Platform pushes the differences to devices for update. Then, the differences are merged into the original update packages. Differential updates optimize the usage of device resources and minimize the traffic that is consumed when IoT Platform pushes update packages.
    Update Package Name The name of the update package. The update package name must be unique within an Alibaba Cloud account. The update package name cannot be modified after the update package is added. The name must be 1 to 40 characters in length, and can contain letters, digits, hyphens (-), underscores (_), and parentheses (). The name must start with a letter or digit.
    Product The product to which the update package belongs.
    Update Package Module The OTA module to which the update package applies.

    You can click Add Module. In the Add Module dialog box, set the parameters as required and click OK to add a module.

    Update Package Version The version number of the update package. The version number must be 1 to 64 characters in length, and can contain letters, digits, periods (.), hyphens (-), and underscores (_).

    You must specify this parameter if you set the Types of Update Packages parameter to Full.

    Version number to be upgraded The version number for the OTA module of the devices to be updated. The drop-down list displays the OTA module versions of all devices in the current product. You can enter a version number in the field, or select a version from the drop-down list.

    You must specify this parameter if you set the Types of Update Packages parameter to Differential.

    Post-upgrade version number The version number of the update package.

    You must specify this parameter if you set the Types of Update Packages parameter to Differential.

    Signature Algorithm The signature algorithm. Valid values: MD5 and SHA256.

    If you use Link SDK for Android and set the Types of Update Packages parameter to Differential, select the MD5 algorithm.

    Select Update Package Select an update package file to upload. The maximum size of an update package file is 2,000 MB. The file format can be only .bin, .tar, .gz, .zip, .gzip, .apk, or .tar.gz.
    Verify Update Package? Specifies whether you need to verify the update package on several devices before you perform a batch update.
    • Yes: You must verify the update package. You can perform a batch update after the update package is verified.
    • No: No verification is required. You can perform a batch update without the need to verify the update package.
    Update Package Description The description of the update package. The description can be up to 1,024 characters in length.

Results

After you add an update package, you can view the update package on the Update Packages tab, as shown in the following figure.

Update Packages tab

What to do next

If you set the Verify Update Package? parameter to Yes when you add an update package, you must verify the update package before you perform a batch update. For more information, see (Optional) Verify an update package.

If you set the Verify Update Package? parameter to No when you add an update package, you can perform a batch update without verification. For more information, see Initiate a batch update.

Related operations

API Description
GenerateOTAUploadURL Generates the URL and details of an update package to be uploaded to OSS.
CreateOTAFirmware Adds an update package.
CreateOTAModule Adds an OTA module for a product.
UpdateOTAModule Modifies the alias and description of an OTA module.
DeleteOTAModule Removes a custom OTA module.
ListOTAModuleByProduct Queries the OTA modules of a product.
DeleteOTAFirmware Removes an update package.
ListOTAFirmware Queries update packages.

For more information about API operations related to the OTA update feature, see OTA updates.