From 69eb190310b94b429cce8657534cc160b51333e4 Mon Sep 17 00:00:00 2001 From: hiproz Date: Fri, 6 Aug 2021 12:55:00 +0800 Subject: [PATCH 1/2] esp_https_ota: change logs 1. add paired log for line393; 2. change log level to debug Closes https://github.com/espressif/esp-idf/pull/7375 Signed-off-by: Shubham Kulkarni --- components/esp_https_ota/src/esp_https_ota.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/esp_https_ota/src/esp_https_ota.c b/components/esp_https_ota/src/esp_https_ota.c index 910d652c91..56d2d9b4f7 100644 --- a/components/esp_https_ota/src/esp_https_ota.c +++ b/components/esp_https_ota/src/esp_https_ota.c @@ -390,7 +390,7 @@ esp_err_t esp_https_ota_perform(esp_https_ota_handle_t https_ota_handle) } else if (!is_recv_complete) { return ESP_ERR_HTTPS_OTA_IN_PROGRESS; } - ESP_LOGI(TAG, "Connection closed"); + ESP_LOGD(TAG, "Connection closed"); } else if (data_read > 0) { return _ota_write(handle, (const void *)handle->ota_upgrade_buf, data_read); } else { @@ -425,6 +425,7 @@ esp_err_t esp_https_ota_perform(esp_https_ota_handle_t https_ota_handle) ESP_LOGE(TAG, "Failed to establish HTTP connection"); return ESP_FAIL; } + ESP_LOGD(TAG, "Connection start"); return ESP_ERR_HTTPS_OTA_IN_PROGRESS; } } From 5eb1570a018b4947a8b88c8059f0e0adf7c37c8e Mon Sep 17 00:00:00 2001 From: Shubham Kulkarni Date: Thu, 19 Aug 2021 11:51:39 +0530 Subject: [PATCH 2/2] advanced_https_ota_example: Enable debug logs for partial HTTP download test --- examples/system/ota/advanced_https_ota/example_test.py | 4 +++- .../ota/advanced_https_ota/sdkconfig.ci.partial_download | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/system/ota/advanced_https_ota/example_test.py b/examples/system/ota/advanced_https_ota/example_test.py index d0f228c6ad..4803ab873e 100644 --- a/examples/system/ota/advanced_https_ota/example_test.py +++ b/examples/system/ota/advanced_https_ota/example_test.py @@ -525,13 +525,15 @@ def test_examples_protocol_advanced_https_ota_example_partial_request(env, extra """ dut1 = env.get_dut('advanced_https_ota_example', 'examples/system/ota/advanced_https_ota', dut_class=ttfw_idf.ESP32DUT, app_config_name='partial_download') server_port = 8001 + # Size of partial HTTP request + request_size = 16384 # File to be downloaded. This file is generated after compilation bin_name = 'advanced_https_ota.bin' # check and log bin size binary_file = os.path.join(dut1.app.binary_path, bin_name) bin_size = os.path.getsize(binary_file) ttfw_idf.log_performance('advanced_https_ota_bin_size', '{}KB'.format(bin_size // 1024)) - http_requests = int((bin_size / 50000) + 1) + http_requests = int((bin_size / request_size) - 1) # start test host_ip = get_my_ip() if (get_server_status(host_ip, server_port) is False): diff --git a/examples/system/ota/advanced_https_ota/sdkconfig.ci.partial_download b/examples/system/ota/advanced_https_ota/sdkconfig.ci.partial_download index bf8a545515..a0d2e342f1 100644 --- a/examples/system/ota/advanced_https_ota/sdkconfig.ci.partial_download +++ b/examples/system/ota/advanced_https_ota/sdkconfig.ci.partial_download @@ -3,3 +3,5 @@ CONFIG_EXAMPLE_SKIP_COMMON_NAME_CHECK=y CONFIG_EXAMPLE_SKIP_VERSION_CHECK=y CONFIG_EXAMPLE_OTA_RECV_TIMEOUT=3000 CONFIG_EXAMPLE_ENABLE_PARTIAL_HTTP_DOWNLOAD=y + +CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y