This might be a little far fetched to include in the standard XBoot
line-up, but I thought I would share a little about how I'm using
XBoot and discuss if adding further capabilities in this direction is
within the scope of XBoot.
So I've used Digi XBee radios with XBoot for several projects, which
is pretty standard - it works right out of the box without any changes
to XBoot or AVRDude. On my latest project, I used a $200 Digi
ConnectPort device to patch the AVR through to the Internet via XBee.
This can also be accomplished by connecting an XBee to a PC and using
fancy data piping or a program like remserial (
http://lpccomp.bc.ca/
remserial/). I'm not a Windows user and therefore am not aware of
any, but there quite likely are similar solutions for Windows.
Remserial bridges data from a TCP connection to a virtual serial
port. So I use remserial to open a socket between the ConnectPort and
my webserver. Then I send a command which the main AVR program
receives and resets, calling the bootloader, immediately following
which AVRDude contacts it and sends the program. An example
programming command looks like:
(Start remserial)
root@mywebserver:~# remserial -d -r 123.123.123.123 -p 50123 -l /dev/
remserial1 /dev/ptmx &
(Send the start programming command, followed by AVRDude command)
root@mywebserver:~# printf "BOOT:<Address>:;" > /dev/remserial1 &&
avrdude -c avr109 -p x256a3 -P /dev/remserial1 -b 38400 -e -V -U
flash:w:programupdate.hex;
It's a lot slower due to latency (about 40 seconds vs 10 seconds in
person) but it's way faster than having to travel for an hour and a
half out to the site just to try something out. I haven't had any
insurmountable reliability problems, as TCP seems to take care of its
data packets fairly well. I can't seem to get it to respond to the
read command, which is a little precarious but I haven't noticed a
problem there either. AVRDude also gives an error on exit, saying no
response was received to the "exit bootloader" command (even though
the command is received and the bootloader is properly exited). I'd
like to get to the bottom of these, but haven't had time yet.
So that's what I've done so far. As I'm using an XMega with 8KB of
boot flash, there's a little extra room to play around with. I was
thinking of adding both code to the bootloader (as an option) as well
as a server daemon that can facilitate automatically updating a device
the next time it boots.
Does that sound like it could be within the scope of this project, or
should it be separate? Or are there any better ideas to accomplish
the task? I'd love to hear any thoughts on the subject.