diff --git a/components/clouds/qcloud/include/qcloud_iot_export_log.h b/components/clouds/qcloud/include/qcloud_iot_export_log.h new file mode 100644 index 00000000..9b85cffb --- /dev/null +++ b/components/clouds/qcloud/include/qcloud_iot_export_log.h @@ -0,0 +1,209 @@ +/* + * Tencent is pleased to support the open source community by making IoT Hub + available. + * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. + + * Licensed under the MIT License (the "License"); you may not use this file + except in + * compliance with the License. You may obtain a copy of the License at + * http://opensource.org/licenses/MIT + + * Unless required by applicable law or agreed to in writing, software + distributed under the License is + * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, + * either express or implied. See the License for the specific language + governing permissions and + * limitations under the License. + * + */ + +#ifndef QCLOUD_IOT_EXPORT_LOG_H_ +#define QCLOUD_IOT_EXPORT_LOG_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include + +#include "qcloud_iot_export_variables.h" + +/** + * SDK log print/upload level + */ +typedef enum { eLOG_DISABLE = 0, eLOG_ERROR = 1, eLOG_WARN = 2, eLOG_INFO = 3, eLOG_DEBUG = 4 } LOG_LEVEL; + +/** + * log print level control, only print logs with level less or equal to this + * variable + */ +extern LOG_LEVEL g_log_print_level; + +/** + * log upload level control, only upload logs with level less or equal to this + * variable + */ +extern LOG_LEVEL g_log_upload_level; + +/* user's self defined log handler callback */ +typedef bool (*LogMessageHandler)(const char *message); + +/** + * @brief user callback for saving/reading logs into/from NVS(files/FLASH) after + * upload fail/recover + */ +// callback for saving logs into NVS(files/FLASH) after upload fail +typedef size_t (*LogSaveFunc)(const char *msg, size_t wLen); +// callback for reading logs from NVS(files/FLASH) when upload ready +typedef size_t (*LogReadFunc)(char *buff, size_t rLen); +// callback for deleting logs in NVS(files/FLASH). return 0 when success +typedef int (*LogDelFunc)(); +// callback for reading the size of logs in NVS(files/FLASH). return 0 when +// nothing exist +typedef size_t (*LogGetSizeFunc)(); + +/** + * @brief data structure to init feature of log upload + */ +typedef struct { + const char *region; // region + /* device info */ + const char *product_id; + const char *device_name; + /* auth key, use device secret for PSK device and cert file path for cert + * device */ + const char *sign_key; + /* user callback saving/reading logs into/from NVS(files/FLASH) */ + LogSaveFunc save_func; + LogReadFunc read_func; + LogDelFunc del_func; + LogGetSizeFunc get_size_func; +} LogUploadInitParams; + +/** + * @brief Set the global log level of print + * + * @param level + */ +void IOT_Log_Set_Level(LOG_LEVEL level); + +/** + * @brief Get the global log level of print + * + * @return + */ +LOG_LEVEL IOT_Log_Get_Level(); + +/** + * @brief Set the global log level of upload + * + * @param level + */ +void IOT_Log_Set_Upload_Level(LOG_LEVEL level); + +/** + * @brief Get the global log level of upload + * + * @return + */ +LOG_LEVEL IOT_Log_Get_Upload_Level(); + +/** + * @brief Set user callback to print log into whereever you want + * + * @param handler function pointer of callback + * + */ +void IOT_Log_Set_MessageHandler(LogMessageHandler handler); + +/** + * @brief Init the resource for log upload + * + * @param init_params init parameter + * @return QCLOUD_RET_SUCCESS when success, or error code when fail + * + */ +int IOT_Log_Init_Uploader(LogUploadInitParams *init_params); + +/** + * @brief Stop log upload and release the resource + * + * @return + */ +void IOT_Log_Fini_Uploader(void); + +/** + * @brief Do one log upload + * + * @param force_upload true = upload log at once, false = upload in defined time + * interval + * @return QCLOUD_RET_SUCCESS when success, or error code when fail + */ +int IOT_Log_Upload(bool force_upload); + +/** + * @brief Generate log for print/upload, call LogMessageHandler if defined + * + * When LOG_UPLOAD is enabled, the log will be uploaded to cloud server + * + * @param file + * @param func + * @param line + * @param level + */ +void IOT_Log_Gen(const char *file, const char *func, const int line, const int level, const char *fmt, ...); + +/* Simple APIs for log generation in different level */ +#define Log_d(fmt, ...) IOT_Log_Gen(__FILE__, __FUNCTION__, __LINE__, eLOG_DEBUG, fmt, ##__VA_ARGS__) +#define Log_i(fmt, ...) IOT_Log_Gen(__FILE__, __FUNCTION__, __LINE__, eLOG_INFO, fmt, ##__VA_ARGS__) +#define Log_w(fmt, ...) IOT_Log_Gen(__FILE__, __FUNCTION__, __LINE__, eLOG_WARN, fmt, ##__VA_ARGS__) +#define Log_e(fmt, ...) IOT_Log_Gen(__FILE__, __FUNCTION__, __LINE__, eLOG_ERROR, fmt, ##__VA_ARGS__) + +/* Macro for debug mode */ +#ifdef IOT_DEBUG +#define IOT_FUNC_ENTRY \ + { \ + printf("FUNC_ENTRY: %s L#%d \n", __FUNCTION__, __LINE__); \ + } +#define IOT_FUNC_EXIT \ + { \ + printf("FUNC_EXIT: %s L#%d \n", __FUNCTION__, __LINE__); \ + return; \ + } +#define IOT_FUNC_EXIT_RC(x) \ + { \ + printf("FUNC_EXIT: %s L#%d Return Code : %ld \n", __FUNCTION__, __LINE__, (long)(x)); \ + return x; \ + } +#else +#define IOT_FUNC_ENTRY +#define IOT_FUNC_EXIT \ + { \ + return; \ + } +#define IOT_FUNC_EXIT_RC(x) \ + { \ + return x; \ + } +#endif + +/* Macro for interval debug */ +//#define LOG_UPLOAD_DEBUG +#ifdef LOG_UPLOAD_DEBUG +#define UPLOAD_DBG(fmt, ...) HAL_Printf(">>LOG-DBG>>%s(%d): " fmt "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) +#else +#define UPLOAD_DBG(...) +#endif +#define UPLOAD_ERR(fmt, ...) HAL_Printf(">>LOG-ERR>>%s(%d): " fmt "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) + +#define STRING_PTR_PRINT_SANITY_CHECK(ptr) ((ptr) ? (ptr) : "null") + +#ifdef __cplusplus +} +#endif + +#endif /* QCLOUD_IOT_EXPORT_LOG_H_ */ diff --git a/components/clouds/qcloud/include/qcloud_iot_export_variables.h b/components/clouds/qcloud/include/qcloud_iot_export_variables.h new file mode 100644 index 00000000..3ce910a3 --- /dev/null +++ b/components/clouds/qcloud/include/qcloud_iot_export_variables.h @@ -0,0 +1,74 @@ +/* + * Tencent is pleased to support the open source community by making IoT Hub available. + * Copyright (C) 2018-2020 THL A29 Limited, a Tencent company. All rights reserved. + + * Licensed under the MIT License (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://opensource.org/licenses/MIT + + * Unless required by applicable law or agreed to in writing, software distributed under the License is + * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef QCLOUD_IOT_EXPORT_VARIABLES_H_ +#define QCLOUD_IOT_EXPORT_VARIABLES_H_ + +/* + * Below variables are dependant on user situation (network status/device memory/application context) + * Adjust the default value to meet your requirement + */ + +/* default MQTT/CoAP timeout value when connect/pub/sub (unit: ms) */ +#define QCLOUD_IOT_MQTT_COMMAND_TIMEOUT (5 * 1000) + +/* default MQTT keep alive interval (unit: ms) */ +#define QCLOUD_IOT_MQTT_KEEP_ALIVE_INTERNAL (240 * 1000) + +/* default MQTT Tx buffer size, MAX: 16*1024 */ +#define QCLOUD_IOT_MQTT_TX_BUF_LEN (2304) + +/* default MQTT Rx buffer size, MAX: 16*1024 */ +#define QCLOUD_IOT_MQTT_RX_BUF_LEN (2304) + +/* default COAP Tx buffer size, MAX: 1*1024 */ +#define COAP_SENDMSG_MAX_BUFLEN (512) + +/* default COAP Rx buffer size, MAX: 1*1024 */ +#define COAP_RECVMSG_MAX_BUFLEN (512) + +/* MAX MQTT reconnect interval (unit: ms) */ +#define MAX_RECONNECT_WAIT_INTERVAL (60 * 1000) + +/* MAX valid time when connect to MQTT server. 0: always valid */ +/* Use this only if the device has accurate UTC time. Otherwise, set to 0 */ +#define MAX_ACCESS_EXPIRE_TIMEOUT (0) + +/* log print/upload related variables */ +/* MAX size of log buffer for one log item including header and content */ +#define MAX_LOG_MSG_LEN (511) + +#if defined(__linux__) +#undef MAX_LOG_MSG_LEN +#define MAX_LOG_MSG_LEN (1023) +#endif + +/* + * Log upload related params, which will affect the size of device memory/disk consumption + * the default value can be changed for different user situation + */ +// size of buffer for log upload +#define LOG_UPLOAD_BUFFER_SIZE 5000 + +// Max size of one http log upload. Should not larger than 5000 +#define MAX_HTTP_LOG_POST_SIZE 3000 + +// MAX size for saving log into NVS (files/FLASH) after upload fail +#define MAX_LOG_SAVE_SIZE (3 * LOG_UPLOAD_BUFFER_SIZE) + +// interval of log upload (unit: ms) Decrease this value if LOG_UPLOAD_BUFFER_SIZE is small +#define LOG_UPLOAD_INTERVAL_MS 2000 + +#endif /* QCLOUD_IOT_EXPORT_VARIABLES_H_ */ diff --git a/components/clouds/qcloud/lib/VERSION b/components/clouds/qcloud/lib/VERSION index 08c14b4e..c74d5046 100644 --- a/components/clouds/qcloud/lib/VERSION +++ b/components/clouds/qcloud/lib/VERSION @@ -1,2 +1,2 @@ -ESP32: ac31d7c -ESP32C3: ac31d7c +ESP32: 965ecb9 +ESP32C3: 965ecb9 diff --git a/components/clouds/qcloud/lib/libesp32_qcloud_core.a b/components/clouds/qcloud/lib/libesp32_qcloud_core.a index 1d1f4f30..b16359de 100644 Binary files a/components/clouds/qcloud/lib/libesp32_qcloud_core.a and b/components/clouds/qcloud/lib/libesp32_qcloud_core.a differ diff --git a/components/clouds/qcloud/lib/libesp32_qcloud_core_silence.a b/components/clouds/qcloud/lib/libesp32_qcloud_core_silence.a index 0af1bfe3..155bab66 100644 Binary files a/components/clouds/qcloud/lib/libesp32_qcloud_core_silence.a and b/components/clouds/qcloud/lib/libesp32_qcloud_core_silence.a differ diff --git a/components/clouds/qcloud/lib/libesp32c3_qcloud_core.a b/components/clouds/qcloud/lib/libesp32c3_qcloud_core.a index 25fdd210..a535c2b6 100644 Binary files a/components/clouds/qcloud/lib/libesp32c3_qcloud_core.a and b/components/clouds/qcloud/lib/libesp32c3_qcloud_core.a differ diff --git a/components/clouds/qcloud/lib/libesp32c3_qcloud_core_silence.a b/components/clouds/qcloud/lib/libesp32c3_qcloud_core_silence.a index 5d802e78..038020b3 100644 Binary files a/components/clouds/qcloud/lib/libesp32c3_qcloud_core_silence.a and b/components/clouds/qcloud/lib/libesp32c3_qcloud_core_silence.a differ diff --git a/main/Kconfig b/main/Kconfig index 5003d152..2e80b665 100644 --- a/main/Kconfig +++ b/main/Kconfig @@ -337,7 +337,33 @@ config AT_QCLOUD_IOT_COMMAND_SUPPORT config AT_QCLOUD_IOT_GENERATE_FACTORY_INFO bool "Automatically generate qcloud_modinfo.bin, qcloud_devinfo.bin and qcloud_prdinfo.bin" - default "y" + default "y" + depends on AT_QCLOUD_IOT_COMMAND_SUPPORT + +choice AT_QCLOUD_IOT_LOG_LEVEL + + bool "QCLOUD default log verbosity" + default AT_QCLOUD_IOT_LOG_LEVEL_ERROR depends on AT_QCLOUD_IOT_COMMAND_SUPPORT + + config AT_QCLOUD_IOT_LOG_LEVEL_NONE + bool "No output" + config AT_QCLOUD_IOT_LOG_LEVEL_ERROR + bool "Error" + config AT_QCLOUD_IOT_LOG_LEVEL_WARN + bool "Warning" + config AT_QCLOUD_IOT_LOG_LEVEL_INFO + bool "Info" + config AT_QCLOUD_IOT_LOG_LEVEL_DEBUG + bool "Debug" +endchoice + +config AT_QCLOUD_IOT_LOG_LEVEL + int + default 0 if AT_QCLOUD_IOT_LOG_LEVEL_NONE + default 1 if AT_QCLOUD_IOT_LOG_LEVEL_ERROR + default 2 if AT_QCLOUD_IOT_LOG_LEVEL_WARN + default 3 if AT_QCLOUD_IOT_LOG_LEVEL_INFO + default 4 if AT_QCLOUD_IOT_LOG_LEVEL_DEBUG endmenu endmenu diff --git a/main/app_main.c b/main/app_main.c index 4554f659..e1f1b583 100644 --- a/main/app_main.c +++ b/main/app_main.c @@ -40,6 +40,7 @@ #ifdef CONFIG_AT_QCLOUD_IOT_COMMAND_SUPPORT #include "qcloud_iot_at.h" +#include "qcloud_iot_export_log.h" #endif #include "esp_at.h" @@ -286,6 +287,8 @@ void app_main(void) #endif #ifdef CONFIG_AT_QCLOUD_IOT_COMMAND_SUPPORT + IOT_Log_Set_Level(CONFIG_AT_QCLOUD_IOT_LOG_LEVEL); + if(esp_at_qcloud_iot_cmd_regist() == false) { printf("qcloud at init fail\r\n"); } diff --git a/module_config/module_esp32_qcloud/README.md b/module_config/module_esp32_qcloud/README.md old mode 100755 new mode 100644 index 539819d4..bd0e56d6 --- a/module_config/module_esp32_qcloud/README.md +++ b/module_config/module_esp32_qcloud/README.md @@ -1,15 +1,37 @@ # QCloud AT Customized partition table + QCloud AT command set use its own partition table : -1. The Size of App in `partitions_at.csv` is 0x180000 . -2. QCloud App needs several customized partitions in at_customize section , `qcloud_modinfo` , `qcloud_devinfo` , `qcloud_prdinfo` and `qcloud_errlog` , as can be found in at_customize.csv. Please make sure these partitions exist. +1. The Size of App in `partitions_at.csv` is 0x180000. +2. The QCloud App needs to use the QCloud partition `qcloud_errlog` defined in `at_customize.csv`. Please make sure the partition exists. 3. QCloud App also need a FLASH area to do firmware OTA for MCU side. The start address and size of the OTA area is module dependant and can be defined by `AT+TCMODINFOSET` command. For QCloud IoT AT commands, please refer to [Customized AT Commands and Firmware](../../docs/en/Customized_AT_Commands_and_Firmware/index.rst) +## BIN file generation tool + +To facilitate factory production, BIN file generation tools in `bin_gen_tool` folder are provided to convert readable `csv` files into binary files. `qcloud_iot_bin_tool_linux` for Linux and `qcloud_iot_bin_tool_win.exe` for Windows platform ('-h' for the tool help message). Please also check each `sample.csv` file for the parameters: + +1. `ModInfo` bin file is stored in the `qcloud_modinfo` partition which defined in at_customize.csv. And can be query by `AT+TCMODINFOSET?` command. +2. `DevInfo` bin file is stored in the `qcloud_devinfo` partition which defined in at_customize.csv. And can be query by `AT+TCDEVINFOSET?` command. +3. `PrdInfo` bin file is stored in the `qcloud_prdinfo` partition which defined in at_customize.csv. And can be query by `AT+TCPRDINFOSET?` command. + +To prevent security risk, please note the tools are not for public usage and only for dedicated customers. If you want to use it, please contact [Espressif](https://www.espressif.com/en/contact-us/sales-questions). + # QCloud AT 自定义分区表 + QCloud AT 命令集使用自定义的分区表: -1. `partitions_at.csv` 中定义的 App 大小为 0x180000 . -2. QCloud App 需要使用在 `at_customize.csv` 中定义的 QCloud 分区 `qcloud_modinfo`, `qcloud_devinfo`, `qcloud_prdinfo` 和 `qcloud_errlog` . 请确保上述分区存在. -3. QCloud App 需要一个 FLASH 区域来为 MCU 端执行 OTA . OTA 的起始地址和大小取决于所用模块,可以通过 `AT+TCMODINFOSET` 命令定义. +1. `partitions_at.csv` 中定义的 App 大小为 0x180000。 +2. QCloud App 需要使用在 `at_customize.csv` 中定义的 QCloud 分区 `qcloud_errlog`。 请确保该分区存在。 +4. QCloud App 需要一个 FLASH 区域来为 MCU 端执行 OTA。 OTA 的起始地址和大小取决于所用模块,可以通过 `AT+TCMODINFOSET` 命令定义。 + +对于 QCloud IoT AT 命令集,请参考 [第三方定制化 AT 命令和固件](../../docs/zh_CN/Customized_AT_Commands_and_Firmware/index.rst) + +## 二进制文件生成工具 + +为了方便工厂生产,提供了 `bin_gen_tool` 目录中的二进制文件生成工具,用于将可读的 `csv` 文件转换成二进制文件。`qcloud_iot_bin_tool_linux` 适用于 Linux 平台,`qcloud_iot_bin_tool_win.exe` 适用于 Windows 平台('-h' 选项用于工具帮助消息)。请检查每个 `sample.csv` 文件的参数: + +1. `ModInfo` 二进制文件存放在 at_customize.csv 中定义的 `qcloud_modinfo` 分区中。可以通过命令 `AT+TCMODINFOSET?` 查询。 +2. `DevInfo` 二进制文件存放在 at_customize.csv 中定义的 `qcloud_devinfo` 分区中。可以通过命令 `AT+TCDEVINFOSET?` 查询。 +3. `PrdInfo` 二进制文件存放在 at_customize.csv 中定义的 `qcloud_prdinfo` 分区中。可以通过命令 `AT+TCPRDINFOSET?` 查询。 -对于 QCloud IoT AT 命令集, 请参考 [第三方定制化 AT 命令和固件](../../docs/zh_CN/Customized_AT_Commands_and_Firmware/index.rst) \ No newline at end of file +为防止安全风险,请注意这些工具不提供给公众使用,仅供专门客户使用。 如需使用,请联系[乐鑫](https://www.espressif.com/zh-hans/contact-us/sales-questions)。 diff --git a/module_config/module_esp32_qcloud/at_customize.csv b/module_config/module_esp32_qcloud/at_customize.csv index 207e2365..80d96571 100644 --- a/module_config/module_esp32_qcloud/at_customize.csv +++ b/module_config/module_esp32_qcloud/at_customize.csv @@ -13,11 +13,8 @@ wpa2_ca,0x40,11,0x35000,8K mqtt_cert,0x40,12,0x37000,8K mqtt_key,0x40,13,0x39000,8K mqtt_ca,0x40,14,0x3B000,8K -qcloud_subprd,0x40,15,0x61000,20K -qcloud_subdev,0x40,16,0x66000,20K -qcloud_modinfo,0x40,17,0x6B000,4K -qcloud_devinfo,0x40,18,0x6C000,4K -qcloud_prdinfo,0x40,19,0x6D000,4K -qcloud_fwinfo,0x40,20,0x6E000,4K -qcloud_errlog,0x40,21,0x6F000,4K +qcloud_modinfo,0x40,15,0x6C000,4K +qcloud_devinfo,0x40,16,0x6D000,4K +qcloud_prdinfo,0x40,17,0x6E000,4K +qcloud_errlog,0x40,18,0x6F000,4K fatfs,data,fat,0x70000,576K diff --git a/module_config/module_esp32c3_qcloud/README.md b/module_config/module_esp32c3_qcloud/README.md old mode 100755 new mode 100644 index 539819d4..9f1e66ed --- a/module_config/module_esp32c3_qcloud/README.md +++ b/module_config/module_esp32c3_qcloud/README.md @@ -1,15 +1,37 @@ # QCloud AT Customized partition table + QCloud AT command set use its own partition table : -1. The Size of App in `partitions_at.csv` is 0x180000 . -2. QCloud App needs several customized partitions in at_customize section , `qcloud_modinfo` , `qcloud_devinfo` , `qcloud_prdinfo` and `qcloud_errlog` , as can be found in at_customize.csv. Please make sure these partitions exist. +1. The Size of App in `partitions_at.csv` is 0x1D0000. +2. The QCloud App needs to use the QCloud partition `qcloud_errlog` defined in `at_customize.csv`. Please make sure the partition exists. 3. QCloud App also need a FLASH area to do firmware OTA for MCU side. The start address and size of the OTA area is module dependant and can be defined by `AT+TCMODINFOSET` command. For QCloud IoT AT commands, please refer to [Customized AT Commands and Firmware](../../docs/en/Customized_AT_Commands_and_Firmware/index.rst) +## BIN file generation tool + +To facilitate factory production, BIN file generation tools in `bin_gen_tool` folder are provided to convert readable `csv` files into binary files. `qcloud_iot_bin_tool_linux` for Linux and `qcloud_iot_bin_tool_win.exe` for Windows platform ('-h' for the tool help message). Please also check each `sample.csv` file for the parameters: + +1. `ModInfo` bin file is stored in the `qcloud_modinfo` partition which defined in at_customize.csv. And can be query by `AT+TCMODINFOSET?` command. +2. `DevInfo` bin file is stored in the `qcloud_devinfo` partition which defined in at_customize.csv. And can be query by `AT+TCDEVINFOSET?` command. +3. `PrdInfo` bin file is stored in the `qcloud_prdinfo` partition which defined in at_customize.csv. And can be query by `AT+TCPRDINFOSET?` command. + +To prevent security risk, please note the tools are not for public usage and only for dedicated customers. If you want to use it, please contact [Espressif](https://www.espressif.com/en/contact-us/sales-questions). + # QCloud AT 自定义分区表 + QCloud AT 命令集使用自定义的分区表: -1. `partitions_at.csv` 中定义的 App 大小为 0x180000 . -2. QCloud App 需要使用在 `at_customize.csv` 中定义的 QCloud 分区 `qcloud_modinfo`, `qcloud_devinfo`, `qcloud_prdinfo` 和 `qcloud_errlog` . 请确保上述分区存在. -3. QCloud App 需要一个 FLASH 区域来为 MCU 端执行 OTA . OTA 的起始地址和大小取决于所用模块,可以通过 `AT+TCMODINFOSET` 命令定义. +1. `partitions_at.csv` 中定义的 App 大小为 0x180000。 +2. QCloud App 需要使用在 `at_customize.csv` 中定义的 QCloud 分区 `qcloud_errlog`。 请确保该分区存在。 +4. QCloud App 需要一个 FLASH 区域来为 MCU 端执行 OTA。 OTA 的起始地址和大小取决于所用模块,可以通过 `AT+TCMODINFOSET` 命令定义。 + +对于 QCloud IoT AT 命令集,请参考 [第三方定制化 AT 命令和固件](../../docs/zh_CN/Customized_AT_Commands_and_Firmware/index.rst) + +## 二进制文件生成工具 + +为了方便工厂生产,提供了 `bin_gen_tool` 目录中的二进制文件生成工具,用于将可读的 `csv` 文件转换成二进制文件。`qcloud_iot_bin_tool_linux` 适用于 Linux 平台,`qcloud_iot_bin_tool_win.exe` 适用于 Windows 平台('-h' 选项用于工具帮助消息)。请检查每个 `sample.csv` 文件的参数: + +1. `ModInfo` 二进制文件存放在 at_customize.csv 中定义的 `qcloud_modinfo` 分区中。可以通过命令 `AT+TCMODINFOSET?` 查询。 +2. `DevInfo` 二进制文件存放在 at_customize.csv 中定义的 `qcloud_devinfo` 分区中。可以通过命令 `AT+TCDEVINFOSET?` 查询。 +3. `PrdInfo` 二进制文件存放在 at_customize.csv 中定义的 `qcloud_prdinfo` 分区中。可以通过命令 `AT+TCPRDINFOSET?` 查询。 -对于 QCloud IoT AT 命令集, 请参考 [第三方定制化 AT 命令和固件](../../docs/zh_CN/Customized_AT_Commands_and_Firmware/index.rst) \ No newline at end of file +为防止安全风险,请注意这些工具不提供给公众使用,仅供专门客户使用。 如需使用,请联系[乐鑫](https://www.espressif.com/zh-hans/contact-us/sales-questions)。 \ No newline at end of file diff --git a/module_config/module_esp32c3_qcloud/at_customize.csv b/module_config/module_esp32c3_qcloud/at_customize.csv index 7bb4fb78..9f1b3527 100644 --- a/module_config/module_esp32c3_qcloud/at_customize.csv +++ b/module_config/module_esp32c3_qcloud/at_customize.csv @@ -13,11 +13,8 @@ wpa2_ca, 0x40, 11, 0x36000, 8K mqtt_cert, 0x40, 12, 0x38000, 8K mqtt_key, 0x40, 13, 0x3a000, 8K mqtt_ca, 0x40, 14, 0x3c000, 8K -qcloud_subprd, 0x40, 15, 0x3E000, 20K -qcloud_subdev, 0x40, 16, 0x43000, 20K -qcloud_modinfo, 0x40, 17, 0x48000, 4K -qcloud_devinfo, 0x40, 18, 0x49000, 4K -qcloud_prdinfo, 0x40, 19, 0x4A000, 4K -qcloud_fwinfo, 0x40, 20, 0x4B000, 4K -qcloud_errlog, 0x40, 21, 0x4C000, 4K -fatfs, data, fat, 0x4D000, 76K +qcloud_modinfo, 0x40, 15, 0x43000, 4K +qcloud_devinfo, 0x40, 16, 0x44000, 4K +qcloud_prdinfo, 0x40, 17, 0x45000, 4K +qcloud_errlog, 0x40, 18, 0x46000, 4K +fatfs, data, fat, 0x47000, 100K