- The C language Link Kit SDK is suitable for devices that use C language to develop business processing logic. Due to the fast running speed of C language and less running memory, most of the current IoT devices use C language for function development.
- The device needs to support the TCP/IP protocol stack or connect to the external network communication module through AT commands to integrate the Link Kit SDK. For non-IP devices such as zigbee/433/KNX, it needs to be connected to Alibaba Cloud IoT through a gateway device that integrates the Link Kit SDK. platform.
- C-SDK provides many functions such as MQTT to the cloud, CoAP to the cloud, OTA downloading firmware, advanced version of the object model, etc., and provides corresponding example programs for each function.
C-SDK itself is a cross-platform SDK that does not assume which hardware platform it runs on, and which operating system it runs on (or even without an operating system). Its dependence on the bottom layer is abstracted into a set of
HAL_XXX
style functional interfaces instead.The linkkit_demo example of AliOS Things can be used as a reference for the use of this SDK.
Link Kit SDK user programming interface
Alink protocol related API: ( Introduction to Alink protocol )
- IOT_Linkkit_Open
- IOT_Linkkit_Connect
- IOT_Linkkit_Yield
- IOT_Linkkit_Close
- IOT_Linkkit_TriggerEvent
- IOT_Linkkit_Report
- IOT_Linkkit_Query
- IOT_RegisterCallback
- IOT_Ioctl
- Detailed Event List
Basic API:
MQTT related API:
- IOT_MQTT_Construct
- IOT_MQTT_Destroy
- IOT_MQTT_Yield
- IOT_MQTT_CheckStateNormal
- IOT_MQTT_Subscribe
- IOT_MQTT_Subscribe_Sync
- IOT_MQTT_Unsubscribe
- IOT_MQTT_Publish
- IOT_MQTT_Publish_Simple
CoAP cloud related API:
- IOT_CoAP_Init
- IOT_CoAP_Deinit
- IOT_CoAP_DeviceNameAuth
- IOT_CoAP_Yield
- IOT_CoAP_SendMessage
- IOT_CoAP_GetMessagePayload
- IOT_CoAP_GetMessageCode
HTTP cloud related API:
OTA firmware download related API:
- IOT_OTA_Init
- IOT_OTA_Deinit
- IOT_OTA_ReportVersion
- IOT_OTA_ReportProgress
- IOT_OTA_IsFetching
- IOT_OTA_IsFetchFinish
- IOT_OTA_FetchYield
- IOT_OTA_Ioctl
- IOT_OTA_GetLastError
HTTP2 streaming related API:
- IOT_HTTP2_Connect
- IOT_HTTP2_Stream_Open
- IOT_HTTP2_Stream_Send
- IOT_HTTP2_Stream_Query
- IOT_HTTP2_Stream_Close
- IOT_HTTP2_Stream_UploadFile
- IOT_HTTP2_Disconnect
WIFI distribution network binding related API:
- awss_start
- awss_stop
- awss_config_press
- awss_dev_ap_start
- awss_dev_ap_stop
- awss_report_cloud
- awss_report_reset
- iotx_event_regist_cb
Link Kit SDK HAL interface
HAL related to basic functions:
- HAL_Free
- HAL_GetChipID
- HAL_GetDeviceID
- HAL_GetDeviceName
- HAL_GetDeviceSecret
- HAL_GetFirmwareVersion
- HAL_GetModuleID
- HAL_GetPartnerID
- HAL_GetProductKey
- HAL_GetProductSecret
- HAL_GetTimeStr
- HAL_Kv_Del
- HAL_Kv_Erase_All
- HAL_Kv_Get
- HAL_Kv_Set
- HAL_Malloc
- HAL_Printf
- HAL_Random
- HAL_Reboot
- HAL_SetDeviceName
- HAL_SetDeviceSecret
- HAL_SetProductKey
- HAL_SetProductSecret
- HAL_SleepMs
- HAL_Snprintf
- HAL_Srandom
- HAL_Timer_Create
- HAL_Timer_Delete
- HAL_Timer_Start
- HAL_Timer_Stop
- HAL_UptimeMs
- HAL_UTC_Get
- HAL_UTC_Set
- HAL_Vsnprintf
Multi-thread related HAL:
- HAL_MutexCreate
- HAL_MutexDestroy
- HAL_MutexLock
- HAL_MutexUnlock
- HAL_SemaphoreCreate
- HAL_SemaphoreDestroy
- HAL_SemaphorePost
- HAL_SemaphoreWait
- HAL_ThreadCreate
- HAL_ThreadDelete
- HAL_ThreadDetach
MQTT cloud related HAL:
- HAL_SSL_Destroy
- HAL_SSL_Establish
- HAL_SSL_Read
- HAL_SSL_Write
- HAL_TCP_Destroy
- HAL_TCP_Establish
- HAL_TCP_Read
- HAL_TCP_Write
CoAP cloud related HAL:
- IOT_CoAP_Init
- IOT_CoAP_Deinit
- IOT_CoAP_DeviceNameAuth
- IOT_CoAP_Yield
- IOT_CoAP_SendMessage
- IOT_CoAP_GetMessagePayload
- IOT_CoAP_GetMessageCode
OTA firmware upgrade related HAL:
HTTP2 streaming related HAL:
- HAL_SSL_Destroy
- HAL_SSL_Establish
- HAL_SSL_Read
- HAL_SSL_Write
- HAL_TCP_Destroy
- HAL_TCP_Establish
- HAL_TCP_Read
- HAL_TCP_Write
- HAL_Fopen
- HAL_Fread
- HAL_Fwrite
- HAL_Fseek
- HAL_Ftell
- HAL_Fclose
HAL related to WiFi distribution network:
- HAL_Aes128_Cbc_Decrypt
- HAL_Aes128_Cbc_Encrypt
- HAL_Aes128_Cfb_Decrypt
- HAL_Aes128_Cfb_Encrypt
- HAL_Aes128_Destroy
- HAL_Aes128_Init
- HAL_Awss_Close_Monitor
- HAL_Awss_Connect_Ap
- HAL_Awss_Get_Channelscan_Interval_Ms
- HAL_Awss_Get_Connect_Default_Ssid_Timeout_Interval_Ms
- HAL_Awss_Get_Timeout_Interval_Ms
- HAL_Awss_Open_Monitor
- HAL_Awss_Switch_Channel
- HAL_RF433_Get_Rssi_Dbm
- HAL_Sys_Net_Is_Ready
- HAL_Wifi_Enable_Mgmt_Frame_Filter
- HAL_Wifi_Get_Ap_Info
- HAL_Wifi_Get_IP
- HAL_Wifi_Get_Mac
- HAL_Wifi_Low_Power
- HAL_Wifi_Scan
- HAL_Wifi_Send_80211_Raw_Frame
- HAL_Awss_Open_Ap
- HAL_Awss_Close_Ap
Reference: Linkkit user manual