Wt32-eth OTA "no response from the ESP"da

Hello, first of all, thanks for all the support in the past, and this great project!

i am trying to get OTA working with wt32-eth board on platformio

[platformio]
default_envs = 
  esp32-wt32-eth01-ble-eth-OTA

[env:esp32-wt32-eth01-ble-eth]
platform = ${com.esp32_platform}
board = esp32-gateway
board_build.partitions = min_spiffs.csv
lib_deps =
  ${com-esp.lib_deps}
  ${libraries.wifimanager32}
  ${libraries.irremoteesp}
  ${libraries.rc-switch}
 ; ${libraries.decoder}
build_flags =
  ${com-esp.build_flags}
  ;'-DZgatewayBT="BT"'
  '-DZgatewayRF="RF"'
  '-DZgatewayIR="IR"'
  '-DESP32_ETHERNET=true'
  '-DETH_PHY_ADDR=1'
  '-DETH_PHY_POWER=16'
  '-DETH_CLK_MODE=ETH_CLOCK_GPIO0_IN'
  '-DGateway_Name="OpenMQTTGateway_ESP32_WT32-ETH01"'
  '-DjsonPublishing=false'
  '-DjsonReceiving=false'
  '-DsimpleReceiving=true'
  '-DsimplePublishing=true'
;  '-DGateway_Name="OMqGW_ir_rf"'
  '-DMQTT_USER="redacted"'
  '-DMQTT_PASS="redacted"'
  '-DMQTT_SERVER="redacted"'
  '-DMQTT_PORT="1883"'
  '-DpubIRunknownPrtcl=false'
  '-DRawDirectForward=false'
  '-DrepeatIRwMQTT=true'
  '-DRF_DISABLE_TRANSMIT'
  '-DLED_INFO_ON=LOW'
  '-DLED_ERROR_ON=LOW'
  '-DLED_SEND_RECEIVE_ON=LOW'
  '-Dmqtt_max_packet_size=1024'
  '-DIR_RECEIVER_GPIO=39'
  '-Dota_password="otapassword"'

[env:esp32-wt32-eth01-ble-eth-OTA]

extends = env:esp32-wt32-eth01-ble-eth
upload_protocol = espota
upload_port = 192.168.1.160
upload_flags =
  --auth=otapassword
  --port=8266

;upload_port = COM3

I uploaded the first time using serial port with the otapassword uncommented, and the other OTA details commented.

the second time, i tried with OTA uncommented as it is shown above.
and it results in the following.

CURRENT: upload_protocol = espota
Uploading .pio\build\esp32-wt32-eth01-ble-eth-OTA\firmware.bin
17:12:28 [DEBUG]: Options: {'esp_ip': '192.168.1.160', 'host_ip': '0.0.0.0', 'esp_port': 8266, 'host_port': 32793, 'auth': 'otapassword', 'image': '.pio\\build\\esp32-wt32-eth01-ble-eth-OTA\\firmware.bin', 'spiffs': False, 'debug': True, 'progress': True, 'timeout': 10}
17:12:28 [INFO]: Starting on 0.0.0.0:32793
17:12:28 [INFO]: Upload size: 1198176
Sending invitation to 192.168.1.160 ..........
17:14:09 [ERROR]: No response from the ESP
*** [upload] Error 1
======================================================= [FAILED] Took 120.74 seconds =======================================================
Environment                   Status    Duration
----------------------------  --------  ------------
esp32-wt32-eth01-ble-eth-OTA  FAILED    00:02:00.736

Is it normal to have “starting on 0.0.0.0.:32793” ?

for info, i have some other projects using arduino ide over OTA that are still able to upload to OTA from the same laptop.

Any tips or suggestions?

I managed to get past that issue.

Now just getting “Authentication Failed”
the password in the upload flags and the build flags are both otapassword

Hi @gambituk,

once you uploaded via serial with the build_flags ota_password it should be on the device and does not need to be set any longer, can be commented out in the build_flags

; '-Dota_password="otapassword"'

You will then only need it in the upload_flags

Yes, it’s the same for me here.

Could it have been a mixed up IP address issue?

Does the wt32-eth01 have both the Ethernet port and WiFi active? Obviously then two different IP addresses. Did you try both with OTA?
All my OTA experience has always only ever been with WiFi, no Ethernet connected ESP.

For the upload port I generally also use the local device name, to avoid having to fight with possible changing IP addresses, even though I usually have static ones. So, depending on your network setup, it should also work with

upload_port = OpenMQTTGateway_ESP32_WT32-ETH01.local

P.S.: Just remembered, it could also just be a simple firewall issue. I had that a while back, blocking all the Python connections from my PC - making OTA also fail until I sorted the firewall out :wink: So worth having a look at your PC firewall settings or turn it off briefly for testing.

Hey, @DigiH , thanks for the response, i tried to test with the
upload_port = OpenMQTTGateway_ESP32_WT32-ETH01.local
It seems like it again finds it, and seems to accept the “invitation” but then immediately fail on authentication again.

I will try to go back and upload again from the serial port to make sure that it definately has the correct configuration and password and then try OTA again.

I’m really not sure how it works having Ethernet and Esp together. I suspect that the wifi part is not active as i only have one ipaddress and the ethernet port shows a lot of activity.

Would be great to get this working, it’s a real pain to access the device where it is, and i don’t want to make another duplicate setup on the bench just for testing. :crossed_fingers:

Hi @gambituk

I really don’t think it is the password at all, as otherwise in your serial logging it should have come up immediately with

Authentication failed

instead of just

Sending invitation to 192.168.1.160 ..........
17:14:09 [ERROR]: No response from the ESP

which likely did take a while for the no response to come up.

So I honestly think it’s just the firewall issue which I also encountered a while back, showing the very same failed attempts.

Could you try with the firewall switched off or opening the firewall for Pythoin traffic on your PC?

Oh, sorry, i think i’ve managed to confuse the situation, i did managed to resolve the first problem, i was just too embarassed to say that i forgot to remove the jumper from io0 to ground, so it wasn’t actually booting.

So the original issue about not finding the port is resolved, and now i just have the error immediately about Authentication failed like you said.

I will let you know if i find anything useful

Ok :wink: sorry, hope you didn’t read my last posting, as I completely misread yours.

So yes, maybe with not properly booting before the otapassword might not have been stored properly to allow for working OTA updates.

So if you connect again by cable, uncomment the build_flag otapassword, upload it … going through the whole initial routine again.

Here it might also be good to clean the flash before this initial serial cable upload - just in case.

All the best.

I did read it, but all is well, i managed to get it working. I reuploaded, and now i can see it in the port list in the arduino ide, and it works now in platformio, so that is a useful troubleshooting step!

Can’t really say what solved it, but your pointers and one of your other replies to someone elses post made it work.

Thanks for your help

1 Like

Just a further feedback if anyone is interested.

arduinoOTA mdns ports keep dissapearing
-I saw that the ports keep dissapearing from the advertised list in arduinoIDE, so i started using “zeroconfservicebrowser” to see if can monitor what is happening. result is that the port for this GW keep dissapearing from the port list. seems totally random. Seems more like to appear just after plugging in.
Looked at lots of different posts for arduino ide and platformio. total rabbit hole, way above my level.

Went back to using ip address instead of .local address and it is 100% reliable in my case.