This was one of the first ones I evaluated but I declined when I was first asked for my credit card when registering. Then I remembered that years ago I got a test instance on AWS for free.
I even provided my credit card details at the time. After a while I received a charge and had problems to correct and almost did not use the instance.
Yesterday, when I came across this phase in the register, I gave up.
It is not possible to be hostage to a company. OK, my credit card isn't up to par, but I don't like the idea.
And OTA is just a GET request (as you know much more than me). It can't possibly be that complicated.
We type terms related to this on google and hundreds of information come up, none of which works.
Maybe ESP-IDF and MQTT works but what about the arduino IDE? Not able?
String host = "bucket-name.s3.ap-south-1.amazonaws.com"; // Host => bucket-name.s3.region.amazonaws.com
int port = 80; // Non https. For HTTPS 443. As of today, HTTPS doesn't work.
String bin = "/sketch-name.ino.bin"; // bin file name with a slash in front.
At the exact moment I read your message I was finishing installing a zerossl SSL certificate on my website account. Then it became htttps, I used another code and pasted her SSL certificate in it but it didn't even work.
Then I had to open another account to test this good idea of yours. But this code you indicated separates the HOST from the .BIN
I made some attempts putting the separate .bin but not finding the .bin
Note that if you copy and paste the complete HOST into your browser it will download the updated.bin indicating that the URL is correct.
Then I returned my new account to that first code and became Guru Mediation again.
// S3 Bucket Config
String host = "http://atualiza.infinityfreeapp.com";
int port = 80;
String bin = "http://atualiza.infinityfreeapp.com/atualiza.bin";
//String bin = "/atualiza.bin";
Connecting to SINAL_2Ghz
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 2 - STA_START
.....[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 4 - STA_CONNECTED
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 7 - STA_GOT_IP
[D][WiFiGeneric.cpp:419] _eventCallback(): STA IP: 192.168.18.25, MASK: 255.255.255.0, GW: 192.168.18.1
Connected to SINAL_2Ghz
Connecting to: http://atualiza.infinityfreeapp.com
Fetching Bin: /htdocs/atualiza.bin
Got a non 200 status code from server. Exiting OTA Update.
contentLength : 0, isValidContentType : 0
There was no content in the response
[E][WiFiClient.cpp:485] flush(): fail on fd 54, errno: 11, "No more processes"
In file manager inside the site I have to put the .bin file inside a folder called htdocs, but using the browser it is not necessary to have this htdocs in the URL, anyway I put it inside the code in the String. The error persists, with or without htdocs.
I really appreciate your help. But see, same error:
Connected to SINAL_2Ghz
Connecting to: http://www.qubits.us
Fetching Bin: /nards/atualiza.bin
Got a non 200 status code from server. Exiting OTA Update.
contentLength : 0, isValidContentType : 0
There was no content in the response
[E][WiFiClient.cpp:485] flush(): fail on fd 54, errno: 11, "No more processes"
possibly, grabbing an url directly, isn't that phishing?? figured it was something in the host..
idk, i'm hosted on network solutions, for like a long time, few decades..
glad you got it going..
i'm just starting..
first, i got to stuff the firmware into a blog field in the database server, then out from there..
sounds complicated, but i bet you i have less issues than you did..
lol, i wrote my server, a little easier to debug..
I still have a lot to learn, I'm going to research what phishing is.
Thank you very much. I'll dig deeper to see if I can find out why it didn't work on my site. But actually that server doesn't have anything of mine, it could be anyone, as long as it works.
If you even indicate one, I'll sign up and do tests.
It's hard. I opened an account now at 000webhost and sent the .bin and noticed that it also has a password for access permission. I think that's why I'm not able to access the .bin through the ESP32 code.
Now I will stop, tired.
There has to be somewhere on the internet, port 80, HTTP, where I can put a .BIN and do WEB OTA successfully.
On my free hostinger (infinityfree) I installed a zeroSSL certificate. And I started using the sample code from the HTTPS_OTA-UPDATE library.
I copied the certificate into the code and did the test of downloading the update.bin file
gave error
Searching on google I saw that 1 year and 9 months ago someone did the same thing, identical, and in the help comments they said that the SSL certificate should be in a certain format
The discussion, which is brief, is this:
I put it in the suggested format and the error remains the same.
My code (and the error) are exactly the same.
Does anyone have any ideas ? I now have HTTPS and a valid and correct certificate.
My code. The certificate just below is the example code, I left it there to remember how the format was before. I changed some characters in the certificate in use, just to make it useless here in this post.