two-way communication through the same port under SunOs 4.0

Guy Harris auspex!guy at uunet.uu.net
Sat Dec 10 06:41:10 AEST 1988


>According to my SunOs 4.0 manuals, as of this release you're supposed to
>be able to run a getty on ttya to enable logins, and simultaneously hook
>an outgoing modem onto the same hardware port, calling it /dev/cua0.

As of 4.0?  The dialin/dialout feature's been around since 3.x, for some
value of "x" (perhaps 0), and possibly before that.

>Whichever application (login or, eg, tip) grabs the port first is supposed
>to lock it to other applications.  I've tried this, and I think I have all
>my gettytab, ttytab and /etc/remote entries correct, but the getty on ttya
>(or ttyd0, or ttym0, no matter how I try it) renders /dev/cua0 busy for
>outgoing calls.  According to my manual, this isn't supposed to happen.

It works here.  The name doesn't matter; you can call it "ttya", or
"ttyd0", or "myrtle".

What matters is the minor device number; "/dev/cua0" and "/dev/ttyd0" have
to have different minor device numbers.  If "/dev/ttyd0" is serial port A,
it should have the minor device 0, and if it's serial port B, it should
have the minor device 1.  "/dev/cua0" should have a minor device number of
128 plus the minor device number of "/dev/ttyd0".

I think you *do* have to reconfigure the kernel to turn "soft carrier" off
for that port - or, on the '386i, perhaps change "/etc/ttytab" to specify
that soft carrier is not to be enabled (the ability to control "soft
carrier" with an "ioctl", and a command to do so under the control of
"/etc/ttytab", was supposed to go into the '386i release, and will be in a
future release for all Suns).



More information about the Comp.sys.sun mailing list