All Products
Document Center

Change List

Last Updated: Jun 29, 2020

This page records all changes in the Link Kit SDK that may affect users, including but not limited to function interfaces, directory files, and configuration modes.


Version 2.3.0 was released in November 2018, with the following changes from version 2.2.1, which was released on August 31, 2018:

make.settings file

  • Users developing on a 64-bit host running Ubuntu16.04can use the make menuconfig command to edit make.settings file in a GUI.
  • Modification of option names for the FEATURE_XXX family
Former name New name Description
FEATURE_SDK_ENHANCE FEATURE_DEVICE_MODEL_ENABLED Capability switch of Thing Specification Language management (Alink JSON protocol)
FEATURE_ENHANCED_GATEWAY FEATURE_DEVICE_MODEL_GATEWAY Gateway capability switch in Thing Specification Language management
FEATURE_WIFI_AWSS_ENABLED FEATURE_WIFI_PROVISION_ENABLED Capability switch for Wi-Fi network distribution
  • Added the following options
    • FEATURE_DEVICE_BIND_ENABLED: The switch for the device-binding feature. Only customers connecting to the Feeyan platform need to be aware of and turn on this switch. The switch enables device control from the public app.
    • FEATURE_ALCS_CLIENT_ENABLED: The switch for some of the client-side local communication features. It only needs to be turned on for devices (for example, border gateway) that need to control other IoT devices.
    • FEATURE_ALCS_SERVER_ENABLED: The switch for some of the server-side features in local communication. It needs to be turned on for devices that need to accept mobile apps or border gateway LAN controls.
    • FEATURE_AWSS_SUPPORT_SMARTCONFIG: the one-click distribution mode for Wi-Fi network distribution
    • FEATURE_AWSS_SUPPORT_ZEROCONFIG: the ZeroConfig mode for Wi-Fi network distribution
    • FEATURE_AWSS_SUPPORT_ROUTER: the router distribution mode for Wi-Fi network distribution
    • FEATURE_AWSS_SUPPORT_PHONEASAP: the mobile hotspot distribution mode for Wi-Fi network distribution
  • Deleted the following options
    • FEATURE_COAP_DTLS_SUPPORT: Whether the cloud on CoAP is encrypted by DTLS. User configuration is no longer required because it is always enabled.

Global function interface

  • Deleted the IOT_OpenLog() and IOT_CloseLog(), users can use the IOT_SetLogLevel() to control the level of details, if any, printed in the SDK log.
  • Deleted the IOT_LOG_EMERG log level and changed it into IOT_LOG_NONE. This is used for the IOT_SetLogLevel(IOT_LOG_NONE) to indicate the overall shutdown of the logging function.
  • Deleted the IOT_Linkkit_Ioctl(), the original function was merged into IOT_Ioctl(), iotx_ioctl_option_t enumeration definitions are available as parameter options.
  • Enhanced IOT_Ioctl(), new options IOTX_IOCTL_SET_MQTT_DOMAIN and IOTX_IOCTL_SET_HTTP_DOMAIN. These can be used to let customers pass the MQTT/HTTP domain name for custom connections to new sites overseas.

MQTT function interface

  • In both the original base interface and the new interface, the first parameter handle can pass NULL, indicating that a default parameter is selected to create a connection or use a default connection, including:
    • IOT_MQTT_Construct
    • IOT_MQTT_Destroy
    • IOT_MQTT_Yield
    • IOT_MQTT_LogPost
    • IOT_MQTT_CheckStateNormal
    • IOT_MQTT_Subscribe
    • IOT_MQTT_Unsubscribe
    • IOT_MQTT_Publish
    • IOT_MQTT_Subscribe_Sync
    • IOT_MQTT_Publish_Simple
  • Deleted the pwrite_buf member and the pread_buf member in the iotx_mqtt_param_t struct
  • Added IOT_MQTT_Publish_Simple(), which can pass in string type parameters to represent topic and payload

    1. int IOT_MQTT_Publish_Simple(void *handle, const char *topic_name, int qos, void *data, int len);
  • Added the IOT_MQTT_Subscribe_Sync() interface, which can synchronize subscriptions in a blocked fashion. The function does not return until the subscription is successful.

    1. int IOT_MQTT_Subscribe_Sync(void *handle,
    2. const char *topic_filter,
    3. iotx_mqtt_qos_t qos,
    4. iotx_mqtt_event_handle_func_fpt topic_handle_func,
    5. void *pcontext,
    6. int timeout_ms);
  • Optimized the IOT_MQTT_Subscribe() interface, offline subscriptions can be made before the MQTT connection is established, and the C-SDK will send subscription messages when the connection is established.

OTA function interface

  • Because the first parameter of the MQTT function interface handle can pass NULL, the third parameter of the basic OTA function interface IOT_OTA_Init can also accept the NULL input parameter, which indicates that the default connection is used.

    1. void *IOT_OTA_Init(const char *product_key, const char *device_name, void *ch_signal);

Added the following interfaces to complete the management function of the Thing Specification language

Function name Description
IOT_Linkkit_Open Creates local resources. Before performing network packet interaction, you must first call this API to get a handle for the session.
IOT_Linkkit_Connect Establishes communication between the primary device/gateway and the cloud. Registers the sub-device (if needed) with the cloud, and adds the topological relationship between the primary device and the sub-device.
IOT_Linkkit_Yield If the SDK occupies a separate thread, then this function is empty; otherwise, the SDK uses CPU to receive network packets and distribute packets to the user’s callback functions.
IOT_Linkkit_Close If the session handle in the input parameter is the primary device/gateway, it closes the network connection and releases all resources occupied by the SDK for this session.
IOT_Linkkit_TriggerEvent Sends event packets to the cloud, such as error codes and exception alarms.
IOT_Linkkit_Report Sends upstream packets that do not require cloud service data distribution to the cloud, including property values, device labels, pass-through data in binary format, and sub-device management.
IOT_Linkkit_Query Sends query packets that require cloud service data distribution to the cloud, including OTA status query, OTA firmware download, sub-device topology query, and NTP time query.
IOT_RegisterCallback Registers event callback functions for the SDK, such as cloud connection success/failure, property settings/service request arrival, and sub-device management packet reply.
IOT_Ioctl Performs various parameter runtime settings and acquisition for the SDK, as well as acquisition of the running status information. The argument can be of any data type.

Removed interfaces

Older versions of ‘linkkit_xxx()’ and ‘linkkit_gateway_xxx()’ interfaces can be optionally enabled when working at compile time. The default option is not to compile these.

Note 1: Older versions of the Link Kit interface can still be enabled by using the following statement in the make.settings file. When doing so, the new interface will be replaced by the old interface.


Note 2: To reduce device-side memory consumption, when users call the API change notification for the upload property of the SDK, or the event notifications reach the cloud, the SDK no longer checks the correctness of the data format. This means that users no longer need to export TSL json files from the cloud, convert them into C strings, and include them in the C code.

HAL function interface

  • Deleted the HAL_Sys_reboot that duplicates the existing HAL_Reboot<> interface`