diff --git a/examples/system/ota/simple_ota_example/example_test.py b/examples/system/ota/simple_ota_example/example_test.py index 736c611d5..7c732a542 100644 --- a/examples/system/ota/simple_ota_example/example_test.py +++ b/examples/system/ota/simple_ota_example/example_test.py @@ -101,12 +101,9 @@ def start_https_server(ota_image_dir, server_ip, server_port): httpd = BaseHTTPServer.HTTPServer((server_ip, server_port), SimpleHTTPServer.SimpleHTTPRequestHandler) - print "server cert path: " + server_file - print "key file path: " + key_file httpd.socket = ssl.wrap_socket(httpd.socket, keyfile=key_file, certfile=server_file, server_side=True) - print "serving OTA image at: " + server_ip + "port: " + "port" httpd.serve_forever() @@ -126,7 +123,7 @@ def test_examples_protocol_simple_ota_example(env, extra_data): IDF.check_performance("simple_ota_bin_size", bin_size // 1024) # start test host_ip = get_my_ip() - thread1 = Thread(target=start_https_server, args=(dut1.app.binary_path,host_ip,8000)) + thread1 = Thread(target=start_https_server, args=(dut1.app.binary_path, host_ip, 8000)) thread1.daemon = True thread1.start() dut1.start_app() diff --git a/examples/system/ota/simple_ota_example/main/Kconfig.projbuild b/examples/system/ota/simple_ota_example/main/Kconfig.projbuild index be4b8379d..2c2eb0c58 100644 --- a/examples/system/ota/simple_ota_example/main/Kconfig.projbuild +++ b/examples/system/ota/simple_ota_example/main/Kconfig.projbuild @@ -9,7 +9,7 @@ menu "Example Configuration" config EXAMPLE_FIRMWARE_UPGRADE_URL_FROM_STDIN bool - default y if FIRMWARE_UPGRADE_URL = "FROM_STDIN" + default y if EXAMPLE_FIRMWARE_UPGRADE_URL = "FROM_STDIN" config EXAMPLE_SKIP_COMMON_NAME_CHECK bool "Skip server certificate CN fieldcheck" diff --git a/examples/system/ota/simple_ota_example/main/simple_ota_example.c b/examples/system/ota/simple_ota_example/main/simple_ota_example.c index e3d521670..9d7c44e3a 100644 --- a/examples/system/ota/simple_ota_example/main/simple_ota_example.c +++ b/examples/system/ota/simple_ota_example/main/simple_ota_example.c @@ -61,12 +61,12 @@ void simple_ota_example_task(void *pvParameter) ESP_LOGI(TAG, "Starting OTA example"); esp_http_client_config_t config = { - .url = CONFIG_FIRMWARE_UPGRADE_URL, + .url = CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL, .cert_pem = (char *)server_cert_pem_start, .event_handler = _http_event_handler, }; -#ifdef CONFIG_FIRMWARE_UPGRADE_URL_FROM_STDIN +#ifdef CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL_FROM_STDIN char url_buf[OTA_URL_SIZE]; if (strcmp(config.url, "FROM_STDIN") == 0) { example_configure_stdin_stdout(); @@ -80,7 +80,7 @@ void simple_ota_example_task(void *pvParameter) } #endif -#ifdef CONFIG_SKIP_COMMON_NAME_CHECK +#ifdef CONFIG_EXAMPLE_SKIP_COMMON_NAME_CHECK config.skip_cert_common_name_check = true; #endif diff --git a/examples/system/ota/simple_ota_example/sdkconfig.ci b/examples/system/ota/simple_ota_example/sdkconfig.ci index 6d493cbf1..8367dac01 100644 --- a/examples/system/ota/simple_ota_example/sdkconfig.ci +++ b/examples/system/ota/simple_ota_example/sdkconfig.ci @@ -1,2 +1,2 @@ -CONFIG_FIRMWARE_UPGRADE_URL="FROM_STDIN" -CONFIG_SKIP_COMMON_NAME_CHECK=y +CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL="FROM_STDIN" +CONFIG_EXAMPLE_SKIP_COMMON_NAME_CHECK=y