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.
|
Function |
Description |
|---|---|
|
Served as a client for connecting devices to the Huawei Cloud platform using MQTT. Secret authentication and certificate authentication are supported. |
|
|
Reconnection upon disconnection |
Used to reconnect a device disconnected due to a connection failure or network instability. |
|
Used to report custom data from devices to the platform, which then forwards the reported data to applications or other Huawei Cloud services for storage and processing. Used to deliver messages from the platform to devices, which then process the received messages. |
|
|
Used by a device to report property data in the format defined in the product model to the platform, or used to set device properties on the platform. After receiving a property setting request, the device returns the result to the platform. Used to query device properties on the platform. After receiving a property query request, the device returns the property data to the platform. |
|
|
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. |
|
|
Used by a device to obtain device shadow data from the platform. |
|
|
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. |
|
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 and 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. When a device uploads files to Object Storage Service (OBS) using HTTPS, you can manage the uploaded files on OBS. |
|
Device rules |
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. |
|
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. |
|
Used for product model–oriented programming. This approach leverages the object model abstraction feature of the SDK. By defining device services within the device code according to the product model, the SDK can seamlessly interact with the platform to synchronize properties and execute commands. Product model-oriented programming streamlines device code by allowing a focus solely on defining services, rather than managing communication processes. This approach offers a simpler alternative to using client APIs. |
|
|
Generic-protocol access |
If non-HTTP, non-MQTT, and non-LwM2M third-party protocols are used for access, protocol conversion must be completed outside the platform. It is recommended that a gateway be used to convert third-party protocols into MQTT. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot