View Full Version : configuring XBEE with prop
Lightfoot
06-01-2010, 01:23 AM
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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timmoore
06-01-2010, 01:29 AM
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 Ammoniac
06-01-2010, 01:37 AM
You need a three second guard time on either side of the "+++" in the XBee's default mode.
Jay B. Harlow
06-01-2010, 01:48 AM
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
Beside the aforementioned guard times, take out the carriage return character after the "+++" as this will spoil the config mode command
.Steve