All Products
Search
Document Center

IoT Platform:Get Link SDK for C

Last Updated:Jun 10, 2026

Get and use the Link SDK for C for device-side development.

Get the SDK

Download link: C SDK 4.x

Important

The APIs of SDK v4.x are not compatible with those of the v3.x and v2.x branches. If you use the v3.x or v2.x branches to develop your products, continue to use those branches.

Features

SDK v4.x supports the following features.

Feature module

Description

MQTT connection

Connects devices to IoT Platform over MQTT for topic-based data exchange.

HTTP connection

Connects devices to IoT Platform over HTTP for data upload.

device authentication

  • Authenticates devices with a pre-provisioned device secret. Also supports dynamic registration over HTTPS and MQTT.

  • Authenticates devices with ID².

  • Authenticates devices with X.509 certificates.

OS adaptation

Adaptation layers for:

  • Linux

  • FreeRTOS

  • POSIX-compliant operating systems

For other operating systems, create a custom adaptation layer.

thing model

Enables cloud applications to manage devices through the thing model without knowing the device-platform data format.

OTA

Performs Over-the-Air (OTA) firmware updates. The SDK retrieves the firmware only. You must implement the flash or ROM write logic.

time synchronization

Gets the current time from IoT Platform.

RRPC

Synchronous remote procedure calls from cloud to device.

Device connection alerts

Alerts on high connection latency or packet loss.

log reporting

Real-time log uploading.

bootstrap service

Dynamically resolves the service endpoint at startup for global deployments.

sub-device management

Connects non-IP devices to IoT Platform through a gateway.

Device diagnostics

Detects abnormal device connection and communication latency.

Device forensics

Monitors for device spoofing. Required for dynamic registration without a whitelist.

Note

With HTTP connections, IoT Platform cannot push data to the device.

SDK build

The SDK ships as source files. Compile with any of these methods:

  • Compile with GNU Make.

  • Compile with CMake.

  • Add SDK source files to an IDE project (such as Eclipse).

The downloaded SDK has the following directory structure:

$ ls -l
total 20
-rwxrwxrwx 1 root root 1067  Apr 26 14:14 ChangeLog.md
drwxrwxrwx 1 root root 4096  Apr 26 14:14 components
drwxrwxrwx 1 root root 4096  Apr 26 14:14 core
drwxrwxrwx 1 root root 4096  Apr 26 14:14 demos
drwxrwxrwx 1 root root    0  Apr 26 14:38 external
-rwxrwxrwx 1 root root 1026  Apr 26 14:14 Makefile
drwxrwxrwx 1 root root    0  Apr 26 14:14 portfiles

Directory description:

  • ChangeLog.md: Update history for each feature module.

  • components: Subfolders for the selected feature modules.

  • core: Core SDK code files.

  • demos: Contains sample code for various features.

  • external: Third-party mbedtls library for TLS. Replaceable with another TLS library.

  • portfiles: TCP/IP stack and TLS library integration layer.

Note
  • Exclude the demos directory from your build system when porting. Add source files from all other directories.

  • If no port exists for your OS's TCP/IP stack or TLS library, implement the porting functions in the portfiles directory.

SDK header files

Note

To initialize the SDK, use the sample files in the LinkSDK/demos directory.

Include these header files:

#include "aiot_state_api.h"
#include "aiot_sysdep_api.h"

Consult each module's programming guide for additional required header files. For example, MQTT communication requires the aiot_mqtt_api.h header file as specified in MQTT access and data communication.

Next steps

Configure SDK features and start device-side development. Features.