IoT Platform provides the over-the-air (OTA) update and management feature. To update devices, make sure that your devices support the OTA service. Then, you can upload an update package on the OTA Update page of the IoT Platform console and specify devices to be updated. IoT Platform pushes OTA update notifications to the devices. The devices can download the OTA update package and perform OTA updates. This article describes the limits and procedure of OTA updates.

Prerequisites

Before you use the OTA update feature, make sure that your devices support the OTA service.
  • For more information about how to configure OTA updates by using device SDKs, see Perform OTA updates.
  • For more information about how to configure OTA updates if your devices are installed with AliOS Things chips, see OTA Tutorial.

Limits

Table 1. Devices
Item Limit
Supported protocol Only devices that are connected to IoT Platform by using the Message Queuing Telemetry Transport (MQTT) protocol support the OTA update feature.
OTA updates of distributed devices After a device is distributed to the destination instance, you can perform OTA updates on the device.
Table 2. Update packages
Item Limit
Update packages Each Alibaba Cloud account can have a maximum of 500 update packages.
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.
Table 3. Update batches
Item Usage and limit
Version-based updates Limits:
  • Static update: You can use an update package to create one or more update batches for different firmware versions to be updated.
  • Dynamic update:
    • You can use an update package to create only one dynamic update batch for a firmware version to be updated.
    • Each device in a dynamic update batch can implement a maximum of 10 updates.
    • You can use multiple update packages to create multiple update batches for the same firmware version. In this case, only the latest dynamic update batch takes effect.
Usage note: Each module of a device can have only one ongoing update batch at the same time. A device that has an ongoing update batch is in the To Be Pushed, Pushed, or In Upgrade state. Otherwise, an update conflict occurs.
Group-based updates Limit: This feature is unavailable in the Japan (Tokyo) and US (Virginia) regions.
Usage note: If you delete a device group or remove devices from the group, the existing OTA task of the group is not affected.

For information about how to create and use a group, see Device groups.

Procedure

  1. Develop the OTA update feature: Configure the remote OTA update feature on the device.
  2. Add an update package: Add an OTA module and update package to a product.
  3. (Optional) Verify an update package: Verify the package.
    Note
    • If you set the Verify Update Package parameter to No when you add the update package, skip this step.
    • After tested devices are updated and the status of the update package is displayed as Verified, you can perform a batch update.
  4. Initiate a batch update: IoT Platform sends OTA update information to specified devices. The information includes the URL, version, and size of the update package.
    Note When you initiate a batch update, you can set Whether IoT Platform Actively Pushes Update Task to one of the following values:
    • Yes: IoT Platform pushes OTA update information to online devices.
    • No: IoT Platform does not push OTA update information to devices. A device must initiate a request to IoT Platform to obtain the OTA update information.

      For more information, see Step 4 that is described in the Message formats section of the Perform OTA updates topic.

  5. Perform OTA updates: Devices obtain the OTA update information, use the URL to download the update package, and then perform OTA updates.
    Note The URL of an update package is valid for 24 hours. A device can download the update package within the specified period. If the update package is not downloaded within 24 hours, the device can request the update information from IoT Platform and then download the package again. For more information, see the following scenarios.

    Scenarios:

    • A device immediately downloads the update package and complete an OTA update. For more information, see Step 5 that is described in the Message formats topic.
    • A device does not immediately download the update package. Instead, the device requests the update information from IoT Platform during off-peak business hours and then performs an OTA update. For more information, see Step 4 that is described in the Message formats topic.
  6. View update status: View the update statuses of the devices and the information about the update package.
  7. View statistics on update package versions and success rates: View the statistics on version distribution and success rate distribution after the update. You can also identify the causes of update failures to improve the success rate.

Documentation