Flashing Arduino’s and AVR’s over the Network

PI + Pogo + LSCommander

Can flash over the network for Raspberry Pi’s, Pogoplugs, and normal Linux machines.

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.

I’ve uploaded this updated LScreamer to bitbucket this time, a link to it should be in the side bar.  Feel free to ask any questions about getting started with LScreamer.


My summer goals are to have a working prototype of an autonomous boat, by June 30th.  It will be equipped with the necessary navigational sensors to be able to move autonomously in a small body of water, taking depth measurements.

I am making a pcb for it in KiCad since it is open source, free, and really decent software.  My only other experience was with Eagle Cad, which was good, although I didn’t agree with the small board size limitations, and the cost.

Since these parts will be for a boat and a submarine, size and weight doesn’t matter so much.  I did some brainstorming of a simple method to have data/power lines that connect multiple modules and I thought of a good solution: RJ45 connectors/cables aka Ethernet cables!  Using these connectors, I can have 8 lines of twisted pair and shielded cables that can connect a remote sensor module to the main board.  I believe each conductor can handle about half an amp for standard 24 AWG cable.

For example, the GPS module that I created a board for, has the following lines:

  • VCC
  • Enable
  • GND
  • 3D-Fix
  • D+ and D-
  • RX and TX

With the GPS board that I made, I am able to get all of those onto the 8 conductor RJ45 cable.

One of the major problems with making embedded devices is the connectors.  With unreliable connectors, you have an unreliable robot.  So by choosing Cat5e connectors, I will have a proven connector with conductors that are twisted together and shielded possibly (shielded ethernet cable is more pricy, STP is the acronym I believe). I looked into HDMI connectors, since that has more connections, but the current rating for each conductor was less, and there currently is no ‘wiring your own hdmi cables’ solution yet, like there is for Cat5 cable.  I will get the unshielded cable since I could always shield it if it is necessary.  A golden rule about engineering is to not over build/over engineer something as that cost is unnecessary and hurts the products bottom line.

The plan is for me to design an board to interface an Accelerometer with a magnetic sensor, the main board, and a dummy board to interface the RJ45.  Since I’ll be using the ATMEGA1280, I will have many extra pins, that will be handled with a ribbon cable connection, or perhaps a few ethernet cable connections.  When I build boards for my hobbies, I like to build some future-proofness into them, in the form of extra connectors and prototyping space.

LScreamer – Linux Wireless Firmware Downloader

Hello Sparkfun people!

Well I really liked the Screamer V2.0 from Sparkfun.com but the program was written in Visual Basic 6.  Since I’m a linux guy, I was running it thru virtual box and I needed to add support for the ATMEGA1280, so I had to choose between learning VB6 or something better.  I chose to write it in Python for linux, so I wouldn’t have to run the Windows XP image through VirtualBox.

LScreamer lets you scan the serial ports currently used by your system, and gives some good examples of how to use it.  I used the pocket programmer to download the bootloader via the ISP header, and I’ve made LScreamer to be fully compliant with Screamer V2.0.  It’s a command line utility, but it is very user friendly if your new to Linux or the command line.

I made it pretty easy to add new processors to it, and if you do, it would be great if you passed it onto me so I can update LScreamer.