BGS2T AT Command Set
1.9 Serial Interface Flow Control
BGS2T_ATC_V01.301
Page 31 of 554
1/31/12
c
1.9
Serial Interface Flow Control
Flow control is essential to prevent loss of data or avoid errors when, in a data or fax call, the sending device is
transferring data faster than the receiving side is ready to accept. When the receiving buffer reaches its capacity,
the receiving device should be capable to cause the sending device to pause until it catches up.
There are basically two approaches to regulate data flow: Software flow control and hardware flow control. The
High Watermark (HWM) of the input/output buffer should be set to approximately 60% of the total buffer size, the
Low Watermark (LWM) is recommended to be about 30%. The data flow should be stopped when the buffer
capacity rises close to the High Watermark and resumed when it drops below the Low Watermark. The time
required to cause stop and go results in a hysteresis between the High and Low Watermarks.
1.9.1
Software Flow Control (XON/OFF Handshake)
Software flow control can be used to control the data flow in both directions, from Customer Application to BGS2T
and vice versa, i.e. ME to TE. Software flow control uses different characters to stop (XOFF, decimal 19) and
resume (XON, decimal 17) data flow. Hence, all data that represent XON or XOFF characters will be interpreted
as control characters. This applies also to characters included within the data stream to be transmitted (usually
plain ASCII text files do not inlude such characters). The only advantage of software flow control is that three
wires would be sufficient on the serial interface.
1.9.2
Hardware Flow Control (RTS/CTS Handshake)
Hardware flow control sets or resets the RTS/CTS wires. This approach is faster and more reliable, and there-
fore, the better choice. When the HWM is reached, CTS is set inactive. When the LWM is passed, CTS goes
active again. To achieve smooth data flow, ensure that the RTS/CTS lines are present on your application plat-
form.
Configuring hardware flow control
•
Hardware flow control must be set on both sides: with
3 in the ME and an equivalent RTS/CTS hand-
shake option in the host application.
•
The default setting of the ME is
0 (no flow control) which must be altered to
3 (RTS/CTS hardware
handshake on). The setting is stored volatile and must be restored each time after rebooting the ME.
•
has no read command. To verify the current setting of
, simply check the settings of the active
.
•
Often, fax programs run an initialization procedure when started up. The initialization commonly includes
enabling RTS/CTS hardware handshake, eliminating the need to set
3 once again. However, before set-
ting up a CSD call, you are advised to check that RTS/CTS handshake is set.
Buffer design considerations
•
After deactivating the RTS line, the ME may still send up to 264 bytes (worst case). This can be easily handled
if the buffer of the host application is sufficiently sized, and if a hysteresis is implemented regarding its Rx
buffer. For host applications that are required to handle a large amount of data at high speed, a total buffer
capacity of 512 bytes is recommended.
Confidential / Released