Modes
Serial modes
API operating mode
Application programming interface (API) operating mode is an alternative to Transparent mode. It is
helpful in managing larger networks and is more appropriate for performing tasks such as collecting
data from multiple locations or controlling multiple devices remotely. API mode is a frame-based
protocol that allows you to direct data on a packet basis. It can be particularly useful in large
networks where you need control over the operation of the radio network or when you need to know
which node a data packet is from. The device communicates UART or SPI data in packets, also known
as API frames. This mode allows for structured communications with serial devices.
For more information, see API mode overview.
Command mode
Command mode is a state in which the firmware interprets incoming characters as commands. It
allows you to modify the device’s configuration using parameters you can set using AT
commands. When you want to read or set any parameter of the XBee/XBee-PRO S2C 802.15.4 RF
Module using this mode, you have to send an AT command. Every AT command starts with the
letters AT followed by the two characters that identify the command and then by some optional
configuration values.
The operating modes of the XBee/XBee-PRO S2C 802.15.4 RF Module are controlled by the AP (API
Enable) setting, but Command mode is always available as a mode the device can enter while
configured for any of the operating modes.
Command mode is available on the UART interface for all operating modes. You cannot use the SPI
interface to enter Command mode.
Enter Command mode
To get a device to switch into Command mode, you must issue the following sequence: +++ within
one second. There must be at least one second preceding and following the +++ sequence. Both the
command character (CC) and the silence before and after the sequence (GT) are configurable. When
the entrance criteria are met the device responds with OK\r on UART signifying that it has entered
Command mode successfully and is ready to start processing AT commands.
If configured to operate in Transparent operating mode, when entering Command mode the
XBee/XBee-PRO S2C 802.15.4 RF Module knows to stop sending data and start accepting commands
locally.
Note Do not press Return or Enter after typing +++ because it interrupts the guard time silence and
prevents you from entering Command mode.
When the device is in Command mode, it listens for user input and is able to receive AT commands on
the UART. If CT time (default is 10 seconds) passes without any user input, the device drops out of
Command mode and returns to the previous operating mode. You can force the device to leave
Command mode by sending CN (Exit Command mode).
You can customize the command character, the guard times and the timeout in the device’s
configuration settings. For more information, see CC (Command Character), CT (Command mode
Timeout) and GT (Guard Times).
Troubleshooting
Failure to enter Command mode is often due to baud rate mismatch. Ensure that the baud rate of the
connection matches the baud rate of the device. By default, BD (Interface Data Rate) = 3 (9600 b/s).
There are two alternative ways to enter Command mode:
XBee/XBee-PRO S2C 802.15.4 RF Module User Guide
34