|
|
How can I read or set modem signals on a serial port? |
| If your goal is simply to block an open until DCD comes high
(i.e, you're writing a dialer) just open the uppercase device
like /dev/tty1A or /dev/ttyA01.
If your goal is to get hardware flow control to work, look at the man pages for termio(M) and pay attention to the RTSFLOW and CTSFLOW bits.
If your goal is to detect when DCD goes away, use the uppercase
device as described above and be sure that CLOCAL is clear.
This will deliver a SIGHUP to you when DCD drops. Many third party serial boards provide drivers that support the TIOCMGET and TIOCMSET ioctls. Most of the Digi intelligent serial board provide these ioctls.
Gert Doering has modified the FAS serial driver to add support
for the TIOCMGET and TIOCMSET ioctls. This patch can be found at:
ftp://ftp.leo.org/pub/comp/os/unix/networking/mgetty/fas-2.12-TIOCMGET.patch | |
| [Append to This Answer] |
| Previous: |
|
| Next: |
|
| ||||||||