Original translation to: http://www.cyberciti.biz/faq/find-out-linux-serial-ports-with-setserial/
How do I check and configure the serial port for various purposes (such as a modem, connecting an empty module, or connecting to a dumb terminal) under Linux?
Linux offers a variety of tools. Linux uses Ttysx as the name of a serial device. For example, COM1 (dos/windows name) is ttyS0, COM2 is ttyS1 and so on.
Task: Display the detected system serial port support
Simply run the DMESG command
$ dmesg | grep tty
Output:
[ 37.531286] serial8250:ttys0 at I/o 0x3f8 (IRQ = 4) is a 16550a[ 37.531841] 00:0b:ttys0 at I/o 0x3f8 (IRQ = 4) is a 16550a[ 37.532138] 0000:04:00.3:ttys1 at I/o 0x1020 (IRQ = 16550A) is a
setserial command
Setserial is a program used to set and/or report configuration information associated with a serial port. This information includes the I/O port and interrupt number used by the serial port, and whether the break key should be interpreted as secure Attention key, and so on. Just output the following command:
$ setserial -g /dev/ttyS[0123]
Output:
/DEV/TTYS0, uart:16550a, Port:0x03f8, Irq:4/dev/ttys1, uart:16550a, port:0x1020, Irq:18/dev/ttys2, Uart:unknown, Po Rt:0x03e8, Irq:4/dev/ttys3, Uart:unknown, Port:0x02e8, Irq:3
The setserial with the-G option helps find the physical serial port on your Linux board.
Linux Serial Console Program
Once the serial port is identified, you can use a number of tools to configure the Linux board:
- minicom-The best serial communication program for controlling the modem and connecting to the dump device.
- wvidial or other GUI dial Up Networking program-a built-in smart PPP dialer.
- Getty/agetty -Agetty opens a TTY port, prompts for the login name and invokes the/bin/login command.
- Grub/lilo Configuration-Configuring the serial port for the system console