Overview
更新时间:
复制 MD 格式
Alibaba Cloud IoT Platform provides over-the-air (OTA) update and management services for devices. This topic describes how to configure the C Link SDK to enable OTA updates on a device.
Prerequisites
- You have the device authentication information.
When you customize the SDK, on the SDK Customization page, in the Advanced Features section, select OTA.
- Set up the development environment.
Background information
- For more information about the OTA update feature of IoT Platform, see Overview of OTA updates for IoT Platform.
- For information about the Alink data format for OTA updates, see OTA update.
How it works
To implement an OTA update, the application must use MQTT to connect to IoT Platform. The upgrade package can be downloaded over HTTPS or MQTT:
- HTTPS
- Supports downloading OTA upgrade packages that contain one or more upgrade files.
- For more information about the APIs for this feature, see aiot_ota_api.h.
- ./demos/fota_posix_demo.c and ./demos/fota_multi_file_demo.c

- MQTT
- Supports downloading OTA upgrade packages that contain only a single upgrade file.
- ./demos/mota_basic_demo.c

Examples
- The following table describes the OTA examples.
Example file Device-to-IoT Platform connection protocol Upgrade package download protocol Number of files in upgrade package References ./demos/fota_posix_demo.c MQTT HTTPS 1 Example 1: Sample code description ./demos/fota_multi_file_demo.c Multiple Example 2: Sample code description ./demos/mota_basic_demo.c MQTT 1 Example 3: Sample code description - Seeaiot_ota_api.h for descriptions of OTA status codes.
该文章对您有帮助吗?