Page 1 of 1

OTA Example not running as described

Posted: Tue Apr 09, 2019 1:52 pm
by Ritu21
Hi,

Many of my questions remain unanswered, request you to please reply as I am in the middle of development of my project.

I need to update flash with the latest app.bin developed by me for which I was trying OTA example given by you and followed the instruction as described in below link:

https://github.com/espressif/esp-idf/tr ... system/ota

Also, below command(as mentioned in the above link) was not working
openssl req -x509 -newkey rsa:2048 -keyout ca_key.pem -out ca_cert.pem -days 365
Generating a 2048 bit RSA private key
.............................................+++
.........................+++
(stuck here)

I tried below command for generating the pem file, which generated the file but the overall code is not working:
openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout ca_key.pem -out ca_cert.pem

After generating the certificates, running the server on terminal and built the ota code after changing the configurations:

Error received in the code:

I (8344) event: sta ip: 192.168.1.2, mask: 255.255.255.0, gw: 192.168.1.1
I (8344) native_ota_example: Connect to Wifi ! Start to Connect to Server....
E (26604) esp-tls: Failed to connnect to host (errno 113)
E (26604) esp-tls: Failed to open new connection
E (26604) TRANS_SSL: Failed to open a new connection
E (26604) HTTP_CLIENT: Connection failed, sock < 0
E (26614) native_ota_example: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
E (26624) native_ota_example: Exiting task due to fatal error...


Please help to resolve the issue on urgent basis.
What is the correct way of operating OTA in esp32??

Thanks
Ritu

Re: OTA Example not running as described

Posted: Tue Apr 09, 2019 3:18 pm
by fly135
ECONNABORTED = 113. No really time to start worrying about the cert yet. You don't seem to be finding the server or the server isn't listening on the port.

John A

Re: OTA Example not running as described

Posted: Fri May 01, 2020 11:32 am
by sarapatel
I too have the same issue when performing OTA please guide what to do further?