Shop OBEX P1 Docs P2 Docs Learn Events
Receiving XBee data okay, but not able to send. — Parallax Forums

Receiving XBee data okay, but not able to send.

patterson7019patterson7019 Posts: 25
edited 2010-02-28 20:00 in BASIC Stamp
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 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,[noparse][[/noparse]temp] 'works great
SEROUT TX,BAUD,[noparse][[/noparse]"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. both ends send and receive perfectly.

Thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.perfectaperture.com/robb

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-02-28 14:52
    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 AllenTracy Allen Posts: 6,662
    edited 2010-02-28 20:00
    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
Sign In or Register to comment.