Hi everyone, I used to use the update function without any problems, I put the link to the URL where my .bin file is located and the module used to update sketch without any problems.
Now when I trigger the OTA update I get:
Firmware update failed (error -1) : HTTP error: connection refused.
The bin file is hosted on an web hosting. I am still facing the problem and I contacted the hosting company they said everything is alright and it is not from their side!
@MagedNassar:
I’d suggest to record the http request from the ESP and reply from the server with e.g. Wireshark.
The fact that it opens from your browser does not mean that it “must” also work from the ESP.
The content of the request hearder is not identical in both cases. I.e. the reply from the server could
also differ from what the ESP OTA lib expects.
After investigating, it takes 150ms to give me the reply of connection refused. I am 100% sure that it has nothing to do withthe destination it is trying to reach as I tried thinger.io for the same OTA update and it worked but for Blynk I think the connection is not even going out. I am not able to know why.
@MagedNassar: The easiest way to find out is to captured the network traffic - as I mentioned in my post above - and then to compare the data of the two tests.
Would be good to have the two URLs that you have tested with …
Wireshark installed as Admin on Windows should work. Simple user will probably not be sufficient.
Will most likely also apply for other similar tools as they access the network interfaces directly.
I bought a new router, configured it, hit update and it updated without a problem. Seems like my old router had something preventing the device to connect to where I put my .bin files, not sure why but atleast now I solved it. Thanks everyone.