sduart(7) (RM400 only) sduart(7)
NAME
sduart - general serial interface
DESCRIPTION
The RM400 contains on board two serial controllers (SCN2681 and
VL16C552). Each controller has two physical channels. The channels are
connected to seven logical devices. The logical devices are accessed
through special files in the /dev/term directory.
At the moment, all serial devices controlled by the sduart driver
automatically push the modules ldterm(7) and ttcompat(7)
(/etc/ap/cons.ap).
The following logical devices are supported:
2681 - PORT A
Physical channel:
2681 - port A
Logical device: /dev/term/00 or /dev/constty
Major device number:
128
Minor device number:
0
This logical device only knows the transmitter and receiver data
lines. Normally, it can be used as a console, but any serial device
can also be controlled over this channel.
2681 - PORT B
The "2681 - Port B" channel only accepts one link to a logical chan-
nel. An opening to other logical channels will be immediately refused
(ONONBLOCK=1) or will remain dormant until the existing link to a
second logical device breaks (close).
/dev/term/01
Physical channel:
2681 - port B (modem port)
Logical device: /dev/term/01
Major device number:
128
Minor device number:
1
Page 1 Reliant UNIX 5.44 Printed 11/98
sduart(7) (RM400 only) sduart(7)
This channel has not got any restrictions and can be programmed
like a normal tty.
The channel only considers one modem signal (M5, DCD).
Page 2 Reliant UNIX 5.44 Printed 11/98
sduart(7) (RM400 only) sduart(7)
/dev/term/02
Physical channel:
2681 - port B (modem port)
Logical device: /dev/term/02
Major device number:
128
Minor device number:
2
This logical channel must be used for DIAL IN (remote login).
Before it can be used, ttymon must be started on this device
(login).
An opening to this device will block until the modem signals M1
(DSR) and M5 (DCD) are activated.
/dev/term/03
Physical channel:
2681 - port B (modem port)
Logical device: /dev/term/03
Major device number:
128
Minor device number:
3
This logical device must be used for DIAL OUT (cu, uucp, etc).
An opening to this device will be successful without considering
the modem signals M1 (DSR) and M5 (DCD). This device only accepts
one opening at a time.
/dev/term/04
Physical channel:
2681 - port B (modem port)
Logical device: /dev/term/04
Major device number:
128
Minor device number:
4
Page 3 Reliant UNIX 5.44 Printed 11/98
sduart(7) (RM400 only) sduart(7)
This logical device can be used for TELESERVICE or other ser-
vices; the opening considers all modem signals set under the
NVRAM address 0xbd000035 (byte access).
0x01: M5 (DCD)
0x02: M2 (CTS)
0x04: M1 (DSR)
0x10: M3 (CE)
Page 4 Reliant UNIX 5.44 Printed 11/98
sduart(7) (RM400 only) sduart(7)
16552 - PORT 0
Physical channel:
16C552 - Port 0
Logical device: /dev/term/05
Major device number:
128
Minor device number:
5
This channel has not got any restrictions and can be programmed like a
normal tty.
The control of the modem signals M1, M2, M5 and M3 can be set/reset
under the NVRAM address 0xbd000038 (byte access).
0x01: M5 (DCD)
0x02: M2 (CTS)
0x04: M1 (DSR)
0x10: M3 (CE)
16552 - PORT 1
Physical channel:
16C552 - Port 1
Logical device: /dev/term/06
Major device number:
128
Minor device number:
6
This channel has not got any restrictions and can be programmed like a
normal tty.
The control of the modem signals M1, M2, M5 and M3 can be set/reset
under the NVRAM address 0xbd000039 (byte access).
0x01: M5 (DCD)
0x02: M2 (CTS)
0x04: M1 (DSR)
Page 5 Reliant UNIX 5.44 Printed 11/98
sduart(7) (RM400 only) sduart(7)
0x10: M3 (CE)
IOCTL
The sduart driver supports the usual ioctls for a tty. Additionally,
the driver gets the following ioctls with the form:
ioctl (fd, ISTR, &arg)
int fd
struct strioctl arg
Page 6 Reliant UNIX 5.44 Printed 11/98
sduart(7) (RM400 only) sduart(7)
The structure strioctl is defined in <stropts.h> and has to be filled
in the following form:
iccmd = ioctl request (TIOCMODS, TIOCMODG, TIOCMGET)
ictimout = 0
iclen = sizeof(int modemflags)
icdp = (char *)&modemflags
modemflags
0x00000001: Modem signal M1 (DSR)
0x00000002: Modem signal M2 (CTS)
0x00000004: Modem signal M5 (DCD)
0x00000008: Modem signal M3 (CE)
TIOCMODS
Sets the modem signals to be controlled by the driver (M1, M2,
M3, M5) into modemflags.
TIOCMODG
Gets the currently modem signals to be controlled by the driver.
The driver sets the signals (flags) into modemflags.
TIOCMGET
The driver sets the current state of the modem signals into
modemflags and returns the state to the user.
FILES
/dev/term/00 or /dev/constty
/dev/term/01
/dev/term/02
/dev/term/03
/dev/term/04
/dev/term/05
/dev/term/06
/dev/console
/etc/ap/cons.ap
SEE ALSO
ldterm(7), termio(7), ttcompat(7).
Programmer's Guide: STREAMS.
Page 7 Reliant UNIX 5.44 Printed 11/98