Help Center/ IoT Device Access/ User Guide/ Device Management/ OTA Upgrade/ OTA Upgrade for a Batch of Devices
Updated on 2024-11-06 GMT+08:00

OTA Upgrade for a Batch of Devices

Uploading a Software/Firmware Package

You need to upload a software/firmware upgrade package before creating a batch software/firmware upgrade task. The platform supports the following upload modes:

  1. Use the application to call the API for creating an OTA upgrade package.
  2. On the console, choose Software/Firmware Upgrades, and upload a software/firmware upgrade package. For details, see Software/Firmware Package Upload.
    • The OTA upgrade package uploaded using the API can be used only for upgrading MQTT devices.
    • If the upgrade package is an OBS object, the delivered upgrade package link is the OBS link no matter whether the CDN domain name acceleration is configured for the OBS bucket.

Upgrading the Software for a Batch of Devices

There are two ways to upgrade the software for a batch of devices:

  1. Use the application to call the API for creating a batch task to create an upgrade task for a batch of devices.
  2. Create a software upgrade task on the IoTDA console.

The following describes how to create a software upgrade task for a batch of devices on the console.

  1. Access the IoTDA service page and click Access Console. Click the target instance card.
  2. In the navigation pane, choose Devices > Software/Firmware Upgrades, and click Create Upgrade Task.
  3. On the Software Upgrades tab page, click Create Task.

    Figure 1 Software/Firmware upgrade - Creating a software upgrade task

  4. In the Set Basic Information pane, set the task name, execution time, and retry policy.

    If Retry is enabled, you can set the number of retry attempts and retry interval. You are advised to set Retry Attempts to 2 and Retry Interval (min) to 5. If an upgrade fails, the upgrade will be retried 5 minutes later.

    Figure 2 Creating a software upgrade task - Basic information

  5. Select a software package.

    Figure 3 Creating a software upgrade task - Selecting an upgrade package

  6. Select the device or device group to upgrade and click Create Now.

    For details on how to create a group and add devices to the group, see Groups and Tags.

    Figure 4 Creating a software upgrade task - Selecting a device group

  7. View the result on the task list. Click View to check the result for each device on the execution details page.

    An upgrade task that is being executed cannot be deleted. To delete an upgrade task, manually stop the task first.

Upgrading the Firmware for a Batch of Devices

There are two ways to upgrade the firmware for a batch of devices:

  1. Use the application to call the API for creating a batch task to create an upgrade task for a batch of devices.
  2. Create a firmware upgrade task on the IoTDA console.

The following describes how to create a firmware upgrade task for a batch of devices on the console.

  1. Access the IoTDA service page and click Access Console. Click the target instance card.
  2. In the navigation pane, choose Devices > Software/Firmware Upgrades, and click Create Upgrade Task.
  3. On the Firmware Upgrades tab page, click Create Task.

    Figure 5 Software/Firmware upgrade - Creating a firmware upgrade task

  4. In the Set Basic Information pane, set the task name, execution time, and retry policy.

    If Retry is enabled, you can set the number of retry attempts and retry interval. You are advised to set Retry Attempts to 2 and Retry Interval (min) to 5. That is, if the upgrade fails, the upgrade will be retried in 5 minutes. (The maximum number of retry attempts is 5 and the maximum retry interval is 1,440 minutes.)

    Figure 6 Creating a firmware upgrade task - Basic information

  5. Select a firmware package.

    Figure 7 Creating a firmware upgrade task - Selecting an upgrade package

  6. Select the device group to upgrade and click Create Now.

    For details on how to create a group and add devices to the group, see Groups and Tags.

    Figure 8 Creating a firmware upgrade task - Selecting a device group

  7. View the result on the task list. Click View to check the result for each device on the Execution Details page.

    An upgrade task that is being executed cannot be deleted. To delete an upgrade task, manually stop the task first.

Troubleshooting Software/Firmware Upgrade Failure

The following table lists the failure causes reported by the platform.

Error Message

Description

Solution

Device Abnormal is not online

The device is offline or abnormal.

Check the device.

Task Conflict

A task conflict occurs.

Check whether a software upgrade, firmware upgrade, log collection, or device restart task is in progress.

Waiting for the device online timeout

The device does not go online within the specified time.

Check the device.

Wait for the device to report upgrade result timeout

The device does not report the upgrade result within the specified time.

Check the device.

Waiting for report device firmware version timeout

The device does not report the firmware version within the specified time.

Check the device.

Waiting for report cellId timeout

The device does not report the cell ID within the specified time.

Check the device.

Updating timeout and query device version for check timeout

The device does not report the upgrade result or device version within the specified time.

Check the device.

Waiting for device downloaded package timeout

The device does not finish downloading the firmware package within the specified time.

Check the device.

Waiting for device start to update timeout

The device does not start the update within the specified time.

Check the device.

Waiting for device start download package timeout

The device does not start to download the firmware package within the specified time.

Check the device.

The following table lists the failure causes reported by devices.

Error Message

Description

Solution

Not enough storage for the new firmware package

The storage space is insufficient for the firmware package.

Check the storage space of the device.

Out of memory during downloading process

The memory was insufficient during the download.

Check the device memory.

Connection lost during downloading process

The connection was interrupted during the download.

Check the device connection status.

Integrity check failure for new downloaded package

The integrity check on the firmware package fails.

Check whether the firmware package downloaded is complete.

Unsupported package type

The firmware package type is not supported.

Check whether the device status and firmware package provided by the manufacturer are correct.

Invalid URI

The URI is invalid.

Check whether the download address of the firmware package is correct.

Firmware update failed

The firmware fails to update.

Check the device.