contents
Next: Accessing Serial Devices Up: Setting up the Serial Previous: Communication Software for Modem

Introduction to Serial Devices

The devices a kernel provides for accessing serial devices are typically called ttys. This is an abbreviation for Teletype, which used to be one of the major manufacturers of terminals in the early days of Unix. The term is used nowadays for any character-based data terminal. Throughout this chapter, we will use the term exclusively to refer to kernel devices.

distinguishes three classes of ttys: (virtual) consoles, pseudo-terminals (similar to a two-way pipe, used by application such as X11), and serial devices. The latter are also counted as ttys, because they permit interactive sessions over a serial connection; be it from a hard-wired terminal or a remote computer over a telephone line.

Ttys have a number of configurable parameters which can be set using the ioctl(2) system call. Many of them apply only to serial devices, since they need a great deal more flexibility to handle varying types of connections.

Among the most prominent line parameters are the line speed and parity. But there are also flags for the conversion between upper and lower case characters, of carriage return into line feed, etc. The tty driver may also support various line disciplines which make the device driver behave completely different. For example, the SLIP driver for is implemented by means of a special line discipline.

There is a bit of ambiguity about how to measure a line's speed. The correct the term is Bit rate, which is related to the line's transfer speed measured in bits per second (or bps for short). Sometimes, you hear people refer to it as the Baud rate, which is not quite correct. These two terms are, however, not interchangeable. The Baud rate refers to a physical characteristic of some serial device, namely the clock rate at which pulses are transmitted. The bit rate rather denotes a current state of an existing serial connection between two points, namely the average number of bits transferred per second. It is important to know that these two values are usually different, as most devices encode more than one bit per electrical pulse.


contents
Next: Accessing Serial Devices Up: Setting up the Serial Previous: Communication Software for Modem

Andrew Anderson
Thu Mar 7 23:22:06 EST 1996

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:57:42