modem.7 (2010 09)

m
modem(7) modem(7)
Each ioctl() passes an integer argument in which each of the following bit definitions correspond to
one of the modem lines as follows:
TIOCM_RTS Request to Send outbound
TIOCM_CTS Clear to Send inbound
TIOCM_DSR Data Set Ready inbound
TIOCM_CAR Data Carrier Detect inbound
TIOCM_DTR Data Terminal Ready outbound
TIOCM_RNG Ring Indicator inbound
Additionally,
TIOCM_CD is equivalent to TIOCM_CAR, and TIOCM_RI is equivalent to TIOCM_RNG
.
The modem line
ioctl() system calls have the form:
int ioctl(int fildes, int command
, int *arg);
The commands using this form are:
TIOCMGET Get the current state of both inbound and outbound modem lines and store in the int
referenced by arg. A raised line will be indicated by a one bit in the appropriate posi-
tion.
TIOCMSET Set the outbound modem lines from the int referenced by
arg.
TIOCMBIS Raise the control lines specified by a one in the corresponding bit positions of the int
referenced by arg.
TIOCMBIC Lower the control lines specified by a one in the corresponding bit positions of the int
referenced by arg.
Note that setting bits for inbound lines has no effect, and setting any bits while in CCITT mode has no
effect. Also, the change to the modem lines is immediate and using these ioctl’s while characters are still
being output may cause unpredictable results.
WARNINGS
Occasionally it is possible that a process may open a call-out file at approximately the same time as an
incoming call is received. In some cases, the call-out connection may be satisfied by the incoming call. In
general, however, the results are indeterminate. If necessary, the situation can be avoided by the use of
two modems and ports, one for call-out connections and the other for receiving incoming calls.
DEPENDENCIES
Some hardware implementations may not have access to all modem lines supported by MCSETA. If a
particular hardware does not support a given line, attempts to set the value of a line will be ignored, and
reading the current state of the line will return zero. The appropriate I/O card manual should be refer-
enced to determine the lines supported by the hardware installed.
Some hardware implementations may not have access to all timers supported by MCSETT. Also, the
granularity of the individual timers may vary depending on the hardware and system in use. The effect
of setting a timer out of range or with a granularity outside the capability of a particular system should
be documented by that system. The effect of changing the value for a timer while that timer is running is
system dependent and should be documented by each system.
Setting the
CLOCAL bit while a timer is running will cause the timer to be stopped. It is a system depen-
dency whether or not the timer is restarted, and if so, the value at which it is restarted when the CLOCAL
bit is subsequently cleared.
On those implementations supporting the HP27140A 6-Channel Multiplexer, transmission of characters
cannot be stopped during loss of DCD. The driver cannot detect loss of DCD until the connection is bro-
ken. Also, the I/O card may still have characters in its internal buffers and will still try to transmit them.
AUTHOR
modem was developed by HP and AT&T.
FILES
/dev/cua*
/dev/cul*
/dev/tty*
/dev/ttyd*
HP-UX 11i Version 3: September 2010 5 Hewlett-Packard Company 5