Explorar o código

Make OTA example support keepalive

yuanjm %!s(int64=5) %!d(string=hai) anos
pai
achega
fd5f65a2d4

+ 1 - 0
examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c

@@ -61,6 +61,7 @@ void advanced_ota_example_task(void *pvParameter)
         .url = CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL,
         .cert_pem = (char *)server_cert_pem_start,
         .timeout_ms = CONFIG_EXAMPLE_OTA_RECV_TIMEOUT,
+        .keep_alive_enable = true,
     };
 
 #ifdef CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL_FROM_STDIN

+ 1 - 0
examples/system/ota/native_ota_example/main/native_ota_example.c

@@ -97,6 +97,7 @@ static void ota_example_task(void *pvParameter)
         .url = CONFIG_EXAMPLE_FIRMWARE_UPG_URL,
         .cert_pem = (char *)server_cert_pem_start,
         .timeout_ms = CONFIG_EXAMPLE_OTA_RECV_TIMEOUT,
+        .keep_alive_enable = true,
     };
 
 #ifdef CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL_FROM_STDIN

+ 1 - 0
examples/system/ota/simple_ota_example/main/simple_ota_example.c

@@ -67,6 +67,7 @@ void simple_ota_example_task(void *pvParameter)
         .url = CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL,
         .cert_pem = (char *)server_cert_pem_start,
         .event_handler = _http_event_handler,
+        .keep_alive_enable = true,
     };
 
 #ifdef CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL_FROM_STDIN