0

I cannot get OTA updates to work on my ESP32 using the Arduino IDE (and I've also tried PlatformIO in VS code).

I'm using the standard sketch from this site (and many identical others).

When I try to update using OTA, here's what I get:

Sending invitation to 10.0.0.245 
Authenticating...OK
12:12:49 [ERROR]: No response from device [after a short while]

If I connect the device to a USB/serial terminal, here's what I get:

Start updating sketch
Progress: 0% [never proceeds beyond 0%]
Error[2]: Connect Failed [after a short while]
Error[4]: End Failed

My partition table has two OTA partitions, so this is not the problem.

I've tried with and without my firewall, with and without my anti-virus, with and without the USB connected, with and without a password, with and without setting the port, with and without a manual reset after loading the sketch - always the same.

It's not an initial WiFi connection problem - the device IP is recognized as a port, the password is verified if I use one and the initial connection is made.

Any ideas? Thanks

Community
  • 1
  • 1
Amiram Stark
  • 2,208
  • 22
  • 32
  • you can try with OTAwebUpdater (https://github.com/espressif/arduino-esp32/blob/master/libraries/ArduinoOTA/examples/OTAWebUpdater/OTAWebUpdater.ino) Documentation:- https://github.com/espressif/arduino-esp32/blob/master/docs/OTAWebUpdate/OTAWebUpdate.md – karan sharma Nov 13 '18 at 05:57
  • Thanks, but that's the one that's not working. – Amiram Stark Nov 20 '18 at 11:21

1 Answers1

1

I had exact same problem although with ESP8266, it didn't work when I disabled firewall either. But, after I created a New Rule in "Windows Defender Firewall with Advanced Security" for the python located in: C:\Users\Erfan\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1\python3.exe and Allowed its connection, my problem was solved.

Note1: Try creating New Rule in your antivirus firewall if you have one.

Note2: I found the location of the ...\3.7.2-post1\python3.exe in Arduino IDE. If you try to upload Over The Air, the path to python.exe will appear in the outputs.

Erfan
  • 36
  • 6
  • Yes. Python runs the Platformio commands. So that includes the OTA updater. It will try opening a port for that, but Firewall will (usually) prevent that. – Sebastian Scholle Dec 21 '22 at 12:53