glibc
or similar libraries which can provide system calls, including socket communication, SELECT sync IO, dynamic memory allocation, functions for getting time/sleeping/generating random number/printing, as well as critical data protection such as the mutex mechanism (only when multiple threads are required), only simple adaptation (e.g., changing the cross compiler settings in CMakeLists.txt
or make.settings
) is required before the SDK can be compiled and run.Newlib
and embedded TCP/IP protocol stacks like lwIP, adaptation for porting can be done easily.Name | Description |
CMakeLists.txt | CMake compilation and description file |
CMakeSettings.json | CMake configuration file on Visual Studio |
cmake_build.sh | Compilation script with CMake on Linux |
make.settings | Configuration file compiled directly by Makefile on Linux |
Makefile | Direct compilation with Makefile on Linux |
device_info.json | Device information file. If DEBUG_DEV_INFO_USED = OFF , the device information will be parsed from this file |
docs | Documentation directory, i.e., the use instructions of the SDKs for different platforms |
external_libs | Third-party package components, such as Mbed TLS |
samples | Application demos |
include | External header files provided to users |
platform | Platform source code files. Currently, implementations are provided for different OS (Linux/Windows/FreeRTOS/nonOS), TLS (Mbed TLS), and AT module |
sdk_src | Core communication protocols and service code of the SDK |
tools | Compilation and code generation script tools supporting the SDK |
samples
directory of the SDK for C contains demos showing how to use the features. For more information on how to run the demos, please see the corresponding documents in the SDK documentation directory.
For more information on device connection to and message sending/receiving in IoT Hub over MQTT, please see Getting Started with MQTT.samples/ota/ota_mqtt_sample.c
.tools/update_from_old_SDK.sh
script on Linux to replace the names in your own code, and then you can use the new version of the SDK directly.Old Name | New Name |
QCLOUD_ERR_SUCCESS | QCLOUD_RET_SUCCESS |
QCLOUD_ERR_MQTT_RECONNECTED | QCLOUD_RET_MQTT_RECONNECTED |
QCLOUD_ERR_MQTT_MANUALLY_DISCONNECTED | QCLOUD_RET_MQTT_MANUALLY_DISCONNECTED |
QCLOUD_ERR_MQTT_CONNACK_CONNECTION_ACCEPTED | QCLOUD_RET_MQTT_CONNACK_CONNECTION_ACCEPTED |
QCLOUD_ERR_MQTT_ALREADY_CONNECTED | QCLOUD_RET_MQTT_ALREADY_CONNECTED |
MAX_SIZE_OF_DEVICE_SERC | MAX_SIZE_OF_DEVICE_SECRET |
devCertFileName | dev_cert_file_name |
devPrivateKeyFileName | dev_key_file_name |
devSerc | device_secret |
MAX_SIZE_OF_PRODUCT_KEY | MAX_SIZE_OF_PRODUCT_SECRET |
product_key | product_secret |
DEBUG | eLOG_DEBUG |
INFO | eLOG_INFO |
WARN | eLOG_WARN |
ERROR | eLOG_ERROR |
DISABLE | eLOG_DISABLE |
Log_writter | IOT_Log_Gen |
qcloud_iot_dyn_reg_dev | IOT_DynReg_Device |
IOT_SYSTEM_GET_TIME | IOT_Get_SysTime |