Setup: XBee Coordinator on XBee USB Explorer on COM5, XBee EndDevice on Arduino Mega.
(BTW, if you read my previous post, this will not work with the rerouted Serial. Put both jumpers to 'XBEE' on the XBee Shield)
Anyway, here's how I did it.
- Set up both XBee's to use 57600 baud.
- Upload .hex-file using AVRdude. Here is my cmdline:
avrdude -Uflash:w:ledXBee.cpp.hex:i -cstk500v1 -P \\.\com5 -pm1280 -b 57600 -D
- At the precise moment you hit Enter, also press the reset-button on the Arduino. You may have to try a couple of times. Basically, methinks its because DTR isn't transmitted to the Arduino wirelessly, so you have to perform that duty yourself. I have an idea on how to fix it, but it requires some soldering..
- Done.
A screenshot may be in order:
Ok, so that works like a charm. I must explain that the XBee's are 4 inches apart, and the binary is less than 3K. I don't know if it'll scale in size or distance.
So, over to that last pesky bit, having to hit reset manually.. But that will have to wait to another day.
I have been trying this and I get close to getting it to work.
ReplyDeleteavrdude: Device signature = 0x1e950f
avrdude: stk500_cmd(): protocol error
Any ideas?
Missed the rest of it
ReplyDeleteavrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e950f
avrdude: stk500_cmd(): protocol error
I haven't played with it since I wrote the post, but I vaguely remember seeing similar; I think the avrdude binary shipped with the Arduino GUI has been patched, try using that one rather than a "stock" AVRdude from other sources
ReplyDeleteHow is it possibile the communication? You are sending file through port connected to usb explorer not to arduino mega? How is it possibile that it's work? Can u explain
ReplyDelete