mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 07:04:32 +02:00
Merge branch 'bugfix/esp_https_ota_log' into 'master'
Fix log level in esp_https_ota (GitHub PR) Closes IDFGH-5653 See merge request espressif/esp-idf!14860
This commit is contained in:
@@ -390,7 +390,7 @@ esp_err_t esp_https_ota_perform(esp_https_ota_handle_t https_ota_handle)
|
|||||||
} else if (!is_recv_complete) {
|
} else if (!is_recv_complete) {
|
||||||
return ESP_ERR_HTTPS_OTA_IN_PROGRESS;
|
return ESP_ERR_HTTPS_OTA_IN_PROGRESS;
|
||||||
}
|
}
|
||||||
ESP_LOGI(TAG, "Connection closed");
|
ESP_LOGD(TAG, "Connection closed");
|
||||||
} else if (data_read > 0) {
|
} else if (data_read > 0) {
|
||||||
return _ota_write(handle, (const void *)handle->ota_upgrade_buf, data_read);
|
return _ota_write(handle, (const void *)handle->ota_upgrade_buf, data_read);
|
||||||
} else {
|
} 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");
|
ESP_LOGE(TAG, "Failed to establish HTTP connection");
|
||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
}
|
}
|
||||||
|
ESP_LOGD(TAG, "Connection start");
|
||||||
return ESP_ERR_HTTPS_OTA_IN_PROGRESS;
|
return ESP_ERR_HTTPS_OTA_IN_PROGRESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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')
|
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
|
server_port = 8001
|
||||||
|
# Size of partial HTTP request
|
||||||
|
request_size = 16384
|
||||||
# File to be downloaded. This file is generated after compilation
|
# File to be downloaded. This file is generated after compilation
|
||||||
bin_name = 'advanced_https_ota.bin'
|
bin_name = 'advanced_https_ota.bin'
|
||||||
# check and log bin size
|
# check and log bin size
|
||||||
binary_file = os.path.join(dut1.app.binary_path, bin_name)
|
binary_file = os.path.join(dut1.app.binary_path, bin_name)
|
||||||
bin_size = os.path.getsize(binary_file)
|
bin_size = os.path.getsize(binary_file)
|
||||||
ttfw_idf.log_performance('advanced_https_ota_bin_size', '{}KB'.format(bin_size // 1024))
|
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
|
# start test
|
||||||
host_ip = get_my_ip()
|
host_ip = get_my_ip()
|
||||||
if (get_server_status(host_ip, server_port) is False):
|
if (get_server_status(host_ip, server_port) is False):
|
||||||
|
@@ -3,3 +3,5 @@ CONFIG_EXAMPLE_SKIP_COMMON_NAME_CHECK=y
|
|||||||
CONFIG_EXAMPLE_SKIP_VERSION_CHECK=y
|
CONFIG_EXAMPLE_SKIP_VERSION_CHECK=y
|
||||||
CONFIG_EXAMPLE_OTA_RECV_TIMEOUT=3000
|
CONFIG_EXAMPLE_OTA_RECV_TIMEOUT=3000
|
||||||
CONFIG_EXAMPLE_ENABLE_PARTIAL_HTTP_DOWNLOAD=y
|
CONFIG_EXAMPLE_ENABLE_PARTIAL_HTTP_DOWNLOAD=y
|
||||||
|
|
||||||
|
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y
|
||||||
|
Reference in New Issue
Block a user