Updated on 2024-10-12 GMT+08:00

Introduction to IoT Device SDKs

You can use Huawei IoT Device SDKs to quickly connect devices to the IoT platform. After being integrated with an IoT Device SDK, devices that support the TCP/IP protocol stack can directly communicate with the platform. Devices that do not support the TCP/IP protocol stack, such as Bluetooth and ZigBee devices, need to use a gateway integrated with the IoT Device SDK to communicate with the platform.

  1. Create a product on the IoTDA console or by calling the API Creating a Product.
  2. Register a device on the IoTDA console or by calling the API Creating a Device.
  3. Implement the functions demonstrated in the preceding figure, including reporting messages/properties, receiving commands/properties/messages, OTA upgrades, topic customization, and generic-protocol access (see Developing a Protocol Conversion Gateway for Access of Generic-Protocol Devices).

The platform provides two types of SDKs. The table below describes their differences.

SDK Type

Pre-integration Solution

IoT Protocols Supported

IoT Device SDK

Embedded devices with strong computing and storage capabilities, such as gateways and collectors

MQTT

IoT Device SDK Tiny

Devices that have strict restrictions on power consumption, storage, and computing resources, such as single-chip microcomputer and modules

LwM2M over CoAP and MQTT

The table below describes hardware requirements for devices.

SDK

RAM Capacity

Flash Memory

CPU Frequency

OS Type

Programming Language

IoT Device SDK

> 4 MB

> 2 MB

> 200 MHz

C (Linux), Java (Linux/Windows), C# (Windows), Android (Android), Go Community Edition (Linux/Windows/Unix-like OS), and OpenHarmony

C, Java, C#, Android, and Go

IoT Device SDK Tiny

> 32 KB

> 128 KB

> 100 MHz

It adapts to LiteOS, Linux, macOS, and FreeRTOS. You can modify the SDK to adapt to other environments.

C

For details on the SDK usage, visit the following links:

The following table shows the main function matrix of the SDK.

Table 1 SDK function matrix

Function

C

Java

C#

Android

Go

Python

C Tiny

Property reporting

Message reporting and delivery

Event reporting and delivery

Command delivery and response

Device shadow

OTA upgrade

bootstrap

Time synchronization

Gateway and child device management

Device-side Rules

×

×

×

×

Remote SSH

×

×

×

×

×

Anomaly detection

×

×

×

×

×

Device-cloud secure communication (soft bus)

×

×

×

×

×

M2M function

×

×

×

×

×

Generic-protocol access

×

×