Hardware manual
9.2 Flow Control
Configuring Flow Control: Hardware Flow Control is Usually Best See Flow Control for an explanation of it.
It's usually better to use hardware flow control rather than software flow control using Xon/Xoff. To use full
hardware flow control you must normally have two dedicated wires for it in the cable between the serial port
and the device. If the device is on a card or the motherboard, then it should always be possible to use
hardware flow control.
Many applications (and the getty program) give you an option regarding flow control and will set it as you
specify or it might enable hardware flow control by default if you don't set it. It must be set both in the serial
driver and in the hardware connected to the serial port. How it's set into this hardware is hardware dependent.
Sometimes there is a certain "init string" you send to the hardware device via the serial port from your PC. For
a modem, the communication program should set it in both places.
If a program you use doesn't set flow control in the serial driver, then you may do it yourself using the stty
command. Since the driver doesn't remember the setting after you stop Linux, you could put the stty command
in a file that runs at start-up or when you login (such as /etc/profile for the bash shell). Here's what you would
add for hardware flow control for port ttyS2:
stty -F /dev/ttyS2 crtscts
or for old stty versions < 1.17:
stty crtscts < /dev/ttyS2
crtscts stands for a Control setting to use the RTS and CTS pins of the serial port for hardware flow
control. Note that RTS+CTS almost spells: crtscts and the initial "c" means "control".
10. Serial Port Devices /dev/ttyS2, etc.
10.1 Serial Port Names: ttyS4, etc
Common serial port names are /dev/ttyS0, /dev/ttyS1, etc. Then around the year 2000 came the USB bus with
names like /dev/ttyUSB0 and /dev/ttyACM1 (for the ACM modem on the USB bus). Multiport serial card
used somewhat differnt names (depending on the brand) such as /dev/ttyE5.
10.2 The PCI Bus
Since DOS provided for 4 serial ports on the old ISA bus: COM1-COM4, or ttyS0-ttyS3 in Linux, most serial
ports on the newer PCI bus used higher numbers such as ttyS4 or ttyS14 (prior to kernel 2.6.13). But since
most PCs only came with one or two serial ports, ttyS0 and possibly ttyS1 (for the second port) the PCI bus
can now use ttyS2 (kernel 2.6.15 on). All this permits one to have both ISA serial ports and PCI serial ports
on the same PC with no name conflicts. 0-1 (or 0-3) are reserved for the old ISA bus (or the newer LPC bus)
and 2-upward (or 4-upward or 14-upward) are used for PCI, where older schemes are shown in parentheses .
It's not required to be this way but it often is.
If you're using udev (which puts only the device you have on your computer into the /dev directory at
boottime) then there's an easy way to change the device names by editing files in /etc/udev/. For example, to
change the name of what the kernel detects as ttyS3 to what you want to name it: ttyS14, add a line similar to
Serial HOWTO
9.2 Flow Control 37