Ever since I read this post, I wanted to see if I could reliably flash Arduino’s over my network. I’m pleased to announce that I can, and my plan is to share the juicy details so that you too can enjoy being able to reprogram your projects from the comfort of your main machine.
RFC2217 is a standard that lets you read and write to a serial port, over your local network. It not only sends data, but it lets the remote client send RTS and DTS signals, which allow you to reset the remote AVR. The general standard gives us some nice flexibility, letting the remote client control the serial port as if it was right there.
Why would you want to do that? Well, I can do my main programming on my main machine at my comfortable desk, while having my AVR microprocessor in the hot garage next to the Raspberry Pi/Pogoplug, connected to the network. Developing on a Pi or Pogo is slow, so if I can leverage my powerful system to do the development on, and delegate the Pi to just the flashing part, then it reduces one more barrier to having network capable, field re-programmable devices everywhere.
A big advantage for me is that now I can completely contain my development environment into a virtual machine, which can be backed up, moved to a different machine, or saved/resumed. If there are enough requests, I can see if I can upload the machine somewhere for easy download.
The RFC2217 standard would allow for some pretty interesting things. I could have an Linux Serial Commander connected to one computer, that controls the Raspberry Pi + monitor in the other room. With SSH tunneling, I think I could flash firmware over the internet (I will test this soon), so that all you would need is a Linux system on the wifi, to be able to reprogram any networked RFC2217 AVR within that network. Another idea is if you need to reprogram your AVR based sprinklers, instead of bringing it inside, you just bring a Raspberry Pi + USB wifi adapter + batteries + serial cable to the unit. Push a button, and the firmware is flashed from your remote computer. Pretty awesome.