Modemsand flow control
XFAX- User’s Guide 4.3a 35
13. Modems and flow control
When sending a fax the speedover the line is generally9 600 bps (bits per sec-
ond) or atbest 14 400 bps. However, the transmission speed between computer
and modemis always 19 200 bps in accordance with the specifications which
apply forClass 2 compatible fax modems. This means that the modem has to
receivedata at a quicker rate from the computer than it manages to send in on to
the recipient. As a result the modem must b e able to stop the flow when its buffer
isfull so that the computer stops sending for a while until the modem has cleared
the backlogof data it holds. It is this control of the data flow that is logically
calledflow control. There are two dominating variants of flow control today:
CTS/RTS,hardware flow control, and XON/XOFF, software flow control.
CTS/RTSfunctions for communication from computer to modem so that the
modem,when it can receive data, raises the signal CTS (Clear ToSend) which is
situatedon pin 5 in a serial 25 pole port. When the buffer is full the modem
reduces the signal and the computer detects this and takes a res t. This means that
the driveroutines for serial communication in the computer must be able to
detectand handle these signals in the correct way. This is not always the case,
particularlyin older machines. However, where there is support for this typeof
flow controlit is very efficient. It is quick and reliable even for communication
at high speeds.
Variantnumber two, XON/XOFF, is based on another principle.For this two
ASCII charactersXON (hex 0x13) and XOFF (hex 0x11)are chosen as control
characters and these are used to control th e data flow.W hen transmitting from
computerto modem, the modem sends the character XOFF to show that the
bufferis, or is close to becoming, full. The software in the computer receives the
characterand stops sending data until the modem sends the character XON when
itis ready to receive more data. This method does not really demand anything of
the operativesystem, since support for XON/XOFF is generally built into the
driveroutines to the serial card. The disadvantage is that any waste matteron the
connectioncan be interpreted as a control character and communication then
gets caughtup. Problems can also arise if the XOFF character does not arrive at
the applicationbefore it has managed to send so much data that the buffer over-
flows. Itis often possible to set the threshold levels for XON and XOFF in the
modem and therebycontrol at what level the modem should send off the XOFF
and XON characters.
The conclusionis that CTS/RTS is to be preferred, but this is not always sup-
portedby the operative system. XON/OFF is simple and easier to get to function
satisfactorily.The support for CTS/RTSalso varies from one operative system to
another.On AI X it is often easy to get started. It is also satisfac tory in those cases
where serialcards are used which enable CTS/RTS to be set with stty parame-
ters, e.g. DigiBoard.