wireless programming of arduino with xbee-api

610 views
Skip to first unread message

Paul Keyes

unread,
Jun 18, 2011, 11:32:15 PM6/18/11
to xbee-api
Hi All,

I've been using custom boards similar to the Arduino Fio in a lot of
projects. They are basically arduino pro mini boards with an xbee on-
board. I love having the ability to reprogram the avr chips
wirelessly with the Arduino IDE and sparkfun xbee explorer. Up until
now I've been using xbees in transparent mode, but for a couple new
projects I plan to use this library and API mode. Is it possible
somehow to wirelessly program a Fio-like arduino when the xbees are in
API mode, or do I have to switch back to transparent mode first? I
could do this switching with the remote AT comand functionality, but
its a hassle to switch back and forth. I'm just wondering if anyone
else has been thinking about this...

Thanks,
Paul

Matt Pinner

unread,
Jun 19, 2011, 2:53:39 AM6/19/11
to xbee...@googlegroups.com
Paul, Great great question. I've been doing and wondering the same thing... Anyone know if this works?
--matt




--
You received this message because you are subscribed to the Google Groups "xbee-api" group.
To post to this group, send email to xbee...@googlegroups.com.
To unsubscribe from this group, send email to xbee-api+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xbee-api?hl=en.


Andrew Rapp

unread,
Jun 19, 2011, 10:02:26 AM6/19/11
to xbee...@googlegroups.com
That would be a great feature and something I looked into in a while back.  The issue is the Arduino bootloader.  The bootloader is one of the key features of Arduino that makes is so easy to program.  Normally you would need an AVR programmer to load code onto the AVR, but Arduino bootloader allows programming via serial http://www.arduino.cc/en/Main/Bootloader  My understanding is that to program via API mode, Arduino would need a modified bootloader that understands how to parse XBee packets and write the program code to flash.  I didn't know enough about AVR/bootloaders to get anywhere, so I abandoned the effort.  If anyone has ideas, please chime it.  So, looks like switching to AT mode for wireless programming is a good option, at least for series 1 -- it's not possible with Series 2.  BTW, here's the bootloader source code http://code.google.com/p/arduino/source/browse/trunk/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168.c

Andrew  

Paolo Di Prodi

unread,
Jun 19, 2011, 1:30:54 PM6/19/11
to xbee...@googlegroups.com
Yes I had the same plan to do a wireless bootloader via SPI for my Norduino project.
If you use the XBee in transparent mode you can simply use this configuration:
http://www.ladyada.net/make/xbee/arduino.html
To program it in AT mode you need to modify the bootloader to use the UART to
parse the incoming packets.
I think is duable because you can mostly reuse the uart code from the existing bootloader.
In my case is a bit harder because I have to do it via SPI
:-)
Paolo Di Prodi
Super Sayan
Robomotic LTD
Glasgow
UK
Company Code: SC389778


David Sainty

unread,
Aug 21, 2015, 10:28:58 AM8/21/15
to xbee-api
Old post I know, but I've been wanting to do this for years and finally gave up waiting for someone else to do the work :)

The bootloader is here, is an extension of OptiBoot but also understand the XBee API protocol: https://github.com/davidsainty/xbeeboot

A patch to avrdude to also talk to a second XBee in API mode: https://savannah.nongnu.org/patch/index.php?8719

Hopefully people will find this useful :)

Nick Stein

unread,
Sep 2, 2015, 9:19:42 PM9/2/15
to xbee-api
Cool! 

Can this be used with the standard Arduino IDE?  I will have to do some research on costume compiling and such, if I ever find the time, unless it ever is included in or somebody releases a windows bin ;)

Thanks for sharing,

minh hoang tran

unread,
Nov 28, 2015, 3:49:52 PM11/28/15
to xbee-api
Hi. 

It looks awesome but I am not sure how to use it. I putted an issue on the git repository (is it the right thing to do?). Basically, could you please explain a bit more about how to use xbeeboot? Ideally will be like having a usercase. I am a beginner with bootloader. Normally I just load code using the Arduino IDE so I don't know how to use xbeeboot. How do I connect the xbee in the computer side? How do I upload the code? How do I add the "xbee programmer" option to the IDE? How to use the patch-xbee file?
Thank you very much for your time.

Regards

st...@enolt.com

unread,
Jun 27, 2018, 8:07:01 AM6/27/18
to xbee-api
Hey David,

Would you be willing to share some more clues as to how to use your code?
Do you have a prebuilt avrdude with instructions on how to use it that will work?

Rgds,
Steve

David Sainty

unread,
Jun 30, 2018, 7:30:17 PM6/30/18
to xbee...@googlegroups.com
Hi Steve,

I've got instructions on the GitHub page.  Try those and see how you go.

I haven't done a prebuilt avrdude sorry.

Cheers,

Dave


--
You received this message because you are subscribed to a topic in the Google Groups "xbee-api" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xbee-api/3PNn2uPwyRc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xbee-api+unsubscribe@googlegroups.com.

To post to this group, send email to xbee...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages