I hope it's not a sci-fi for arduino. But I saw that dual system with two MCU can program each other via radio connection. It has been done in experimental space cube projects.

It is theoretically possible? I'm thinking about two arduino MCU first of them will be main MCU and second will be like programming device via serial link.I want to program mcu via wifi without cable connection. Somehow send hex file via wifi to eeprom and upload to second device flash memory.

How do you see this issue? Is that a big nonsense?

  • 1
    Sure, no reason why this cannot be done. Every ESP8266 with enough flash memory has the ability to reflash itself over a wireless link (OTA), downloading a binary file containing its new flash contents from a web server. You can easily run such a web server on another ESP8266. You just have to code it.
    – StarCat
    Commented Oct 15, 2020 at 19:20

1 Answer 1


The firmware update over WiFi is called OTA update. OTA stands for "over the air".

The esp8266 can OTA update itself. The Arduino library for this is called ArduinoOTA and it is bundled with the ESP8266 Arduino boards support package.

See the example for ArduinoOTA library in IDE Examples menu.

Other MCU have the self update option too. ESP32 has it of course, then for SAMD boards Arduino made WiFi101OTA library. For ATmega I made the ArduinoOTA library based on the WiFi101OTA library so it supports SAMD too. And it doesn't have to be WiFi. Cable works too.

The OTA update stores the uploaded firmware in free part of the flash and after successful upload it moves the firmware to target location and resets the MCU.

For any Arduino with SD bootloader OTA update is possible, because the library only has to store the uploaded firmware to the SD card and reset the MCU.

For small ATmega ftp bootloaders exists. Here the bootloader waits for network upload.

Update over a second MCU solutions are for MCU with less flash, mostly for the ATmega328p. The ESPLink firmware and the WiFiLink firmware for ESP8266 can flash attached ATmega328p over RX/TX. The ESP8266AVRISP can flash ATmega wired over SPI.

ArduinoIDE supports OTA upload. It creates a network port based on MDNS record propagated by the ArduinoOTA library or firmware with OTA support.

enter image description here

Other update way is to download the new firmware from a server or upload it over a web page. ESP8266 has for this ESP8266httpUpdate and ESP8266HTTPUpdateServer libraries. For SAMD, ATmega and other boards my ArduinoOTA library has examples on how to store and apply the update received as download or upload.

  • Thank you, I'll try it when I came home
    – Sahasrar
    Commented Oct 16, 2020 at 6:40
  • I got it, It's pretty cool... Thanks :)
    – Sahasrar
    Commented Oct 16, 2020 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.