espressif / esp-qcloud

基于 ESP-IDF 原生开发接入腾讯 IoT Explorer,支持 ESP32/ESP32S2,快速实现腾讯连连控制。
Apache License 2.0
67 stars 36 forks source link

OTA升级好像遇到HTTPS相关问题 #41

Open yeahcool opened 5 months ago

yeahcool commented 5 months ago

W (3448) esp_qcloud_ota: esp_qcloud_iothub_ota_callback exit W (3458) esp_qcloud_ota: Starting OTA. This may take time. E (3458) esp_https_ota: No option for server verification is enabled in esp_http_client config. E (3468) esp_qcloud_ota: ESP HTTPS OTA Begin failed I (3488) esp_qcloud_ota: mqtt_publish, topic: $ota/report/021BPOBPWU/device_01, data: {"type":"report_progress","report":{"progress":{"state":"fail","result_code":"-1","result_msg":"ESP HTTPS OTA Begin failed"},"version":"1.0.2"}} E (3498) esp_qcloud_ota: ESP_HTTPS_OTA upgrade failed 258

打开menuconfig 的https 后, 能正常解析地址, 但报出这样的错误, 打开idf , http_client config中的3个(全部)选项, 问题依旧.

shixinke-orion commented 5 months ago

您好,该问题是因为服务器证书未传入导致,可以先按下述方案修改,后续会 fix

#include "esp_crt_bundle.h"

static void esp_qcloud_iothub_ota_task(void *arg)
{
         .....
    esp_http_client_config_t http_config = {
         .....
         .....
        .crt_bundle_attach = esp_crt_bundle_attach,
    };