AT commands
The purpose of command mode is to read or change the configuration of the local XBee device. Every module has a number of settings, like channel or network ID, that define its behavior. These settings are identified by two characters, for example, CH for channel, and ID for network ID.
When you want to read or set any setting of the XBee module, you must send it an AT command. Every AT command starts with the letters "AT" followed by the two characters that identify the command being issued and then by some optional configuration values.
For example, to read and set the network ID setting:
// Enter command mode +++OK // Read the ID setting ATID <Enter> 0 // Change the ID setting ATID 2015 <Enter> OK
Basic AT commands
- AT
This command checks the connection with the module. This is like asking "Are you there?" and the device replying "Yes." When you send this command, the module simply replies OK. If you don't see an OK in response, you have probably timed out of command mode. Type the +++ to go back into it.
- ATCN
This command explicitly exits the module from command mode. Remember that if you don't type anything for 10 seconds, the device automatically drops out of Command mode.
- ATWR
This command writes the current configuration to non-volatile memory so that it persists the next time the device powers up. Otherwise, parameters are restored to previously saved values after the device is reset.
For additional information about serial communication, go to the legacy XBee/XBee-PRO 802.15.4 RF Module User Guide or the XBee/XBee-PRO S2C 802.15.4 RF Module User Guide.