1. Please use the simple_ota_example(In ESP-IDF) to test.
2. Please follow these steps to create a local HTTP server for testing.
-
The PC is connected to the same router as ESP32.
-
Prepare a firmware for the OTA test upgrade, such as the
hello-world.bin
firmware.
-
In the directory where is the stored
hello-world. bin
file , if you are in a Python 3 environment, create a local server with the following command.python -m http.server 8070
-
Then use the following command to query the native IP address.
ifconfig
-
When the server address and the upgraded firmware are ready, please do the following configuration and then download the firmware to upgrade.
menuconfig -> Example Connection Configuration -> WiFi SSID
menuconfig -> Example Connection Configuration -> WiFi Password
menuconfig -> Component config - > ESP HTTPS OTA -> Allow HTTP for OTA
menuconfig -> Example Configuration -> (Enable)Skip server certificate CN fieldcheck
menuconfig -> Example Configuration -> firmware upgrade url endpoint
-
The test results are as follows:
Q & A
Q1. How to skip server-side certificate check if HTTPS OTA is enabled?
- You can try to enable the
menuconfig -> Component config -> ESP-TLS -> Allow potentially insecure options -> Skip server certificate verification by defaul
option (please note that this is not safe and is only for testing), as follows :