Go Down

Topic: programming Arduino remotely via XBEE (Read 2369 times) previous topic - next topic

pmail

I am trying to remotely program an Atmega328 with UNO bootloader using an XBEE.   For the reset line, I use XBEE's I/O line passing, with the programming done via the XBEE's serial link.  The /RST, TX, and RX signals at the transmitting XBEE and remote Arduino show proper levels and polarity.  But I get an error message (a sync error after 3 retries) when trying to program it using Arduino's AVR to write to the transmitting XBEE.  On other projects that are programmed in the usual way, I have seen this message when there was a problem with reset levels or timing.

Does anyone know of either:
1) a way to program Atmega328s remotely via XBEE
or
2) a reference document for the bootloader/AVR with a description of the loading process, especially timing and state diagrams?



  • I am using the most recent releases of Arduino and bootloader.

  • Programming was tried at 9600 and 57600.  XBEE to XBEE communication was fully verified at both baud rates, but with no programming success.

  • Reset at remote XBEE came from an I/O  thru a 0.1uF cap to the /RST pin pulled up with 10K.  A direct connection between XBEE and /RST was also tried.


PaulS


pmail

I am using series1 XBEEs (not ZIGBEE).

PaulS

Quote
I am using series1 XBEEs (not ZIGBEE).

All the tutorials I've seen that claim that wireless programming of the Arduino is possible used Series 2 models.

pmail

There are instructions for programming via series 1 XBEEs like Adafruits' http://www.ladyada.net/make/xbee/arduino.html.  This is identical to what I have been trying to do, except Adafruit only got it to work with the Duemilanove bootloader and I need to make this work with the UNO bootloader - or at least understand why it doesn't.  That's why I was looking for documentation on that bootloader.  I want to compare my scope traces with the bootloader's protocol and timing requirements.

If anyone has been able to remotely program an Atmega328 with UNO bootloader via series 1 XBEE, I could use some advice.

pmail

Found the problem and solution:

Series 1 XBEEs seem to get unreliable above 57600 bps in my tests.  And the UNO bootloader runs at 115200 bps with no option of changing that speed.  Using Adafuit's bootloader https://www.adafruit.com/products/123 everything runs well at 57600 bps.  Now the procedure on this page http://www.ladyada.net/make/xbee/arduino.html works.

Go Up