device mti0 at vme16d16 ? csr 0x620 flags 0xffff priority 4 vector mtiintr 0x88 device mti1 at vme16d16 ? csr 0x640 flags 0xffff priority 4 vector mtiintr 0x89 device mti2 at vme16d16 ? csr 0x660 flags 0xffff priority 4 vector mtiintr 0x8a device mti3 at vme16d16 ? csr 0x680 flags 0xffff priority 4 vector mtiintr 0x8b
#include <fcntl.h> #include <sys/termios.h> open("/dev/ttyxy", mode); open("/dev/ttydn", mode); open("/dev/cuan", mode);
The Systech MTI card provides 8 (MTI-800) or 16 (MTI-1600) serial communication lines with modem control. Each port supports those termio.4 device control functions specified by flags in the c_cflag word of the termios structure and by the IGNBRK, IGNPAR, PARMRK, or INPCK flags in the c_iflag word of the termios structure are performed by the mti driver. All other termio.4 functions must be performed by STREAMS modules pushed on top of the driver; when a device is opened, the ldterm.4m and ttcompat.4m STREAMS modules are automatically pushed on top of the stream, providing the standard termio.4 interface.
Bit i of flags may be specified to say that a line is not properly connected, and that the line i should be treated as hard-wired with carrier always present. Thus specifying flags 0x0004 in the specification of mti0 would treat line /dev/tty02 in this way.
Minor device numbers in the range 0 - 63 correspond directly to the normal tty lines and are named /dev/ttyXY, where X is the physical board number (0 - 3), and Y is the line number on the board as a single hexadecimal digit. Thus the first line on the first board is /dev/tty00, and the sixteenth line on the third board is /dev/tty2f.
To allow a single tty line to be connected to a modem and used for both incoming and outgoing calls, a special feature, controlled by the minor device number, has been added. Minor device numbers in the range 128 - 191 correspond to the same physical lines as those above (that is, the same line as the minor device number minus 128).
A dial-in line has a minor device in the range 0 - 63 and is conventionally renamed /dev/ttydn, where n is a number indicating which dial-in line it is (so that /dev/ttyd0 is the first dial-in line), and the dial-out line corresponding to that dial-in line has a minor device number 128 greater than the minor device number of the dial-in line and is conventionally named /dev/cuan, where n is the number of the dial-in line.
lines are special in that they can be opened even when
there is no carrier on the line.
line is opened, the corresponding tty line can not be
opened until the
line is closed; a blocking open will wait until the
line is closed (which will drop Data Terminal Ready,
after which Carrier Detect will usually drop as well)
and carrier is detected again, and a non-blocking
open will return an error.
Also, if the
line has been opened successfully (usually only
when carrier is recognized on the modem) the corresponding
line can not be opened.
This allows a modem to be attached to for example,
and used for dial-in (by enabling the line for
and also used for dial-out (by
when no one is logged in on
Note: the bit in the
word in the configuration file (see above) must be zero
for this line,
which enables hardware carrier detection.
The state of the CRTSCTS flag in the c_cflag word has no effect; no output will be generated unless CTS is high. Breaks can be generated by the TCSBRK, TIOCSBRK, and TIOCCBRK ioctl() calls. The modem control lines TIOCM_CAR, TIOCM_CTS, TIOCM_RTS, and TIOCM_DTR are provided; however, as described above, the DSR line is treated as CD and the CD line is ignored.
The input and output line speeds may be set to any of the speeds supported by termio. The speeds cannot be set independently; when the output speed is set, the input speed is set to the same speed. The baud rates B200 and B38400 are not supported by the hardware; B200 selects 2000 baud, and B38400 selects 7200 baud.
An open() will fail if:
Most of these diagnostics ``should never happen'' and their occurrence usually indicates problems elsewhere in the system.
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97