Get the SDK

更新时间:
复制 MD 格式

The C Link software development kit (SDK) is designed for devices that use the C language to develop business logic. Most Internet of Things (IoT) devices use C for product development because of its high performance and low memory consumption.

Important: The Lifestyle IoT Platform has released a proprietary device-side SDK that includes new features for lifestyle scenarios. To connect a product to the Lifestyle IoT Platform, see Obtain SDK for information about product development.

Get the SDK

SDK 3.X

The latest version is v3.2.0. You can download the SDK from the Version history list.

Note
  • If you are developing products with v3.0.1 or v3.1.0 and do not need the new features, you do not need to upgrade the SDK.

  • If you are using SDK 2.3.0 and want to upgrade to SDK 3.0.1, see the Version change record.

SDK usage instructions

The SDK provides APIs that device manufacturers can call. You can use these APIs to communicate with the Alibaba Cloud IoT Platform and use other features, such as Wi-Fi provisioning and local control.

The C SDK is designed to run on different operating systems, such as Linux, FreeRTOS, and Windows. Operations that require operating system (OS) or hardware support are defined as Hardware Abstraction Layer (HAL) functions. You must implement these HAL functions when you develop products with the SDK.

The following figure shows the relationship between the product business logic, the SDK, and the HAL.image

You must implement the product business logic and the HAL. The `wrappers\os` directory in the SDK provides sample HAL implementations for Linux and FreeRTOS.

If you are new to the Alibaba Cloud IoT Platform, see Quick start to learn how to connect a simulated device on Ubuntu and understand the basic concepts.

Device connection guide

SDK tailoring

Integrate the SDK on an MCU

If your product uses a microcontroller unit (MCU) with an external Wi-Fi, 2G/3G/4G, or NB-IoT module to connect to the Internet, and your business logic runs on the MCU:

  • If the external module supports the Message Queuing Telemetry Transport (MQTT) protocol, see MCU with an MQTT-capable module to learn about the porting process.

  • If the external module does not support MQTT but supports the TCP protocol, see MCU with a TCP-capable module to learn about the porting process.

Integrate the SDK on a module or SOC

If you are a module vendor or you are integrating the SDK on a System on a Chip (SOC) that supports the TCP/IP protocol:

If the module or SOC supports MQTT, see Integrate the SDK on an MQTT-capable module. If the module or SOC supports TCP but not MQTT, see Integrate the SDK on a TCP-capable wide area network module.

SDK feature list

The following table lists the features of the latest C Link SDK.

Feature module

Feature details

Device cloud connection

  • MQTT connection. Devices can use MQTT to communicate with Alibaba Cloud IoT Platform.

  • CoAP connection. Devices can use the Constrained Application Protocol (CoAP) to communicate with Alibaba Cloud IoT Platform. This is used for scenarios where devices actively report information.

  • HTTPS connection. Devices can use HTTPS to communicate with Alibaba Cloud IoT Platform. This is used for scenarios where devices actively report information.

Device identity authentication

  • Device-specific secrets

  • One Secret per Product

Thing Specification Language model

Describe and implement devices using properties, services, and events, including the following:

  • Report and set properties

  • Service invocation

  • Report events

Cloud region settings

  • Vendor-specified region. Tell the device which Alibaba Cloud site to connect to, such as China (Shanghai), Singapore, US, or France.

  • Dynamic connection. The device automatically connects to the cloud site with the lowest latency.

OTA

Device firmware upgrade

Remote Configuration

Get device configuration files

Sub-device management

Lets a gateway device add, delete, and control sub-devices.

Wi-Fi provisioning

Transmit the SSID and password of a Wi-Fi hot spot to a Wi-Fi device, including the following:

  • One-click provisioning

  • Mobile hot spot provisioning

  • Device hot spot provisioning

  • Zero-configuration provisioning

Local device control

Control devices over a local area network (LAN) using the CoAP protocol. This includes: ALCS Server, implemented on the controlled device. ALCS Client, implemented on the controlling device. This is typically used by gateways that need to control devices locally.

Device binding support

Device binding token maintenance. Used when a device connects through Wi-Fi or Ethernet and is managed by the Alibaba Cloud Link Living Platform.

Device shadow

