Shop OBEX P1 Docs P2 Docs Learn Events
configuring XBEE with prop — Parallax Forums

configuring XBEE with prop

LightfootLightfoot Posts: 228
edited 2010-05-31 19:04 in Propeller 1
I am trying to change the channel of an XBEE module using serial transmissions. I know this is possible but it does not seem to be entering into config mode with my code (it just transmits the plus signs to the receiver).

SERRF.STR(string("+++", 13))                          '+++ puts the XBEE into config mode but it does not.
SERRF.STR(string("CH", $C, 13, "ACTN", 13))    'These commands should change the channel.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Comments

  • TimmooreTimmoore Posts: 1,031
    edited 2010-05-31 18:29
    Its been a while since I have used a xbee but if I remember correctly delays are needed either side of the +++.
    I think there is a xbee object on obex why not check that for what happens with +++
  • Sal AmmoniacSal Ammoniac Posts: 213
    edited 2010-05-31 18:37
    You need a three second guard time on either side of the "+++" in the XBee's default mode.
  • Jay B. HarlowJay B. Harlow Posts: 79
    edited 2010-05-31 18:48
    Lightfoot said...
    I am trying to change the channel of an XBEE module using serial transmissions. I know this is possible but it does not seem to be entering into config mode with my code (it just transmits the plus signs to the receiver).

    SERRF.STR(string("+++", 13))                          '+++ puts the XBEE into config mode but it does not.
    SERRF.STR(string("CH", $C, 13, "ACTN", 13))    'These commands should change the channel.
    
    

    In addition to the other comments take a look at the XBee_Object object.

    http://obex.parallax.com/objects/146/

    As it encapsulates the delay around the "+++".
    Example code for starting:
    ' **************************
    OBJ 
        XB : "XBee_Object"       
    Pub Start
        XB.start(7,6,0,9600)           ' XBee Comms - RX,TX, Mode, Baud
        XB.AT_Init                     ' Initialize for fast AT command use - 5 second delay to perform
        XB.AT_ConfigVal(string("ATMY"),$5) ' Set MY address to 5
        .
        .
     
    

    Note you need to send just "+++" with the proper guard times before & after it. Your sample is sending +++ plus a carriage return.

    Hope this helps
    Jay
  • w8anw8an Posts: 176
    edited 2010-05-31 19:04
    Beside the aforementioned guard times, take out the carriage return character after the "+++" as this will spoil the config mode command

    .Steve
Sign In or Register to comment.