setserial – get/set Linux serial port information
setserial [ -abqvVWz ] device [ parameter1 [ arg ] ] …
setserial -g [ -abGv ] device1 …
setserial is a program designed to set and/or report the configuration information associated with a serial port. This information includes what I/O port and IRQ a particular serial port is using, and whether or not the break key should be interpreted as the Secure Attention Key, and so on.
During the normal bootup process, only COM ports 1-4 are initialized, using the default I/O ports and IRQ values, as listed below. In order to initialize any additional serial ports, or to change the COM 1-4 ports to a nonstadard configuration, the setserial program should be used. Typically it is called from an rc.serial script, which is usually run out of /etc/rc.local.
The device argument or arguments specifies the serial device which should be configured or interrogated. It will usually have the following form: /dev/cua[0-3].
If no parameters are specified, setserial will print out the port type (i.e., 8250, 16450, 16550, 16550A, etc.), the hardware I/O port, the hardware IRQ line, its “baud base,” and some of its operational flags.
If the -g option is given, the arguments to setserial are interpreted as a list of devices for which the characteristics of those devices should be printed.
Without the -g option, the first argument to setserial is interpreted as the device to be modified or characteristics to be printed, and any additional arguments are interpreted as parameters which should be assigned to that serial device.
For the most part, superuser privilege is required to set the configuration parameters of a serial port. A few serial port parameters can be set by normal users, however, and these will be noted as exceptions in this manual page