question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong default port for ESP32 OTA

See original GitHub issue

The current documentation states:

–port=ESP_PORT ESP32 OTA Port. Default 8266

And then only if there are problems to use

upload_flags =
    --port=3232

However, the current default upload port for Arduino OTA is 3232.

https://github.com/espressif/arduino-esp32/blob/a070884441308c5bfa6805d6f515801769ea0b1b/libraries/ArduinoOTA/src/ArduinoOTA.h#L34-L35

https://github.com/espressif/arduino-esp32/blob/a070884441308c5bfa6805d6f515801769ea0b1b/libraries/ArduinoOTA/src/ArduinoOTA.cpp#L101-L109

In fact the default port has always been 3232 in the implementation, though the first commit wrongly says 8266 in a comment (here) because it was pretty much copied from the Esp8266 version. This commit corrects that.

Therefore I think that for the ESP32 platform, the default upload port should be set to 3232, and the documentation should extended to double check the upload port (which can be customly set by calling setPort()) if upload errors occur.

Also see discussion here: https://community.platformio.org/t/esp32-ota-via-ethernet-doesnt-want-to-work/8308/20?u=maxgerhardt

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pfeerickcommented, Sep 15, 2019

The PR is against the espressif/arduino-esp32 core, not platformio, as the fix is needed there: https://github.com/espressif/arduino-esp32/pull/2948/commits/36bc34015c34deae1a266f85e2f8521b81dabd08

Most of the changes are documentation, but line 260 is also a change in behaviour. This will change the default port used by espota.py to 3232, so that it doesn’t need to be overridden via-p 3232, and PlatformIO and other third party tools will be able to use the correct port by default also.

1reaction
maxgerhardtcommented, Aug 2, 2019

@pfeerick Alright thanks if the code is already merged then there’s no need for this issue and we’ll wait for a new release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

332 ESP32 OTA tutorial with tricks (incl. OTA debugging)
In this video, I would like to remind you of a handy ESP32 concept: Over the air or OTA update. A simple and...
Read more >
OTA CHANGE PORT - Everything ESP8266
1. In BasicOTA.ino sketch add the following line to redefine the default port: · 2. Restart Arduino IDE. This is to reload platform....
Read more >
ESP32 Basic Over The Air (OTA) Programming In Arduino IDE
Tutorial For Programming ESP32 Over The Air (OTA) With Arduino IDE ... delay(5000); ESP.restart(); } // Port defaults to 3232 // ArduinoOTA.
Read more >
ArduinoOTA over Firewall, ESP32: Invitation is failing
Wrong ArduinoOTA library - but there is only one available?!? ArduinoOTA cannot cope with IP+port only, is missing its host name in the ......
Read more >
OTA defaults to 192.168.1.20 - Arduino Forum
I currently have 3 devices using OTA, 1 ESP32 and 2 ESP8266. ... to the wrong address as when I go to Tools...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found