Shop OBEX P1 Docs P2 Docs Learn Events
XBee Assist — Parallax Forums

XBee Assist

RICoderRICoder Posts: 91
edited 2009-02-15 22:52 in Propeller 1
I'm stuck on my first XBee project, and looking for pointers into where I should look for errors.

Here's where I am in code:
  objDebug.start(PIN_SERIAL_RX, PIN_SERIAL_TX, 0, 9600)                           ' Initialize comms from Prop to PC

  objXBee.start(PIN_RX, PIN_TX, 0, 9600)                                           ' XBee Comms - RX,TX, Mode, Baud
   
  objXBee.AT_Init                                                                  ' Initialize for fast AT command use - 5 second delay to perform
   
  'ASK FOR ADDRESS
  objXBee.AT_Config (string ("ATDL"))

  'READ IT IN
  objDebug.str (string ("debug 1"))
  btRX := objXBee.RX
  lAddressLow := btRX << 24
  objDebug.str (string ("debug 2"))
  btRX := objXBee.RX
  lAddressLow := lAddressLow | btRX << 16
  ...




It prints Debug 1 to console and never gets to Debug 2. Ergo, I assume it is stuck waiting for the rx buffer to fill, i.e. there is nothing coming in.

Hookup is very simple.
vcc p1 - 3.3
dout p2 - prop p20
din p3 - prop p21
dtr p9 - gnd (active high)
gnd p10 - gnd
rts p16 - gnd (active high)


I've checked the device on the usb breakout board and always reset to default before plugging it in.

Thoughts?

edit: Bonus question - Is the FullDuplexSerial object FIFO or FILO?

Post Edited (RICoder) : 2/15/2009 6:41:47 PM GMT

Comments

  • AnubisbotAnubisbot Posts: 112
    edited 2009-02-15 18:57
    what do you wanna do with the xbee, if you only need to send data like a serial link, and the modules do not change, set the 64 bit address with the x-ctu tool for both cor/end device.
    Then you just need to feed in what ever you want with just the serial driver, with out the xbee code.
  • RICoderRICoder Posts: 91
    edited 2009-02-15 19:04
    Initially it is just end to end serial comms, but the plan is to incorporate several devices, so I need to figure out how to use these things beyond just AT mode. I'm quite sure that my hookups aren't enough right now to support API mode, but if I can get serial comms working, then I can make the next step.
  • AnubisbotAnubisbot Posts: 112
    edited 2009-02-15 19:39
    for API you only need rx ,tx 3.3V, 0V but the best is to write your own api module.
    So did i for my RC remote setup.
  • RICoderRICoder Posts: 91
    edited 2009-02-15 21:40
    @Anubisbot: Thanks for the input, and I completely agree about writing my own API, as that is usually what I do, but the pre-fab objects are nice for initial testing and reference.

    I have a new question:· When I send it the command to set the XBee module attribute (like the DL or MY) does it actually send out an "OK" as you see in the tool from XBee?

    I found a week solder joint on my breakout board on the TX pin, and I think that must be what the problem is, because now I see results.· That said, the results are not at all what I would expect to see.· Hence my update (is the FullDuplexSerial object FIFO or FILO....and is the "OK" coming out).
  • sylvie369sylvie369 Posts: 1,622
    edited 2009-02-15 22:52
    RICoder said...
    I have a new question: When I send it the command to set the XBee module attribute (like the DL or MY) does it actually send out an "OK" as you see in the tool from XBee?

    Yes. You can see this if you communicate with the XBee using a terminal program as well - it's not generated by the XBee tool.
    Take a look at the PBasic program for reading RSSI on page 24 of this document:

    selmaware.com/appbee/AppBee_Doc.PDF

    You'll see a routine for handling that "OK" to keep it from being read as part of RSSI.
Sign In or Register to comment.