Merge branch 'bugfix/solve_partial_ota_speed_regression_issue' into 'master'

feat: enabled configurable session resumption support in advanced_ota example

Closes IDF-11290 and IDFGH-13949

See merge request espressif/esp-idf!34710
This commit is contained in:
Mahavir Jain
2024-11-29 14:03:08 +08:00
4 changed files with 12 additions and 2 deletions

View File

@ -31,9 +31,11 @@ menu "Example Configuration"
config EXAMPLE_ENABLE_PARTIAL_HTTP_DOWNLOAD
bool "Enable partial HTTP download"
default n
select ESP_TLS_CLIENT_SESSION_TICKETS
help
This enables use of Range header in esp_https_ota component.
Firmware image will be downloaded over multiple HTTP requests.
The firmware image will be downloaded over multiple HTTP requests,
with session resumption enabled between them.
config EXAMPLE_HTTP_REQUEST_SIZE
int "HTTP request size"

View File

@ -129,6 +129,9 @@ void advanced_ota_example_task(void *pvParameter)
.cert_pem = (char *)server_cert_pem_start,
.timeout_ms = CONFIG_EXAMPLE_OTA_RECV_TIMEOUT,
.keep_alive_enable = true,
#ifdef CONFIG_EXAMPLE_ENABLE_PARTIAL_HTTP_DOWNLOAD
.save_client_session = true,
#endif
};
#ifdef CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL_FROM_STDIN

View File

@ -31,9 +31,11 @@ menu "Example Configuration"
config EXAMPLE_ENABLE_PARTIAL_HTTP_DOWNLOAD
bool "Enable partial HTTP download"
default n
select ESP_TLS_CLIENT_SESSION_TICKETS
help
This enables use of Range header in esp_https_ota component.
Firmware image will be downloaded over multiple HTTP requests.
The firmware image will be downloaded over multiple HTTP requests,
with session resumption enabled between them.
config EXAMPLE_HTTP_REQUEST_SIZE
int "HTTP request size"

View File

@ -108,6 +108,9 @@ void pre_encrypted_ota_task(void *pvParameter)
.cert_pem = server_cert_pem_start,
.timeout_ms = CONFIG_EXAMPLE_OTA_RECV_TIMEOUT,
.keep_alive_enable = true,
#ifdef CONFIG_EXAMPLE_ENABLE_PARTIAL_HTTP_DOWNLOAD
.save_client_session = true,
#endif
};
esp_decrypt_cfg_t cfg = {};
cfg.rsa_priv_key = rsa_private_pem_start;