Can an Arduino update it's software via Ethernet?

Like Windows Patch Tuesday?

So if we had some Arduino with Ethernet capability, can the software be patched/updated by the Arduino itself calling on a server somewhere? Clearly not all of it could, but could some modules? I guess it would be akin to paging out parts of the code.

The notion being that Arduino devices could be automatically updated in the field.

Can an Arduino update it's software via Ethernet?

Yes.

Which Arduino board are you interested in?

cossoft:
Clearly not all of it could, but could some modules? I guess it would be akin to paging out parts of the code.

All of it can. As for your idea of "modules", well certainly the behavior of the program could be modified by changing its configuration according to data from the network. As for actually changing parts of the binary code, I'm sure it's possible, but it's certainly going to be easier to just update the entire firmware.

ArduinoOTA

pert:
certainly going to be easier to just update the entire firmware.

Well not really. On site complete firmware updates require a PC connection, USB thingies, and the AVR toolset/IDE. It's easier if there's no user interaction at all and the device updates itself. That's why Windows patches itself rather than requiring my 13 year old daughter to relink and recompile new kernels every Tuesday.

Think satellite...

You misunderstood. I was saying that it's easier to update the entire firmware via Ethernet than to do some complex self-modifying code thing to implement your "modules" idea.

Take a look at the link Juraj provided. This is a solution for updating the entire firmware over Ethernet.

Take a look at the Ariadne bootloader:

This is a solution for updating the entire firmware over Ethernet.

Now go try to find some solution for updating only "modules" of the firmware. You'll probably need to create it almost from scratch.

Yes, I misunderstood. Sorry and thanks :slight_smile:

Just a quick follow up please. I've looked around the library but not yet had a chance of using it. Is there any form of security on the networking port? Password/IP restrictions etc? Could the device be Internet facing?

cossoft:
Just a quick follow up please. I've looked around the library but not yet had a chance of using it. Is there any form of security on the networking port? Password/IP restrictions etc? Could the device be Internet facing?

there is a password (sent as plain text over network).

the ArduinoOTA library is meant for upload from IDE in local network, but there are examples on how to download the update over Internet. in this case the library doesn't handle the networking part.

the esp8266 and esp32 arduino cores have a different ArduinoOTA library with more security.