Shop OBEX P1 Docs P2 Docs Learn Events
XBee Object with Prop — Parallax Forums

XBee Object with Prop

Ole Man EarlOle Man Earl Posts: 262
edited 2009-04-19 19:23 in Propeller 1
I am trying to use XBee modules with the prop. I want to send data FROM the prop TO a PC. I have the XBee's working BUT...

I have both XBee units set for 57600 baud. I have a GPS that is set for 57600 baud. Works GREAT ! Only using TX/RX signals.

Then I write a program to send "Hello World " via the Xbee but the data is unreliable... I never quite get the complete "Hello World " but just bits and pieces of it...enough to see the XBee's are working (sort of).

Could it be the GPS unit has a hardware uart and the prop is a 'bit banger' ? I have tried it at various speeds (changing the xbee's baud rate accordingly) The lower speeds work better than higher....but not by much.

Anyone have XBee object experience ??

BTW.. Single characters work MOST of the time. It's 'XB.str(string("Hello World "))' that is having trouble.

Comments

  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-04-19 05:31
    This may seem like a stupid question, but are you SURE your data connections are reliable? I was pulling my hair out over an LCD one time... I would get bits and pieces of text I sent to it, but it would say something like "ABBDDFFHH" instead of "ABCDEFGHI".

    It turned out to be a faulty row on my breadboard that didn't ALWAYS make good contact. I put a fatter wire in it to make better contact and the problem dissappeared.

    Bottom line - sounds like some kind of faulty communication. If your software is sound, then it's gotta be hardware...

    BTW, I don't remember if I sent you a message. I got your gyro boards yesterday. I'm going to be playing with them and trying to get the gyro's mounted on them later this week. I should have it working by next friday. [noparse]:)[/noparse]
  • Ole Man EarlOle Man Earl Posts: 262
    edited 2009-04-19 06:26
    OK Phill I think I solved the problem. The initialization of the XBee module was wrong. Got it now. We now have data from the Auto Pilot streaming via XBee to the PC...cool!
    Time to hit the sack tonight...
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2009-04-19 12:03
    I had something similar and the problem turned out to be a bad solder joint on the sparkfun adapter board for the XBee socket.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thomas Talbot, MD
    Gunpowder, MD, USA
  • AnubisbotAnubisbot Posts: 112
    edited 2009-04-19 12:09
    year xbee are nice , just make sure you set them up so each one points to the destination address of the other.
    Other wise, it can happen that it starts to stall and give just parts back.

    Did you get the pcb's yet by post.
    I had send you a complete set of our uav pcb's

    1x IMU board
    1x MCU board
    1x Remote board

    Best regards Oliver
  • Ole Man EarlOle Man Earl Posts: 262
    edited 2009-04-19 16:32
    Not yet Oliver. The XBee's work ok, but the one sending data stops after a few mins and I have to repower it to get data going again. I am going to look at it today.
    Earl
  • Ole Man EarlOle Man Earl Posts: 262
    edited 2009-04-19 16:36
    I found a pulse of the reset pin gets the data going again.
  • AnubisbotAnubisbot Posts: 112
    edited 2009-04-19 19:09
    thats sounds like the common xbee beginner bug.
    There are 2 things you have to take care of ,
    first set with the xbee tool the modules destination address to each other.
    Its the address what you find on the sticker on the bottom of the xbee.

    2. you need to write the command
    +++ ATRW
    after any firmware change or update.
    or it will stop working after a few mins. that drove me nuts. but no they work great
  • Ole Man EarlOle Man Earl Posts: 262
    edited 2009-04-19 19:23
    Thanks !!!
    Works like a charm. You would think the manual would tell you this right up front. All I saw mentioned was a parameter called 'MY'. I could not find it with the X-CTU windows software.
    Earl
Sign In or Register to comment.