not all HTTP servers works fine with OTA, why???

francescofcf
Posts: 10
Joined: Wed Sep 05, 2018 8:02 am

not all HTTP servers works fine with OTA, why???

Postby francescofcf » Wed Oct 03, 2018 4:11 pm

I have an problem about the web server where do I put my firmware.bin
not all HTTP servers works fine with OTA, why???

When I send the GET request to the HTTP server, I send:

Code: Select all

10.0.0.20--[02/oct/2018:15:06:52 +0200] “GET/ firmware.bin http/1.1” 2001 1159872 “-“ “esp32 http Client/1.0”
where 10.0.0.20 is the IP address of the ESP32.

Using different HTTP servers with the same firmware on my ESP32 I do not get the same result, some work and others do not it.

//////////////////////////////
// These are my tests //
/////////////////////////////

------------------------------------------------------------------

From Internet :
No problem - Works fine OTA OK
I use CONFIG_FIRMWARE_UPGRADE_URL = http://my_site/my_folder/image.bin without indicating any port
downloads correctly the image.bin and upgrade the firmware

on HTTP server I use example CONFIG_FIRMWARE_UPGRADE_URL = http://10.10.10.2:8080/image.bin

------------------------------------------------------------------

From Android:
SimpleHTTpServer - ubi.jp - Works fine OTA OK
HFS HTTP File Server 1.0 - vortexinfinitum - Works fine OTA OK
Http Server – streamingnology inc - Not works OTA error
Tiny Web Server – Leonardo Javier Russo - Not works OTA error
HTTP Server powered by Apache - Tautvydas Andrikys - Not works OTA error

------------------------------------------------------------------

From IOS:
AirDisk -XUEHUI wu - Not works OTA error
Files – File Manager & Browser – Hian Zin Jong - Works fine OTA OK

------------------------------------------------------------------

But if I download the image.bin file from all HTTP server above with a browser and then compare it with the original, the files are identical and start with 0xE9 0x09

Now I would like to build a custom app to perform OTA, but I would like to know what is the reason why a server works and another server does not.
Any idea?

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

Re: not all HTTP servers works fine with OTA, why???

Postby chegewara » Wed Oct 03, 2018 5:15 pm

Did you check what response you get from servers that not work?

Try to change request from "firmware.bin http/1.1" to "firmware.bin http/1.0".

francescofcf
Posts: 10
Joined: Wed Sep 05, 2018 8:02 am

Re: not all HTTP servers works fine with OTA, why???

Postby francescofcf » Thu Oct 04, 2018 7:44 am

Ok thanks, the problem is maybe that one.
Unfortunately I can not find a way to change in HTTP/1.0
I use the call at

Code: Select all

 esp_err_t ret = esp_https_ota(&config);
and I can not find any define or other to change from 1.1 to 1.0


Who is online

Users browsing this forum: No registered users and 217 guests