ArduinoOTA over Firewall, ESP32: Invitation is failing

Okay, that took me some time to figure out…

Basically the ArduinoOTA library you’ve linked is entirely incompatible with the ArduinoOTA that is provided by default in the Arduino ESP32 package. It uses an entirely different upload mechanism too: The external library opens a HTTP Web Server on a TCP port and does HTTP Basic authentication. It doesn’t work with the espota tool. I use the curl tool (curl for Windows) to push the sketch. espota uses a UDP advertisment custom TCP stream to do the update.

Finally issue Info: PlatformIO, Arduino Mega, build & upload OTA · Issue #29 · JAndrassy/ArduinoOTA · GitHub helped my get on the right track, although with some modifications.

I now have a fully working OTA setup with my ESP32 + W5500: GitHub - maxgerhardt/pio-esp32-ethernet-ota: Demo with a ESP32 + Ethernet + OTA

Note that that might not be the best thing to use this custom ArduinoOTA which differs so much from these tools. A modification or expansion request to the Arduino-ESP32 provided ArduinoOTA might still make sense.