© 2014 Digi International Inc. 20
XBee/XBee-PRO
®
DigiMesh 2.4 User Manual
XBee Serial Flow Control
The RTS and CTS module pins provide RTS and/or CTS flow control. CTS flow control provides an
indication to the host to stop sending serial data to the module. RTS
flow control allows the host
to signal the module to not send data in the serial transmit buffer out the UART. RTS
and CTS
flow control are enabled using the D6 and D7 commands.
CTS Flow Control
If you enable the CTS flow control is enabled (D7 command) when the serial receive buffer is
filled with FT bytes, the module de-asserts CTS
(sets it high) to signal to the host device to stop
sending serial data. CTS
is re-asserted when less than FT-16 bytes are in the UART receive
buffer. (See command description for the FT command.)
RTS Flow Control
If you enable RTS flow control is enabled (D6 command), data in the serial transmit buffer will
not be sent out the DOUT pin as long as RTS
is de-asserted (set high). Do not de-assert RTS for
long periods of time to avoid filling the serial transmit buffer. If an RF data packet is received,
and the serial transmit buffer does not have enough space for all of the data bytes, the entire RF
data packet will be discarded.
XBee Serial Interface Protocols
The XBee modules support both transparent and API (Application Programming Interface) serial
interfaces.
Transparent Operation
When a module operates in transparent mode, it acts as a serial line replacement. All UART data
received through the DIN pin is queued up for RF transmission. When a module receives RF
data, it sends the data out through the DOUT pin. You can set the configuration parameters
using the AT command mode interface.
Data is buffered in the serial receive buffer until one of the following causes the data to be
packetized and transmitted:
• No serial characters are received for the amount of time determined by the RO (Packetization
Timeout) parameter. If RO = 0, packetization begins when a character is received.
• The module receives the Command Mode Sequence (GT + CC + GT). If any characters were
placed in the serial receive buffer before the sequence, they are transmitted.
• The module receives the maximum number of characters that will fit in an RF packet.
API Operation
API operation is an alternative to transparent operation. The frame-based API extends the level
to which a host application can interact with the networking capabilities of the module. When
you operate the device in API mode, all data entering and leaving the UART is contained in
frames that define operations or events within the module.