FOTA(HTTP) update from dropbox or google drive?

Hello to everyone!!
i have a question about the HTTP UPDATE example
i am trying to update via FOTA with the HTTPUPDATE example
in the following line:
t_httpUpdate_return ret = ESPhttpUpdate.update(“http://server/file.bin”);
i tried writing a direct link to my file that i place in dropbox :
https://www.dropbox.com/s/6okhpgdi33kk6 … k.bin?dl=0
the browser on my pc downloads the file with no problem when i am logged in but the esp gives me an error:
HTTP_UPDATE_FAILD Error (-1):HTTP error: connection refused

my question how it can be acheived?
maybe using some other file hosting?

thanks in advance - See more at: http://www.esp8266.com/viewtopic.php?t=14257#sthash.seyaXkKb.dpuf

It just won’t work this way (AFAIK).
You need special server-side handling for delivering the firmware.
I was testing this and came up with a simple Node.js script that does the thing: https://github.com/blynkkk/blynk-library/blob/master/examples/Export_Demo/Template_ESP8266/ota-server.js

In theory you should be able to run a modified version of this on Heroku cloud, and make OTA working.
You’ll have do dig into this topic a bit.

UPD: the original file was removed long ago, but it can be still found on github history: https://github.com/blynkkk/blynk-library/tree/7031f4c7c64a8534d2e7c3acaa21027b80831b12/examples/Export_Demo/Template_ESP8266

Hi thank you very much for the fast reply.
i a =m not familiar at all with node.js and the whole concept but i will try to dig a little
but maybe you can answer me why it cant be achieved with my method
maybe the esp can login in to dropbox and then download the file
cause i saw an example on youtube and there is no special server side handling but its worth to mention that the server is a simple HTTP server and a direct URL link to the file in the example.

so why don’t you specify such important details in your original post? ))

@Oleg_Pugach do you have link for the YouTube video?

Did the video show Dropbox / Google Drive or regular server?

Regular servers are fine for OTA updates but an ESP might struggle with the additional security measures imposed by Dropbox / Google Drive.

sorry…
this is the link:


in the example its a regular server but my question was how to modify it to work with dropbox or google drive or any other free cloud web server

@Oleg_Pugach for https url’s you need to include the fingerprint in the ESPhttpUpdate call and the bin file must be directly accessible from the url (no redirects).

Below is the syntax for an update via GitHub:

t_httpUpdate_return ret = ESPhttpUpdate.update("https://raw.githubusercontent.com/Zyxmn/esp8266_BlinkyBin/master/Blinky.cpp.bin", "", "21 99 13 84 63 72 17 13 B9 ED 0E 8F 00 A5 9B 73 0D D0 56 58");

where can i see or find the fingerprint on dropbox or github?

It’s available from your browser.

You should try GitHub first though as the encryption for Dropbox and GoogleDrive might to be too strong for the ESP. GitHub is tried and tested.

can you please explain me how do i get the fingerprint from my browser
thanks in advance

Which browser?

and also how do i get a direct link

google chrome

If you don’t know how to get direct links you are going to struggle. USE GitHub as your initial test.

https://www.grc.com/fingerprints.htm will give you the fingerprint. Take care not to copy any invisible characters when you cut and paste the fingerprint into your sketch.

Chrome recently changed the location of the fingerprint.

Older version click on the green padlock, newer version, right click in the browser, then inspect and then the security tab etc.

i tried your suggestion but still no luck
also i am not sure what is the certificate that i need


i tried a couple of options but i get the following error:
HTTP_UPDATE_FAILD Error (-102) File not found (404)

this is the direct link to my file:
https://github.com/opbeer/cxbcvx/raw/master/Blink.bin

Scroll down to the bottom of the dialogue box and the fingerprint is there (labelled Thumbprint).

still no luck
i am getting
HTTP_UPDATE_FAILD Error (-1) HTTP error connection refused

Do you have the fingerprint as:

d7 9f 07 61 10 b3 92 93 e3 49 ac 89 84 5b 03 80 c1 9e 2f 8b

yes exactly

THIS IS THE THE COMMAND THAT I AM USING:
t_httpUpdate_return ret = ESPhttpUpdate.update(“https://github.com/opbeer/cxbcvx/raw/master/Blink.bin","","‎‎D7 9F 07 61 10 B3 92 93 E3 49 AC 89 84 5B 03 80 C1 9E 2F 8B”);