Is there a utility software (or an easy method to do it from shell script) to display a serial port's status — i. e. blinking “RXD”, “TXD”, “DCD”, “DTR”, “DSR”, “RTS”, “CTS”? Particularly, I need to monitor whether “DCD” line is set most of the time and momentarily cleared on some interval. The port doesn't need to be sniffed, it's okay to open it exclusively.
In DOS and Windows world, it's usual for terminal emulator and other modem-related software to display pin status, either in GUI or in console applications. However, I couldn't find an alternative even for Linux (although some say it may be possible to examine /proc/tty/driver/serial
by hand, if it exists), not to mention FreeBSD, which is my actual target. Common tools like cu
and minicom
only display port settings at most, not the status.
cat /proc/tty/driver/ttyAMA
(exists, but unused) outputsserinfo:1.0 driver revision: 0: uart:PL011 rev3 mmio:0x20201000 irq:83 tx:65 rx:0 RTS|CTS|DTR
./proc
to represent actual process information, and it's not even mounted by default. Likewise, FreeBSD doesn't provide/sys
(this path is used for system sources instead). It's becausesysctl
should be used to access corresponding data, but I couldn't find any direct counterpart in it to that would exist in Linux in regard to my question.