Pages: [1]   Go Down
Author Topic: Wireless sketch upload to Arduino FIO using XBee  (Read 1744 times)
0 Members and 1 Guest are viewing this topic.
South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im trying upload my sketch my FIO wirelessly but i keep getting the following error:

avrdude: stk500_paged_load(): (a) protocol error, expect=0x14, resp=0x74
avrdude: stk500_cmd(): programmer is out of sync

I followed the instructions from ladyada http://www.ladyada.net/make/xbee/arduino.html
I have checked the following:
57600 baud on both radios
soldered the little jumper on the Xbee explorer between RTS and DIO3
checked the set RTS on close in the device manager
I have checked that the configuration in the XBees is permanent by replugging them and reading the config.
I do have communication between the radios (serial) if i upload the sketch with a USB cable.

I found this from Nathan Seidle who says its a problem with AVRdude http://www.sparkfun.com/tutorials/122#Step2 but i dont really understand.
Do i need to burn a new bootloader to the FIO? Or just use screamer 2.0 instead of the Arduino IDE?
I tried but it only works for 19200 baud which was intended for the 168 chip as i understand.

Has anyone done it successfully with a FIO?
Logged

South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got it working!  smiley-cool
I can now upload sketches wirelessly, using the standard Arduino 1.0.1 IDE and i did not need to update the bootloader on the FIO or anything!
I had to do the following:
  • disable CTS on DIO7 on both XBees
  • on the base unit: change setting "DIO Change Detect" to 08 instead of FF. This means only pin 3 is monitored for changes instead of all 8 pins.
I didn't try each one individually so can say if both are required.  smiley
Thanks to King7 for his post on Nate's tutorial.
Logged

Austin, TX
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am struggling with this.  I hope I missed something obvious.

I followed these instructions:  http://arduino.cc/en/Main/ArduinoBoardFioProgramming

The arduino board is the OSEPP Fio which, as far as I can tell, is a clone of the Arduino brand Fio
Both Xbee modules are XBee S1
Both Xbee modules have firmware 10EC (the latest)
I'm using a XBee USB Adapter made by Parallax which seems very close to the XBee Explorer board

I jumpered IO3 to RTS (see attached photo)
I put a check next to Set RTS On Close in the properties of the COM port (COM 11)

I am able to read and configure both XBee modules successfully using X-CTU and FioXBeeConfigTool
I used FioXBeeConfigTool to configure both modules with the settings recommended in the tutorial.
I kept the default PAN ID (3332) for both radios.
I set both to 57600
MY ID is 0000 for the Programming module and 0001 for the Fio module
DL ID is FFFF for the Programming module and 0000 for the Fio module

This all went smoothly.  I am able to read and write to the modules using the USB Adapter with no problems.

When I attempt up upload a sketch (Blink) using the Arduino 1.0.3 IDE, I never get a complete process.
I have Board set to Fio and COM Port set to 11.
It always results in the error code "avrdude: stk500_getsync(): not in sync: resp=0x00"

Sometimes the RSSI light on the Fio will come on.  Sometimes it comes on when the transmission begins.  Sometimes it comes on when it ends.  Once it stayed on for ~5 seconds but the upload still failed.

I checked both modules and saw that DIO Change Detect was set to 8, not FF.
I changed both modules so that DI07 has CTS disabled.

I haven't found any other things to try.


* 2013-01-05 15.24.52.jpg (1943.52 KB, 2448x3264 - viewed 48 times.)
Logged

Austin, TX
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I also went through these instructions:

http://funnel.cc/Hardware/FIO

Which are pretty much the same thing.  One difference is it calls for closing the solder jumper near the power switch on the Fio board.  I did that just now and still no improvement.
Logged

Austin, TX
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well it works now.

I think I figured out that you can't power the Fio with the USB cable.  That's only for charging (like the instructions say).  I powered the board with a FTDI breakout board.  But this didn't fix the problem at first.

First I had to upload a sketch over the FTDI cable (which means removing the wireless card).  After that it started uploading sketches over XBee.

This is good news but it's also annoying because connecting via FTDI means soldering on the header pins, which I wanted to avoid.  Oh well, better than not working.
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 158
Posts: 2894
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you getting it to work with the XBee baudrate set to 57600?


  
Logged

Austin, TX
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, 57600.  I think it has to be that speed for it to work right.
Logged

South Africa
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

RevMen: You soldered the header pins on the x-bee explorer right? A solder sucker will remove that if you need to in future. Otherwise you could use 2 header pins and put a standard PC style jumper between them. If you use right angle pins it wont even stick out too much.

You can also power the fio using a battery... the standard battery connector works a treat. It lasts a couple of hours like this (depending on how much serial work the xbee is doing i suppose). I prefer it this way because then i  can have the whole thing mounted in my project, on the other work bench. It helps the imagination flow. I have even had it charging while I'm programming (although i think this is not recommended).

You definitely need to have the baud rate set to 57600, as this is what the fio bootloader is expecting. I would recommend using 57600 in your project too. Its fast enough for most things.

Are you using x-ctu to configure the xbees? I seriously recommend it! That way you can see all the possible settings etc...
Logged

Pages: [1]   Go Up
Jump to: