Wireless Arduino programming not working

Xbee projects like the adapter, xbee tutorials, tweetawatt/wattcher, etc. purchased at Adafruit

Moderators: adafruit_support_bill, adafruit

Wireless Arduino programming not working

Postby aseem » Sun Feb 20, 2011 10:40 am

Hi. This is my first post...
I'm making an Arduino based timer/thermostat for my pellet stove. I do have one that I bought with the stove, but as a new arduino fan, I want to make my own and improved controller. Since this will be an embedded solution, a wireless link for updating my software on the Arduino will be just perfect.

I received my two XBees with adapter kits earlier this week, and have been playing with it ever since. However, I can't get the programming link to work.
I have tried to swap the modems AND adapters, and I have also tried with two different Arduinos (Uno and Nano).

This is what I observe:
- Both green LEDs are blinking
- Red LED on the receiver end (Arduino side) is constantly on
- I see that the Arduino is resetting, so my reset circuit is correct
- When using a scope on the TX pin on the Xbee adapter, I see two short signals (pulses) going from the computer to the Arduino
- Moving the scope probe to the RX pin, I see a long pulse sequence going back to the computer.
- The red LED on the transmitter side (computer side) goes on for a short period when the Arduino is responding to the request from the IDE
- NO blinking of TX/RX leds on the Arduino
-IDE error message: avrdude: stk500_recv(): programmer is not responding
-Communication with the XBees from X-CTU works fine, and I have upgraded both to 10E8 and configured according to the writeup on the adafruit site

I also notice that uploading a new program over the USB cable to the Arduino will produce en error if the Xbee is connected. If i pull the RX pin on the arduino board (that is the TX pin on the XBee) uploading will work. I have been powering the Arduino through the USB, but in case USB and pin 0/1 will interfere with each other, I now use a wall wart.

My computer runs Linux, but I have also tried from a Windows computer. I'm using IDE directly to program the Arduino over the wireless link

Appreciate any help with this. Btw, I set up the Point2Point project and this is working fine...
aseem
 
Posts: 8
Joined: Tue Feb 01, 2011 3:38 pm


Re: Wireless Arduino programming not working

Postby aseem » Sun Feb 20, 2011 4:56 pm

115K did not work. error message:
Code: Select all
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc
avrdude: stk500_set_extended_parms(): protocol error, expect=0x14, resp=0xe0
avrdude: stk500_initialize(): failed
or sometimes just the protocol error message.

When i check the preferences.txt file, a line reads "serial.download_rate=19200". I also tried to manually specify 115200 for this entry without luck. I have tried different speeds now, from 9600, 19200 etc.
aseem
 
Posts: 8
Joined: Tue Feb 01, 2011 3:38 pm

Re: Wireless Arduino programming not working

Postby adafruit » Sun Feb 20, 2011 7:05 pm

you could try a scope on the receiver end, or logic analyzer, to see what is being received
User avatar
adafruit
 
Posts: 10546
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Wireless Arduino programming not working

Postby aseem » Sun Feb 20, 2011 7:15 pm

This is on the receiver (arduino)end:
- When using a scope on the TX pin on the Xbee adapter, I see two short signals (pulses) going from the computer to the Arduino
- Moving the scope probe to the RX pin, I see a long pulse sequence going back to the computer.


I also tried to connect the TTL cable directly to the Arduino, just to rule out cable fault, and this works great....
aseem
 
Posts: 8
Joined: Tue Feb 01, 2011 3:38 pm

Re: Wireless Arduino programming not working

Postby aseem » Sun Feb 20, 2011 7:30 pm

Btw. I see the same pulses on the transmitter (computer) side of the wireless link
aseem
 
Posts: 8
Joined: Tue Feb 01, 2011 3:38 pm

Re: Wireless Arduino programming not working

Postby adafruit » Mon Feb 21, 2011 12:56 pm

you shouldnt be seeing 'pulses' you should be seeing serial data
User avatar
adafruit
 
Posts: 10546
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Wireless Arduino programming not working

Postby aseem » Mon Feb 21, 2011 5:06 pm

