Is it possible to do OTA update for the ESP32 using Arduino IDE 2.0.x via Ethernet instead of WiFi?

I have tried OTA update via WiFi and it works perfectly with ESP32. What i want is to do the OTA update via Ethernet. Is this possible? and if yes, How?
Thanks in advance.

I think it should be possible, i don't see why not. First of all, what kind of ethernet module are you using and how have you connected and initialized it ?

It is the W5500.
ESP32S3 -> W5500
13 -> MISO
12 -> CLK
11 -> MOSI
10 -> CS

I use the Ethernet2 library

If you mean this library , it should work.

Instead using a WiFiClient client you will need to use the EthernetClient client

Then i need to include <SPI.h> and <Ethernet2.h> instead of <WiFi.h> and <WiFiMulti.h>.
I then need to use: Ethernetclient client.
Have you tried that?
Thanks for the Info.

No, I haven't tried it, but I don't see why it shouldn't work

Forget OTA unless/until you can get the Ethernet connection working. Have you managed to do that ?

Yes, it is working without problem.
But i don't know how to make OTA Update over ethernt work.

That is the http update, the idea is normal OTA through the IDE.

When i look at ArduinoOTA.h from the esp32 core, i see

  private:
    int _port;
    String _password;
    String _hostname;
    String _partition_label;
    String _nonce;
    WiFiUDP _udp_ota;

The udp OTA is defined as a WiFiUDP object, (as a private variable) , Considering that, you may need to modify that / those file(s) to allow for an ethernet object to be used.

Actually does your ethernet IP show up in the IDE ?
Anyway the whole OTA .h & .cpp may need to be rewritten to use an ethernet object.

I initialize the Ethernet with a fixed IP Address.

Yes and does that IP address show up in 'tools->port' ?

No it does not.
Do you know why?

Well i suspect that it just isn't possible to do this without completely re-writing (basically creating an alternate version) of the ArduinoOTA.h & .cpp.
If the port doesn't show up that means that the ethernet port is not available for OTA.
So anyway, i think it can be doen, but it will be a fair bit of work to do so. It doesn't work out of the box.
On the other hand, maybe with the standard or the core specific ethernet library, it may work, but i wouldn't get your hopes up.

I affraid that is true.
But i will keep try, maybe i find something.
Anyway many thanks for your time and the infos you have provided.

You're welcome, don't overestimate the work of modifying the ArduinOTA, it is just replacing any WiFi reference to it's ethernet counterpart, it is fairly straightforward as such. (and of course renaming the files and their own reference to each other)

I think for me it's a bit of work.
My progrmming skills are not so pro.
Thanks

What do you actually need it for ? For myself i don't any need.

I am working on a project, this product should be able to be updated OTA by the customers using Ethernet. WiFi is not prefferd.
I am still working on that but till yet no success.

that would be OTW (wire not air)
I suppose if you have a webserver running through ethernet, you can do an http update without issue. This is anyway more slick since it doesn't require the IDE's ESPtool.