All Products
Search
Document Center

IoT Platform:OTA update process

Last Updated:Jun 10, 2026

IoT Platform uses OTA (Over-the-Air) technology to update firmware, software, or drivers on devices worldwide via wireless networks. This example walks through the OTA update process for an MQTT-connected device.

Background

OTA working principles, limits, and upgrade steps are covered in OTA updates. The update process and data formats are documented in Topics and data formats for OTA updates.

This example uses C Link SDK V4.x to connect a device to IoT Platform and perform an OTA update. C Link SDK V4.x for devices.

OTA update process

This example covers a full update with the default module and a single-file update package.

The following flowchart shows the process.

Device OTA update

The following table describes the process.

Step

Description

References

1

Report the current OTA version to the topic: /ota/device/inform/${YourProductKey}/${YourDeviceName}.

  1. Develop Device A. Set the OTA firmware version number to 1.0.0. Activate Device A to bring it online and report the current firmware version.

  2. Develop Device B, which belongs to the same product as Device A. Set the OTA firmware version number to 2.0.0. Activate Device B to bring it online and report the current OTA version.

Example version report:

{
  "id": 1,
  "params": {
    "version": "1.0.0"
  }
}

Configure OTA updates on a device

2

In the IoT Platform console, upload a newer update package (2.0.0) for the product, then push an update task to the device running version 1.0.0. This upgrades the firmware from 1.0.0 to 2.0.0.

Push an OTA update task to a device

3

The device subscribes to the topic to which IoT Platform pushes OTA update notifications: /ota/device/upgrade/${YourProductKey}/${YourDeviceName}.

Sample upgrade message:

{
    "code":"1000",
    "data":{
        "size":11472299,
        "sign":"83254ac96e141affb8aa42cbfec9****",
        "version":"2.0.0",
        "url":"https://iotx-ota.oss-cn-shanghai.aliyuncs.com/ota/dbab6f742ae389b40db88fc2500b****/ck0q5lyav00003i7hezxe****.zip?Expires=1568951190&OSSAccessKeyId=cS8uRRy54Rsz****&Signature=nk0sogaxtyp7dYvKZnjNQ%2BZ8Q9****",
        "signMethod":"Md5",
        "md5":"83254ac96e141affb8aa42cbfec9****"
    },
    "id":1568864790381,
    "message":"success"
}

View device logs

4

After receiving the update package URL from the notification, the device calls SDK APIs to download the package and perform a local upgrade.

This example downloads a single OTA update file. Related API references:

5

Report the update progress to the topic: /ota/device/progress/${YourProductKey}/${YourDeviceName}.

Example of a progress message:

{
  "id": 1,
  "params": {
    "step":"1", 
    "desc":"******"
  }   
}

6

Report the OTA version after the update to the topic: /ota/device/inform/${YourProductKey}/${YourDeviceName}.

Example version report:

{
  "id": 1,
  "params": {
    "version": "2.0.0"
  }
}

References