OTA Update with HTTPS problem.

kd.spide
Posts: 4
Joined: Thu May 03, 2018 7:39 am

OTA Update with HTTPS problem.

Postby kd.spide » Thu Jun 21, 2018 5:51 am

Hi,
I am planning to make ota update using https for esp32. So, my setup is like it connects to my secure Mqtt broker. OTA is triggering in particular topic.
I am using ESP-IDF and this example https://github.com/espressif/esp-idf/tree/master/examples/system/ota.
I have changed the connectivity part to https referring to https_request example https://github.com/espressif/esp-idf/tree/master/examples/protocols/https_request.The connectivity is successful. But after that get request is having error

Code: Select all

I (20485) ota: Connected to AP
I (21685) ota: Connection established...
I (21685) ota: Connected to http server
E (21685) ota: Send GET request to server failed
E (21685) ota: Exiting task due to fatal error...


How can i further get data and set that data to OTA update?

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

Re: OTA Update with HTTPS problem.

Postby chegewara » Thu Jun 21, 2018 7:52 pm

My suggestion is to setup your esp32 to ota from local network and if it works test with curl if you can get access ota file on external address. My first OTA app issue was missing slash:
https://github.com/espressif/esp-idf/is ... -345897991

User avatar
fly135
Posts: 217
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: OTA Update with HTTPS problem.

Postby fly135 » Thu Jun 21, 2018 11:56 pm

Ima just throwing this out. When I originally tried to do https to a server (wasn't OTA) I had the same problem. Seems like I did two things and it started working. The one I remember was changing HTTP/1.0 to HTTP/1.1

The other was.. ummm not sure I did anything else. If this sounds vague and silly, well yeah. But if you change that 0 to a 1 and it works I'd like to hear about it.

Your probably wondering why I didn't try and backtrack to verify. I think I was getting tired of looking at that problem. Maybe I will. But we're in a rush to get some stuff done, so I'll probably remember the next time someone else posts this problem. But the title could be better worded because it has nothing to with OTA itself.

John A

Daniel
Posts: 17
Joined: Tue Jan 09, 2018 12:55 pm

Re: OTA Update with HTTPS problem.

Postby Daniel » Fri Jun 22, 2018 12:01 am


kd.spide
Posts: 4
Joined: Thu May 03, 2018 7:39 am

Re: OTA Update with HTTPS problem.

Postby kd.spide » Fri Jun 22, 2018 5:40 am

chegewara wrote:My suggestion is to setup your esp32 to ota from local network and if it works test with curl if you can get access ota file on external address. My first OTA app issue was missing slash:
https://github.com/espressif/esp-idf/is ... -345897991

I have tested it with http. It is working fine. so no issue in connectivity and also i have tried to access it with different machine in network.

kd.spide
Posts: 4
Joined: Thu May 03, 2018 7:39 am

Re: OTA Update with HTTPS problem.

Postby kd.spide » Fri Jun 22, 2018 10:18 am

fly135 wrote:Ima just throwing this out. When I originally tried to do https to a server (wasn't OTA) I had the same problem. Seems like I did two things and it started working. The one I remember was changing HTTP/1.0 to HTTP/1.1

The other was.. ummm not sure I did anything else. If this sounds vague and silly, well yeah. But if you change that 0 to a 1 and it works I'd like to hear about it.

Your probably wondering why I didn't try and backtrack to verify. I think I was getting tired of looking at that problem. Maybe I will. But we're in a rush to get some stuff done, so I'll probably remember the next time someone else posts this problem. But the title could be better worded because it has nothing to with OTA itself.

John A

It actually worked. 1.1 was the fix. Now OTA is working. Is it possible to add client cert and key along with CA certificate also in https?

Who is online

Users browsing this forum: No registered users and 5 guests