ESP HTTPS OTA Begin failed

rahulbari
Posts: 10
Joined: Mon Feb 26, 2024 6:55 am

ESP HTTPS OTA Begin failed

Postby rahulbari » Fri Mar 15, 2024 6:28 am

Hello everyone,

I hope you're doing well. I'm currently working on an ESP-IDF project where I'm attempting to perform OTA (Over-The-Air) firmware updates using HTTPS. Specifically, I'm using the advanced HTTPS OTA example code provided by ESP-IDF.

My goal is to update the firmware on an ESP32 device by downloading the firmware binary file from an S3 bucket hosted on AWS. I have ensured that the S3 bucket has public access, and I've placed my helloworld.bin file in it.

However, when I run the advanced HTTPS OTA example code and replace the URL with the URL of my S3 bucket, I encounter the following error:

I (19042) advanced_https_ota_example: Starting Advanced OTA example
E (19052) esp_https_ota: No option for server verification is enabled in esp_http_client config.
E (19062) advanced_https_ota_example: ESP HTTPS OTA Begin failed

It seems that the ESP HTTPS OTA process is failing at the beginning stage. I've tried to troubleshoot this issue, but I'm unsure how to resolve it.

Could someone kindly guide me on how to address this error? Additionally, if there's a better or alternative way to implement OTA updates on ESP32 devices, I would greatly appreciate any suggestions or insights.

Thank you very much for your time and assistance.

Best regards,
Rahul B.

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP HTTPS OTA Begin failed

Postby chegewara » Fri Mar 15, 2024 8:28 am

https://docs.espressif.com/projects/esp ... ps-request
While making HTTPS requests, if server verification is needed, an additional root certificate (in PEM format) needs to be provided to the cert_pem member in the esp_http_client_config_t configuration. Users can also use the ESP x509 Certificate Bundle for server verification using the crt_bundle_attach member of the esp_http_client_config_t configuration.

Who is online

Users browsing this forum: Baidu [Spider], pepgra and 174 guests