Store specified device information in the cloud for app queries. This avoids the latency caused by always getting information from the device.

Reset support

When a device performs a factory reset, notify the cloud to purge records. For example, purge the binding relationship between the device and user, or the association between a gateway and its sub-devices.

Time acquisition

Get the current time from Alibaba Cloud IoT Platform.

File upload

Upload files over HTTP.

Version history list

Version number

Release date

Download method

Update content

3.2.0

2020/03/03

git clone https://github.com/aliyun/iotkit-embedded.git -b v3.2.0

  • OTA supports software module upgrades.

  • TLS supports Server Name Indication (SNI).

  • Provides device shadow APIs.

3.1.0

2019/10/18

git clone https://github.com/aliyun/iotkit-embedded.git -b v3.1.0

  • Adds a status code mechanism for key procedures.

  • Wi-Fi provisioning enhancements: resolves AP Isolation, removes the router provisioning solution, and adds sample HAL function code for provisioning on Linux platforms.

  • Adds support for X.509.

  • OTA adds resumable downloads.

  • Sub-device management adds support for many-to-many topology relationships between sub-devices and gateways.

  • Optimizes system topic subscriptions to reduce subscription time.

3.0.1

2019/03/15

git clone https://github.com/aliyun/iotkit-embedded.git -b v3.0.1

  • Adds support for asynchronous and notification-based underlying TCP/IP protocol stacks.

  • Supports extracting the code for selected features to quickly add the SDK to a customer's build environment.

  • Automatically generates customer HAL adaptation files during code extraction.

  • Adds the HTTP/2 file upload feature.

  • Adds the device hot spot provisioning solution.

2.3.0

2018/11/19

git clone https://github.com/aliyun/iotkit-embedded.git -b v2.3.0

  • Adds a new set of Thing Specification Language model programming interfaces: IOT_Linkkit_XXX(). The old linkkit_xxx() interfaces are retained.

  • Adds support for graphical configuration.

  • The four Wi-Fi provisioning modes can be separated.

2.2.1

2018/09/03

git clone https://github.com/aliyun/iotkit-embedded.git -b v2.2.1

  • Adds the product-specific secret and dynamic registration features.

  • Adds the feature to download firmware over iTLS for OTA.

  • Open-sources the Wi-Fi provisioning feature.

  • Open-sources the local control feature.

2.2.0

2018/08/06

git clone https://github.com/aliyun/iotkit-embedded.git-b v2.2.0

  • Offline reset support.

  • Simplified TSL support.

  • Device disable and enable support.

  • TSL arrays support the object type.

  • MQTT supports connections to multiple sites outside China.

  • iTLS support.

2.1.0

2018/03/20

git clone https://github.com/aliyun/iotkit-embedded.git -b RELEASED_V2_1_20180320

  • Adds the CMake build system.

  • Adds Thing Specification Language model support.

2.0.3

2018/01/31

git clone https://github.com/aliyun/iotkit-embedded.git -b RELEASED_V2.03

  • Sub-device management support.

  • Optimizes TLS and fixes a memory leak.

  • Upgrades the MQTT channel to support longer topics, more subscription requests, and multi-threaded operations.

2.0.2

2017/11/30

git clone https://github.com/aliyun/iotkit-embedded.git -b RELEASED_V2_02_20171130

  • Adds mbedtls support, currently adapted for Linux and Windows systems.

  • Optimizes the HTTP interface to keep the TLS connection active when sending messages.

  • Adds OpenSSL adaptation.

  • Supports compiling libraries and examples for Windows 7 with mingw32.

  • `make reconfig` can now display and select adapted platforms.

2.0.1

2017/10/10

git clone https://github.com/aliyun/iotkit-embedded.git -b RELEASED_V2_01_20171010

  • Adds CoAP notification-based OTA.

  • Adds an HTTP+TLS cloud connection channel.

  • Refines OTA statuses.

  • Fixes errors that occurred when compiling the SDK with the armcc compiler.

2.0.0

2017/08/21

git clone https://github.com/aliyun/iotkit-embedded.git -b RELEASED_V2_00_20170818

  • Adds direct MQTT connection.

  • Adds a CoAP channel.

  • Adds the OTA feature.

  • Upgrades the build system.