Shop OBEX P1 Docs P2 Docs Learn Events
XBEE getting started — Parallax Forums

XBEE getting started

stargazer2050stargazer2050 Posts: 89
edited 2014-08-29 03:37 in Accessories
2 quickstart boards
2 xb24-api-001
AT Mode

Loopback seems to be working, im getting ascii 152, y/umlauts with interspersed letters I type.

now to control it......(this code not working)

Host
Term.start(31, 30, 0, 9600)
Xb.start (3, 2, 0, 9600)
Term.rxflush
Xb.rxflush
Repeat
  Xb.tx.("A")

client
term.start(31, 30, 0, 9600)
Xb.start(3, 2, 0, 9600)
Repeat
  RCVvar := xb.rxtime (250)
  Term.tx (home)
  Term.tx(cls)
  Term.dec(RCVvar)

Just getting a bunch of 255'S
Is there a difference between, xb.rxtime, xb.rx and rxcheck?
Is CR necessary?
Is "?" Necessary

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-08-28 09:12
    Are you sure the modules are communicating with each other? The 255 indicates nothing was in the buffer, depending on which object you're using. This also means the receive is timing out, which tells me no data is getting from the host to the client.

    How do you have things connected?

    Also, just as a note, you don't need to home and cls since the cls will do both.
  • stargazer2050stargazer2050 Posts: 89
    edited 2014-08-28 09:51
    Hi,
    i have each xbee connected dout to 2, din to 3 on each quickstart
    How do I check out communication?
    Cls=home.....who knew. Lol
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-08-28 10:23
    Sorry, need a bit more information. I could tell the pin numbers from your code but the constants weren't there to tell which pin was labeled as what. Also which object are you using. Best guess is FullDuplexSerial.

    As for cls=home, home puts the cursor at the top left position but leaves everything intact on the screen. cls puts it in the same place while clearing the screen.
  • stargazer2050stargazer2050 Posts: 89
    edited 2014-08-28 10:30
    Fullduplexserial
    2 is tx, 3 is rx (I think)
    Im in x-ctu, theres a field labeled ky aes encryption key.
    Has a red x on it, do I need that number in there?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-08-28 13:10
    In FullDuplexSerial you specify the RX pin and then the TX pin. If 2 is your TX then you may have them backward. Your TX pin on the Propeller should be connected to DIN on the XBee. Your RX pin on the Propeller should be connected to DOUT.
  • stargazer2050stargazer2050 Posts: 89
    edited 2014-08-28 15:30
    Have fixed tx rx numbers to match est. Use. (Edited above code)
    Swapped wires, when swapped I get 65535 instead of 255.
    My version of x-ctu looks different so I dont have test button.
    That is legacy version. Not for win8.
    Digi recommends port settings from 4094 to 64, and latency 1.
    Dont need ky aes key according to somebody somewhere.

    At this time cant tell if im communicating or how. Xctu is reading the xbees settings though.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-08-28 16:51
    Not sure where X-CTU is coming into play here, I thought you were going from one QuickStart board to another. With the factory default settings on the XBee modules they should automatically connect. Which XBee Modules/Adapters are you using?
  • stargazer2050stargazer2050 Posts: 89
    edited 2014-08-29 00:36
    Using xctu to test if units are functional.
    Yes, trying to connect 2 quickstarts!
    Parallax kit with usb board and the 5v board.
  • stargazer2050stargazer2050 Posts: 89
    edited 2014-08-29 03:37
    Got it!!

    Works good when the power supply is actually plugged in

    Thankyou!!
Sign In or Register to comment.