DistributedNetworks DistributedNetworks


Serial Networking Devices  «Prev  Next»
Lesson 3Administering serial ports
ObjectiveConfigure and use Serial Ports

Administering Serial Ports

Serial ports provide the interface between serial devices and the computer's I/O subsystem. On the Intel x86 architecture, there are usually two built-in serial ports. These normally correspond to /dev/ttyS0 and /dev/ttyS1, which are COM1 and COM2 under DOS and Windows. During system boot, Linux initializes these and two other ports: /dev/ttyS2 and /dev/ttyS3.
The setserial command provides a method for configuring and examining the characteristics for a vast range of serial devices, including modems, mice, and serial terminals. The setserial command enables you to set data speed, the I/O port address, flow control, and other variables for each initialized serial port. It also enables you to define additional serial ports and to query the settings of existing ports.

For example, setserial /dev/ttyS0 produces something similar to the following output:

Set Serial Administration
  1. Device being queried or set
  2. Universal Asynchronous Receiver Transmitter converts signal voltage to computer voltage and converts asynchronous input to synchronous output.
  3. The logical address for the serial port
  4. The interrupt channel given exclusively to this serial port
Serial Ports: No serial ports are assigned by default. You can assign any of the serial ports ($_com1 to $_com4) to a device such as a modem (/dev/modem), a mouse (/dev/mouse), or a terminal line (/dev/tty0).
Set serial linux command
In the next lesson, the roles serial modems play in the Linux OS will be defined.