Hello all,
I have a simple project where arduino is connected with a Xbee module (AT mode).
what I need to do is change parameters of xbee via arduino. for example let’s say I want to change PAN ID
i have tried following following things but to no avail
Serial.print ("+++");
delay(100); // different values from 10 to 500ms
Serial.println ("ATID 3");
delay(100); // different values from 10 to 500ms
Serial.println("ATWR");
delay(100); // different values from 10 to 500ms
Would highly appreciate if some one could provide me with a working code.
cheers
you can change settings in the XBee on the fly by either
- use the AT commands with the +++ escape. Read about that in their manual. Essentially, via the serial port, you pause 1 second, send +++ with no CR, then wait for the OK. This is like the Hayes modem protocol THen you send one of the many AT commands. Your code lacks the delay before +++ called guard time in the XBee manual.
As I recall, it’s ATID=3. Try it using a PC terminal program and serial port connection.
- Implement the complicated binary API mode for the XBee. This is more flexible if you want to do complicated things. For one, you can send AT commands to a remote radio.
Of course, you know that Digi’s XCTU utility can configure the XBees as you wish.
thank you Stevech. I’ll give it a shot