forked from espressif/esp-idf
feat: enabled configurable session resumption support in ota examples
This commit added config option to enable session ticket support while performing ota. This helps in optimizing latency while downloading ota over multiple HTTP requests. closes https://github.com/espressif/esp-idf/issues/14783
This commit is contained in:
@@ -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"
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user