To know which are all the serial ports detected and available we can
execute the below command.
dmesg | grep tty
and the possible response is:
console [tty0] enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:09: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0a: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
The dmesg command is used to write the kernel messages to standard output(which by default is the display screen).
We can also write the output into a file let us say ttyInfo.log.
For this we need to modify the above command as below
dmesg | grep tty >> ttyInfo.log
No comments:
Post a Comment