Page 1 of 1

Unable to Make OTA Demo to Work

Posted: Sat Mar 30, 2019 5:08 pm
by e2738729
Hi Everyone,

I am currently trying to make the OTA example to work by following this link's instruction:
https://github.com/espressif/esp-idf/tr ... system/ota

The below are the steps that I did:
1. My PC is connected via ethernet to my wifi router which my ESP32 is also connected to
2. I "build" without "flash" the "hello_world example" and I have the "hello_world.bin"
Question: Do I need to store/copy this bin file at/to a specific location? It is in "hello_world" folder rather than "OTA" folder
3. I typed the following to the terminal:

Code: Select all

openssl req -x509 -newkey rsa:2048 -keyout ca_key.pem -out ca_cert.pem -days 365
+ I entered and confirmed the pass phrase for ca_key.pem
+ I entered my PC host name (using cmd line on linux 'hostname'): khoi-CORSAIR-ONE (not IP address)
+ The terminal prompted me to enter country, state, email, etc.
4. I then entered the following to the terminal:

Code: Select all

cp ca_cert.pem /path/to/ota/example/server_certs/
5. After that:

Code: Select all

openssl s_server -WWW -key ca_key.pem -cert ca_cert.pem -port 8070
The terminal showed the following:

Code: Select all

Enter pass phrase for ca_key.pem:
Using default temp DH parameters
140125869283072:error:02006062:system library:bind:Address already in use:crypto/bio/b_sock2.c:161:
140125869283072:error:20093075:BIO routines:BIO_bind:unable to bind socket:crypto/bio/b_sock2.c:162:
   0 items in the session cache
   0 client connects (SSL_connect())
   0 client renegotiates (SSL_connect())
   0 client connects that finished
   0 server accepts (SSL_accept())
   0 server renegotiates (SSL_accept())
   0 server accepts that finished
   0 session cache hits
   0 session cache misses
   0 session cache timeouts
   0 callback cache hits
   0 cache full overflows (128 allowed)
4. I went to the "native_ota_example" directory via terminal and entered "make menuconfig". In the 'Example Configuration' submenu:
+ I put my SSID and Password and the "https://khoi-CORSAIR-ONE/hello-world.bin"
+ I "make flash" (I didn't "make" here, even though the instruction told me to "make flash" after "make". Why unnecessarily "make flash" after "make"?
5. I typed in "https://khoi-corsair-one:8070/" on my Firefox web browser
Error opening ''
140042611943168:error:02001002:system library:fopen:No such file or directory:crypto/bio/bss_file.c:72:fopen('','r')
140042611943168:error:2006D080:BIO routines:BIO_new_file:no such file:crypto/bio/bss_file.c:79:
Question: Where am I doing it wrong?

Thank you in advance and any help is appreciated