Wireless programming Arduino Uno with Xbee

Dear all,

I'm at a loss in my little project to program an Arduino Uno board wirelessly... Could you please help me? =(

I've been going trough tons of tutorials and forum topics but none have solved my puzzle... For reference, I've used this tutorial as a framework:
http://www.ladyada.net/make/xbee/arduino.html

Setup sender:

  • Xbee Pro S1 (802.15)
  • XBee USB Adapter Board (parallax)

Receiver:

  • Arduino Uno
  • Wireless SD shield (switch set to 'micro')
  • Xbee Pro S1 (802.15)

I've made all the right connections as describe in the tutorial (about the connection between RTS and IO3 at the sender and the reset amplifier at the reciever). The communication works flawlessly, I can control the Arduino Uno wirelessly with the PhysicalPixel script using the setup. The reset works also flawlessly: when I put the IO3 of the sender on high, the Uno resets itself.

When I try to upload a script using the sender and the receiver powered by batteries, a lot of LEDS start to flikker at both sides, the Uno resets itself as soon as the scripts starts uploading. But after a while, AVR_dude returns errors:

Binary sketch size: 2,202 bytes (of a 32,256 byte maximum)
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x42
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

It's not always the same error:

Binary sketch size: 2,202 bytes (of a 32,256 byte maximum)
avrdude: stk500_cmd(): protocol error

I also have at my disposal:

  • 2x S2 Xbee chips
  • 2x Arduino Uno
  • 2x Arduino Mega
  • Ladyada's Xbee adapter v1.1 but without FTDI cable
  • several other shields and components not related to this topic

I'm going to order the wireless programming kit from DFROBOT (http://www.dfrobot.com/index.php?route=product/product&product_id=409#.Uq4bDvTuJyx) just in case.

I need to finish this project by 29/12/2013 and it absolutely has to have the remote programming function as I'm not that confident of myself that I can program the system all in 1 time without mistakes. The system will be installed at a place impossible to reach and at high cost to reconfigure.

Ow by the way: I have set the baud rate of the XBee's at 115200 (which is the rate at which the Uno needs to be programmed if I'm not mistaken) and I've also tried it at 57600, 19200 and 9600 just to be sure.

You can find the X-CTO Xbee configuration files attached to this post.

XBEE Master.pro (622 Bytes)

XBEE Slave.pro (605 Bytes)

Nobody? :frowning:

Oooh bugger....

I have received the DFRobot kit for wireless programming. Although it's advertised that it's Arduino Mega 2560 compatible, it won't work... See all my attempts and possible replies from DFRobot over here:

It does program the Arduino Uno very nicely though... unfortunately I need the Mega for my project.

Update: the Arduino Mega 2560 R3 is not compatible with the DFRobot wireless programming kit as stated on the DFRobot forum: DFRobot Tech Support Forum

Something to do with the baud rate of 115200 that makes the Arduino Mega unstable...

I see two options now:

  1. using an arduino uno with the main program code and using an arduino mega with lite code. The mega sends the data by serial to the uno every 10ms. I plug in the kit from DFRobot on the uno.
  2. using a raspberry pi to do the programming and interfacing with the raspberry pi over wifi or something

I'm a little bit afread of the first option as I also have a gsm shield using serial. Adding an xbee module using serial and another arduino board over serial... I'm not confident that my data will safely arrive where it has to arrive.

And I have got no experience whatsoever with the raspberry pi... Does anyone have an idea how easy it is to set this up?