Thats what I mean. Sorry for the inaccuracy. I see the same signals on both sides of the wireless link. First the arduino receive two short serial signals, then the arduino sends back "a lengthy" serial signal (estimated to last over 200 ms), then nothing. I just can't figure out what is wrong. It seems the IDE isn't happy with the answer from the arduino, and don't send any more data.
aseem
 
Posts: 8
Joined: Tue Feb 01, 2011 3:38 pm

Re: Wireless Arduino programming not working

Postby adafruit » Mon Feb 21, 2011 5:15 pm

try manually resetting the remote arduino right before you attempt the upload

also, post a photo of your entire setup (on one desk)
User avatar
adafruit
 
Posts: 10546
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Wireless Arduino programming not working

Postby aseem » Mon Feb 21, 2011 5:50 pm

Thanks for the effort to help me....

I've tried to reset just before upload. Here is a few pics of my setup
DSCN2467.JPG
DSCN2467.JPG (968.49 KiB) Viewed 2288 times
aseem
 
Posts: 8
Joined: Tue Feb 01, 2011 3:38 pm

Re: Wireless Arduino programming not working

Postby adafruit » Mon Feb 21, 2011 7:42 pm

do the point to point echo test with all the parts at 115.2k and make sure it all works
User avatar
adafruit
 
Posts: 10546
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Wireless Arduino programming not working

Postby aseem » Wed Feb 23, 2011 4:19 pm

Point-to-point echo test works for all speeds up to and including 57600. At 115K all output in the terminal window is garbled (as if the baud rate is wrong. I'm using minicom daily, and recognize the baud error symptoms). Everything typed in the terminal window is displayed correctly in the serial monitor, but text typed in the serial monitor and sent, is garbled in the terminal. Same when the Xbee modules (adapter & Xbee) are swapped. The Serial programming is still not working on any speed.

I think this test tells me that the Xbee modules are not to blame, and that the problem has to lie elsewhere. I also tried different digital pins on the Arduino for the p-2-p test. Serial programming have to use pin 0/1 as I understand?

Ideas are greatly appreciated.

Cheers
aseem
 
Posts: 8
Joined: Tue Feb 01, 2011 3:38 pm

Re: Wireless Arduino programming not working

Postby adafruit » Wed Feb 23, 2011 4:24 pm

you're on the right track! the wireless programming sketch is a few years, there have been changes to arduino since then....if you figure out how to get it working let us know!
User avatar
adafruit
 
Posts: 10546
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Wireless Arduino programming not working

Postby Don » Fri Feb 25, 2011 12:32 am

So I'm trying to do the same thing, and seeing what sounds like the exact same problems.
(been debugging this all evening, and finally decided to check the forum. The original post could have been written by me so well do the symptoms match!)

I wrote a little sketch that just transmits a "Count n" every second, with 'n' being an incrementing integer. This shows that some of the characters being sent back to the computer (a Mac in my case) are being corrupted and/or dropped. (I see both, although the dropped characters may just be ones corrupted into something that doesn't print)

These modules did work (good data) with a similar test at 9600 baud, so this appears to be speed related. I note that the (very nice btw) instructions date back to the 57,600 speed bootloader, so I'm wondering - do we know of anyone having success using the XBees this way at 115,000?

Don
Don
 
Posts: 2
Joined: Fri Dec 17, 2010 4:49 pm

Re: Wireless Arduino programming not working

Postby Don » Fri Feb 25, 2011 9:31 pm

Ok, a little more info. Changing the XBee baud back down to 9600 on the Mac end of things didn't help - I still get corrupted characters from the remote Arduino.

So this points to the data between the Arduino and the XBee as the culprit. Further, if I drop the baud at the transmitting end to 57,600 the data errors go away.

So, signal integrity issue or UART timing being slightly off between the devices is my guess - can't tell for sure without a scope that I don't have access to right now.

Don
Don
 
Posts: 2
Joined: Fri Dec 17, 2010 4:49 pm

Next

Return to XBee products from Adafruit

Who is online

Users browsing this forum: No registered users and 1 guest

Stuff to buy from the Adafruit store and links to product documentation!


New Products [114]

Raspberry Pi[82]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
BeagleBone[23]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]