PDA

View Full Version : Receiving XBee data okay, but not able to send.



patterson7019
02-28-2010, 02:06 PM
I have 2 XBee's, one on my robot, the other hooked up to my computer. I can send data from the computer to the robot, and it works great. But sending the data from the robot isn't working. I have pin 12 running through a resisters to convert 5V down to 3.3V (http://forums.parallax.com/showthread.php?p=885155) and going to the XBee's Din pin, and have flow control disabled on the XBee. I also tried disabling the CTS parameter on the XBee on the robot.




TX PIN 12
RX PIN 11
BAUD CON 84 '9600 8N1
SERIN RX,BAUD,perror,WAIT_TIME,timeout,[temp] 'works great
SEROUT TX,BAUD,["Read you",CR] 'never gets received on the other end




I'm wondering if there is a setting I need to change, or if I need to actually wire up the CTS pin to the robot. I would think I shouldn't need to, the XBee manual says a minimum of Vss, Vdd, Din, Dout need to be hooked up.

I have verified the XBee is able to transmit when I have it hooked up to my other computer via the USB Adapter board (http://www.parallax.com/Store/Accessories/CommunicationRF/tabid/161/ProductID/643/List/0/Default.aspx?SortField=ProductName,ProductName). both ends send and receive perfectly.

Thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.perfectaperture.com/robb (http://www.perfectaperture.com/robb)

Mike Green
02-28-2010, 09:52 PM
1) You may have made a mistake and not disabled flow control. RTS, if enabled, only affects the receive data to the robot.

2) You also need to either disable or support flow control on the PC side. If the PC xBee won't accept data, the robot side can't send it.

3) The CTS signal on the robot side tells the robot whether it can send information or not. It doesn't actually affect whether the robot can send.

Tracy Allen
03-01-2010, 03:00 AM
It may be that the computer points to the robot XBee address, but not vice versa. Are you running X-CTU on the computer? If so look at the MY and DL paramters for both of the XBees. They have to point to one another, that is, the MY on each one should match the DL on the other. Those addresses can either be burned into the eeprom on both ends, in which case they will talk to one another without any program intervention, or else those addresses can be programmed on the fly from PBASIC, in which case you would have to show us more than the snippet of code you listed above.

Other parameters to look at:
DH should be zero in order to enable 16 bit (MY) addressing.
D6 should be 0 to disable RTS handshaking
D7 should be 0 to disable CTS handshaking

Have you read through Martin Hebel's Appbee documentation?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)