Page 1 of 1
Downlaod from HTTPS
Posted: Thu Oct 04, 2018 9:28 am
by miladgh
Hello Guys,
first of all I should say, that I'm new with ESP32. So sorry if I'm asking stupid questions.
I wanna create a project with my ESP. And the first step is to download a file from server per WiFi and buffer it to ESP.
I read lot of examples, but couldn't find a solution. The best library and example that I've seen was "UDHttp.h."
The problem is, it doesn't download files from HTTPS servers. I tried to change the library(Port and some another things) but didn't success to get any result.
I will be really thankful, if you could help me with that.
Best Regards,
Milad
Re: Downlaod from HTTPS
Posted: Mon Oct 08, 2018 8:05 am
by miladgh
Does anyone have any idea?
Re: Downlaod from HTTPS
Posted: Mon Oct 08, 2018 3:29 pm
by fly135
Copy the code in IDF_PATH/components/esp-https_ota, then remove anything working with OTA, and store the data in your own buffer.
Re: Downlaod from HTTPS
Posted: Tue Oct 09, 2018 5:50 pm
by martinayotte
In Arduino-ESP, there is a simple HttpSecureClient library ...
Re: Downlaod from HTTPS
Posted: Fri Oct 19, 2018 8:21 am
by miladgh
fly135 wrote:Copy the code in IDF_PATH/components/esp-https_ota, then remove anything working with OTA, and store the data in your own buffer.
But I don't want to work with WebServer and what I found that OTA works with it.
I want to download a file directly from an HTTPS Link!
Re: Downlaod from HTTPS
Posted: Fri Oct 19, 2018 8:23 am
by miladgh
martinayotte wrote:In Arduino-ESP, there is a simple HttpSecureClient library ...
Thanks alot, Martin!
But how could it help?!
Re: Downlaod from HTTPS
Posted: Sat Oct 20, 2018 1:04 pm
by martinayotte
miladgh wrote:
But how could it help?!
By using this SecureClient in replacement of plain WifiClient in this Update example :
https://github.com/espressif/arduino-es ... Update.ino
Re: Downlaod from HTTPS
Posted: Wed Oct 24, 2018 9:21 am
by miladgh
Thanks man!
but when I'm using your example, I get this error:
Code: Select all
Fetching Bin: /milad/media/display/9c/d2/4e/netcom-extra.tft
Got application/octet-stream payload.
Got 1035753 bytes from server
contentLength : 1035753, isValidContentType : 1
Begin OTA. This may take 2 - 5 mins to complete. Things might be quite for a while.. Patience!
Written only : 0/1035753. Retry?
Error Occurred. Error #: 8
I didn't change anything and used http.
Re: Downlaod from HTTPS
Posted: Thu Oct 25, 2018 10:35 am
by miladgh
I changed the Command to U_SPIFFS in Updater.cpp.
And now I get this error:
:/
Code: Select all
Fetching Bin: /milad/media/display/9c/d2/4e/netcom-extra.tft
Got application/octet-stream payload.
Got 1035753 bytes from server
contentLength : 1035753, isValidContentType : 1
Begin OTA. This may take 2 - 5 mins to complete. Things might be quite for a while.. Patience!
Written only : 5497/1035753. Retry?
Error Occurred. Error #: 12