![Digi XBee DigiMesh 2.4 User Manual Download Page 35](http://html1.mh-extra.com/html/digi/xbee-digimesh-2-4/xbee-digimesh-2-4_user-manual_2496252035.webp)
Serial communication
Serial buffers
XBee/XBee-PRO DigiMesh 2.4 RF Module User Guide
35
Serial buffers
The XBee/XBee-PRO DigiMesh 2.4 maintains internal buffers to collect serial and RF data that it
receives. The serial receive buffer collects incoming serial characters and holds them until the device
can process them. The serial transmit buffer collects the data it receives via the RF link until it
transmits that data out the serial port. The following figure shows the process of device buffers
collecting received serial data.
Serial buffer issues
There are potential overflow and dropped packet issues, which the following section describes.
Serial receive buffer
Under certain conditions, the device may not be able to process data in the serial receive buffer
immediately. If a host sends large amounts of serial data to the device, the device may require CTS
flow control to avoid overflowing the serial receive buffer.
Cases in which the serial receive buffer may become full and possibly overflow:
1. If the device receives a continuous stream of RF data, it does not transmit the data in the
serial receive buffer until the device stops receiving RF data.
2. For mesh networking firmware, if the device transmits an RF data packet, the device may need
to discover the destination address or establish a route to the destination. After transmitting
the data, the device may need to retransmit the data if it does not receive an
acknowledgment, or if the transmission is a broadcast. These issues could delay the processing
of data in the serial receive buffer.
Serial transmit buffer
If the serial transmit buffer becomes full enough that all of the data in a received RF packet will not fit
in the serial transmit buffer, it drops the entire RF data packet.
Cases in which the serial transmit buffer may become full, resulting in dropped RF packets:
1. If the RF data rate is set higher than the interface data rate of the device, the device may
receive data faster than it can send the data to the host. Even occasional transmissions from a
large number of devices can quickly accumulate and overflow the transmit buffer.
2. If the host does not allow the device to transmit data out from the serial transmit buffer due to
being held off by hardware flow control.