Downlaod from HTTPS

miladgh
Posts: 10
Joined: Thu Oct 04, 2018 9:19 am

Downlaod from HTTPS

Postby miladgh » Thu Oct 04, 2018 9:28 am

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

miladgh
Posts: 10
Joined: Thu Oct 04, 2018 9:19 am

Re: Downlaod from HTTPS

Postby miladgh » Mon Oct 08, 2018 8:05 am

Does anyone have any idea?

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

Re: Downlaod from HTTPS

Postby fly135 » Mon Oct 08, 2018 3:29 pm

Copy the code in IDF_PATH/components/esp-https_ota, then remove anything working with OTA, and store the data in your own buffer.

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: Downlaod from HTTPS

Postby martinayotte » Tue Oct 09, 2018 5:50 pm

In Arduino-ESP, there is a simple HttpSecureClient library ...

miladgh
Posts: 10
Joined: Thu Oct 04, 2018 9:19 am

Re: Downlaod from HTTPS

Postby miladgh » Fri Oct 19, 2018 8:21 am

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!

miladgh
Posts: 10
Joined: Thu Oct 04, 2018 9:19 am

Re: Downlaod from HTTPS

Postby miladgh » Fri Oct 19, 2018 8:23 am

martinayotte wrote:In Arduino-ESP, there is a simple HttpSecureClient library ...
Thanks alot, Martin!
But how could it help?!

User avatar
martinayotte
Posts: 141
Joined: Fri Nov 13, 2015 4:27 pm

Re: Downlaod from HTTPS

Postby martinayotte » Sat Oct 20, 2018 1:04 pm

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

miladgh
Posts: 10
Joined: Thu Oct 04, 2018 9:19 am

Re: Downlaod from HTTPS

Postby miladgh » Wed Oct 24, 2018 9:21 am

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.

miladgh
Posts: 10
Joined: Thu Oct 04, 2018 9:19 am

Re: Downlaod from HTTPS

Postby miladgh » Thu Oct 25, 2018 10:35 am

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

Who is online

Users browsing this forum: No registered users and 90 guests