Pages: [1]   Go Down
Author Topic: Can not get a scketch to upload using xbees.  (Read 437 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

my error: ardunio ide.
avrdude: stk500_getsync(): not in sync: resp=0xe0

One xbee is on a USB from the PC.
Does buffer size on the port matter. RTS is on and baud rate is 9600 on everything
The recieving xbee is on a KCV shield on top of an Arduino Duemilanove ATmega328.
D3 has been jumped to RTS and a pull up resistor in place.
Is it possible to do this with out this jumper? I fear its not and I can not get to the recieving xbee.
No problem passing variable data back and forth and writing to EEPROM.
It will just not upload a scketch...
Have researched and tried several setting configuration for the two xbees.
Thanks for any help.
Bill




Logged

Leeds, UK
Online Online
Edison Member
*
Karma: 78
Posts: 1720
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The arduino bootloader doesn't run at 9600 Baud.

The value depends on which bootloader you have, and you can find this out by looking in the boards.txt file.
Logged

~Tom~

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Tom,
I have tried changing the boards.txt file to 9600
and also tried changing the xbees to 57600.(what the board calls for)
Still no luck.
Logged

Leeds, UK
Online Online
Edison Member
*
Karma: 78
Posts: 1720
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You couldn't just change the boards.txt file as that is hardcoded into the bootloader (you would have to recompile and reflash the bootloader to change it).

Does it work if you disconnect the RTS line, and instead press the reset switch on the arduino just before uploading begins?
Logged

~Tom~

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The reset is built into the USB to serial board.
Its a sparkfun mini.
apresiate your input.
Bill
Logged

Leeds, UK
Online Online
Edison Member
*
Karma: 78
Posts: 1720
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I was meaning that if you are trying to use an xbee to program the board, you have to reset the board just before uploading as the autoreset feature wont happen.

You can try connecting the RTS pin of the xbee on the arduino end via a 100nF capacitor to the arduino's reset pin. Or you just have to press reset manually - whether that is with a button, or by momentarily shorting the reset pin to ground with a wire is up to you.
Logged

~Tom~

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well... that aint going to happen.
The board is on a pole 3o feet in the air.
I can still send it variables, write to the EEprom and get data back.
I would like to update the sketch on it.
I may have a XBee failure.

I thought the auto reset would work as the newer boards have this built in.
again thanks for your input.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48569
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I can still send it variables, write to the EEprom and get data back.
I would like to update the sketch on it.
I may have a XBee failure.
The first and third statements seem to contradict each other.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the sketch currently on the chip has the ability to send back readings from sensors and write the variables
I send it from my PC to EEprom. I just can not get a new sketch to upload.


Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48569
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I just can not get a new sketch to upload.
I understand that. What I don't understand is why you think that the otherwise perfectly functioning XBee is, therefore, somehow broken.
Logged

Leeds, UK
Online Online
Edison Member
*
Karma: 78
Posts: 1720
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I thought the auto reset would work as the newer boards have this built in.
again thanks for your input.

They do, but it is part of the USB-Serial converter built in. If you are using xBees, then I presume you are bypassing this?

Maybe you could do a quick sketch of how you have wired the xBee to your board.


Also, you said you tried changing the Baud rate? This is programmed into the xBees as well as the bootloader, so if one of the xBees is 30feet in the air, how did you set it to the faster 57600 baud rate required?
Logged

~Tom~

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have another that I set up as a test to try and duplicate the issues.
The xbee on the pole was set to 9600 before I was involved.

Your right. The xbee is working to tranfer data. But I have had some issues reading the parameters through x-ctu. Can the parameters on the xbee on the pole be read?
Logged

Leeds, UK
Online Online
Edison Member
*
Karma: 78
Posts: 1720
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't think they can, i think they have to be read locally.
Logged

~Tom~

Pages: [1]   Go Up
Jump to: