Shop OBEX P1 Docs P2 Docs Learn Events
help with xbee — Parallax Forums

help with xbee

ThricThric Posts: 109
edited 2010-07-20 12:09 in Propeller 1
I'm having trouble setting my xbees (I use the xbee pro 900 xsc modules from sparkfun)to communicate with each other so I'm trying to narrow down the posiable reasons why.

Could somone check this code and tell me if I'm doing something wrong in my software and not my hardware?

Con
'Pins
xbeetx = 2   
xbeerx = 3 
signal = 19 
_clkmode = XTAL1 + PLL16X
_Xinfreq = 5_000_000              '80 MHz      
 
OBJ
         
    xbee: "Xbee_Object"
  
Pub start |l 
  led      
  waitcnt(80_000_000+cnt)    
  xbee.Start(3,2,0,9600)           
  XBee.AT_Init                    
  waitcnt(80_000_000*5+cnt)
  led        
  xbee.dec(9999)
  xbee.str(string("Hello!",13))

  waitcnt(80_000_000+cnt)
  repeat
    led
 
Pub led |hold
  hold:=cnt
  dira[noparse][[/noparse]signal]:=1
  outa[noparse][[/noparse]signal]:=1
  waitcnt(hold+8_000_000)  
  !outa[noparse][[/noparse]signal]

All that I get out of my x-ctu terminal screen is: .ut.......



Comments

  • JasonDorieJasonDorie Posts: 1,930
    edited 2010-07-19 20:00
    I haven't used the XBee object, but I was able to get mine going using FullDuplexSerial with no trouble. I initially had my TX and RX pins reversed - Have you tried switching them?
  • Gerry KeelyGerry Keely Posts: 75
    edited 2010-07-19 20:38
    Hi

    I have just tried your code with two xbee's type ·xb-24 and·it works ok.

    Gerry
  • w8anw8an Posts: 176
    edited 2010-07-20 02:45
    I had an XBee that did that once. It was toast.
  • sylvie369sylvie369 Posts: 1,622
    edited 2010-07-20 12:09
    Oh, I've seen exactly that kind of garbage on the XCTU terminal screen quite a few times from XBees that were just fine. It probably means a mismatch in baud rate or related settings.

    Is the garbage correlated with transmissions from the other XBee? That is, does it start and stop as you start and stop the·transmitting XBee?

    Can you communicate with each of the XBees through XCTU when they're directly connected to your computer?
    What are your settings (MY, DL, PANID, etc.)?
Sign In or Register to comment.