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:
- Users developing on a
Ubuntu16.04can use the
make menuconfigcommand to edit
make.settingsfile in a GUI.
Modification of option names for the FEATURE_XXXfamily
|Former name||New name||Description|
||Capability switch of Thing Specification Language management (Alink JSON protocol)|
||Gateway capability switch in Thing Specification Language management|
||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.
- Deleted the
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_EMERGlog 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
iotx_ioctl_option_tenumeration definitions are available as parameter options.
IOT_Ioctl(), new options
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.
- In both the original base interface and the new interface, the first parameter
NULL, indicating that a default parameter is selected to create a connection or use a default connection, including:
- Deleted the
pwrite_bufmember and the
pread_bufmember in the
IOT_MQTT_Publish_Simple(), which can pass in string type parameters to represent topic and payload
int IOT_MQTT_Publish_Simple(void *handle, const char *topic_name, int qos, void *data, int len);
IOT_MQTT_Subscribe_Sync()interface, which can synchronize subscriptions in a blocked fashion. The function does not return until the subscription is successful.
int IOT_MQTT_Subscribe_Sync(void *handle,
const char *topic_filter,
- 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.
Because the first parameter of the MQTT function interface
NULL, the third parameter of the basic OTA function interface
IOT_OTA_Initcan also accept the
NULLinput parameter, which indicates that the default connection is used.
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
|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.|
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.
- Deleted the
HAL_Sys_rebootthat duplicates the existing