1

I have been searching for a way to upgrade the sketch on my Arduino Uno wirelessly (preferable WiFi, but not a must). Does the Uno support such function? If not - are there any other boards that might support it?

Also, to further extend on the problem - I wouldn't want to upload a new sketch through the Arduino IDE but rather do it programmatically (trying to integrate it with a version management system of my own).

4

There's two ways you can go about this - hardware and software.

To do it in software would mean writing a new bootloader that supported whatever wireless medium you chose. The bootloader might end up quite large and thus restrict the size of sketch you are able to support. It may also require advanced programming techniques in order to fit it into memory. Not a task for a beginner.

Doing it in hardware is easier but more restrictive. You need a wireless medium that can emulate a serial device including the ability to perform a reset of the Arduino. There are bluetooth interfaces for the Arduino that can perform this kind of functionality, but I am not aware of anything WiFi or Ethernet that even remotely comes close.

There are Arduino boards available with this kind of bluetooth interface built in.

A possible third option is something in between - you have two Arduinos (or some other external MCU based system, like an ATTiny for instance), the "target" and the "programmer". The "programmer" is what is connected to the wireless and accepts instructions and commands over the air. It is then capable of putting the "target" into bootloader mode (reset it) and pass data through to its serial port for programming. It does mean the "target" isn't directly connected to the wireless though, so it is up to the "programmer" to support whatever wireless functionality is needed and communicate properly with the "target" to get it to do everything it should. There is no way to do FOTA to the "programmer" though, so you're back at square one if you want to reprogram that...

  • ESP series WiFi chips would be able to update an Arduino's software. But I am not aware it has been done yet. – Avamander Sep 7 '15 at 17:28
  • This is possible using stock ESP8266 and Arduino components. My question addresses this and provides the relevant links I have found. The alternate to what I'm doing is to flash the ESP8266 with some alternate firmware e.g. ESPLink, NodeMCU or uPython. ESPLink seems purpose built for over the air updates, but I have no experience with these. – Carel May 18 '16 at 23:35
3

There are plenty of examples of Arduinos being used to reprogram Arduinos:

So the obvious choice here is to have two chips. One does the real work, the other one programs the first one, when required.

The "programmer" chip could be written to read from a disk file, accept data over Ethernet, WiFi or whatever. And it could be programmed to reprogram the target chip at a certain time of day, or on command.

In this system the "main" chip gets on with whatever-it-is it is doing, and the "programmer" chip just monitors its source of new code.

Does the Uno support such function? If not - are there any other boards that might support it?

I don't know of any boards that directly support that. These boards are generally built as educational tools, not as ready to deploy in the field as robust auto-upgrading devices. For one thing, keeping things cheap enough for students to purchase, perhaps one for each student in a classroom of 30, was one of the design criteria.

  • It makes little sense to use another Arduino for this, as they don't have the needed connectivity either. Rather, use the connectivity (WiFi, BLE, whatever) processor to reprogram the Arduino... or just use the connectivity processor instead of the ATmega Arduino, since most of these devices have far better support for self programming and more resources for processing messages in general. – Chris Stratton Nov 16 '17 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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