Modes
Serial modes
XBee Wi-Fi RF Module User Guide
43
Serial modes
The firmware operates in several different modes. Two top-level modes establish how the device
communicates with other devices through its serial interface: Transparent operating mode and API
operating mode. Use the
AP
command to choose Serial mode. XBee Wi-Fi RF Modules use Transparent
operation as the default serial mode.
The following modes describe how the serial port sends and receives data.
Transparent operating mode
Devices operate in this mode by default. The device acts as a serial line replacement when it is in
Transparent operating mode. The device queues all UART data it receives through the DIN pin for RF
transmission. When a device receives RF data, it sends the data out through the DOUT pin. You can set
the configuration parameters using Command mode.
Note
Transparent operating mode is not available when using the SPI interface; see
Serial-to-RF packetization
The device buffers data in the serial receive buffer until one of the following causes the data to be
packetized and transmitted:
n
The device receives no serial characters for the amount of time determined by the
RO
(Packetization Timeout) parameter. If
RO
= 0, packetization begins when a character is
received. If
RO
is non-zero, the data is packetized after
RO
character times of no transitions on
the DIN pin. However, if the time required for
RO
characters is less than 100 microseconds,
then DIN must still be idle for at least 100 microseconds, which is the minimal idle time
required for packetizing packets at any baud rate.
n
The device receives the Command Mode Sequence (
GT
+
CC
+
GT
). Any character buffered in
the serial receive buffer before the sequence is transmitted.
n
The device receives the maximum number of characters that fits in an RF packet (100 bytes).
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
.
Comparing Transparent and API modes
The following table compares the advantages of transparent and API modes of operation: