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.binfirmware.

-
In the directory where is the stored
hello-world. binfile , 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 SSIDmenuconfig -> Example Connection Configuration -> WiFi Password
menuconfig -> Component config - > ESP HTTPS OTA -> Allow HTTP for OTA
menuconfig -> Example Configuration -> (Enable)Skip server certificate CN fieldcheckmenuconfig -> 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 defauloption (please note that this is not safe and is only for testing), as follows :


本文详细介绍如何使用ESP-IDF中的simple_ota_example进行ESP32固件的OTA升级测试。包括搭建本地HTTP服务器、配置ESP32连接及升级URL等步骤,并解答了HTTPS OTA升级时如何跳过服务器证书验证的问题。

2319

被折叠的 条评论
为什么被折叠?



