Updated on 2025-12-04 GMT+08:00

Functions

The SDK is designed for embedded devices with powerful computing and storage capabilities. You can call SDK APIs to implement communication between devices and the platform. The table below lists the functions supported by the SDK.

Table 1 Functions supported by C#

Function

Description

Device connection authentication

Served as a client for connecting devices to the platform using MQTT. Secret authentication and certificate authentication are supported.

Disconnection and reconnection

Used to reconnect a device disconnected due to a connection failure or network instability.

Message reporting

Used by a device to report custom data to the platform, which then forwards reported messages to an application or other Huawei Cloud services for storage and processing.

Property reporting

Used by a device to report property data in the format defined in the product model to the platform.

Command delivery

Used by the platform to deliver a command to a device. After the platform delivers a command, the device needs to return the command execution result to the platform in a timely manner.

Device shadow

Used to store the device online status, latest device properties reported, and device configurations to deliver.

Software and firmware OTA upgrade

Used to download OTA upgrade packages from the platform.

Time synchronization

Used by a device to send a request for synchronizing time with the platform.

Gateways and child devices

Gateway devices: Devices that directly connect to the platform using a protocol supported by the platform. Child devices: Devices that do not support the TCP/IP protocol stack cannot communicate directly with the IoT platform. They use gateways to forward data. Currently, only devices that are directly connected to the platform using MQTT can be used as gateway devices.

File upload/download

Used by devices to upload run logs, configuration files, and other files to the platform for log analysis, fault locating, and device data backup.

Anomaly detection

Used to continuously detect security threats. Detected items: memory leakage, abnormal ports, CPU usage, disk space, and battery power.

Rule engine

Used by the platform to trigger collaborative response of multiple devices to implement device linkage and intelligent control. Currently, the platform supports cloud rules and device rules.

Remote configuration

Used for remotely updating system parameters and runtime parameters without interrupting device running.

Remote login

Used to remotely log in to a device through the console in SSH mode. You can enter commands supported by the device on the console to debug functions and locate faults, facilitating device management and remote O&M.

Generic-protocol access

Used to convert third-party protocols (protocols other than HTTP, MQTT, and LwM2M) outside the platform. It is recommended that a gateway be used to convert third-party protocols into MQTT.

Device provisioning

Used to dynamically complete initial configuration of devices in different batches in scenarios where devices are distributed to different regions and instances. Certificate authentication and secret authentication are supported.