The Ready To Send (RTS) and Clear To Send (CTS) lines for the RS-232 serial interface were originally intended as handshaking signals between a DTE device (computer, printer, and so forth) and a DCE device (almost always a modem). This section describes unidirectional handshaking between two DTE devices: a computer and a printer. The computer asserts its RTS (Ready To Send) line when it is ready to send data to the printer. The printer asserts its RTS when it was ready to receive data.
If the printer's input buffer is nearly full, it lowers its RTS line (connected to the computer's CTS (Clear To Send) line). If the computer sees CTS go low, it stops sending data until it goes high again when the printer has caught up.
Some printers use the DTR (Data Terminal Ready) line for handshaking rather than RTS or CTS. For these devices, the cable must be wired to connect the printer's DTR pin to the computer's CTS pin -- see ``DTR handshaking for 25-pin connector''.
To set up for RTS/CTS handshaking:
For a device that uses the DTR line for handshaking, wire the cable as shown in ``DTR handshaking for 25-pin connector''.
For equivalent 9-pin connections, see the serial(HW) manual page.
RTS/CTS handshaking for 25-pin connector
DTR handshaking for 25-pin connector
To enable unidirectional hardware flow control using DTR handshaking, make sure the stty(C) settings on the port include -ixon -ixoff -clocal -ortsfl -rtsflow ctsflow. This form of unidirectional flow control stops transmission when CTS sees the printer drop DTR.
To enable the stty settings when the system goes to
multiuser mode, place the appropriate command
in the file /etc/rc2 or /etc/rc2.d/P88USRDEFINE:
stty stty_settings < /dev/ttynn