[comp.sys.ibm.pc.rt] AIX Carrier Detect Problem

kevin@msa3b.UUCP (Kevin P. Kleinfelter) (07/15/89)

Does AIX have a problem with Carrier Detect?

I issue an
	open ("/dev/tty0", O_RDWR, 0);

on a port with "-clocal".
As expected, if CD is active when this call is issued, the call proceeds.

Also, if CD is inactive, the call does not proceed.  However, when CD
goes active, THE CALL STILL DOES NOT PROCEED.

Now I'm not really interested in issuing this call.  Somewhere in 
"getty" a call like this HAS to be issued.  My trouble is that getty
hangs forever if CD is not active when getty is started.

I suspect that it is a problem with the task going to sleep and waiting
on an event and never getting restarted after the event.  Another possibility
is that it gets swapped out, and for some reason it never gets swapped back
in.

I called IBM's AIX support center and got absolutely nowhere!  They referred
me back to my local S.E. (who is NOT proficient in AIX).

Once again, I turn to the net for help.  

Thanks.

P.S.  If you're tired of AIX PS/2 questions in "inappropriate" groups,
you might join in the discussion on news.groups.

-- 
Kevin Kleinfelter @ Management Science America, Inc (404) 239-2347
gatech!nanovx!msa3b!kevin

pim@ctisbv.UUCP (Pim Zandbergen) (07/17/89)

kevin@msa3b.UUCP (Kevin P. Kleinfelter) writes:

>Does AIX have a problem with Carrier Detect?

>I issue an
>	open ("/dev/tty0", O_RDWR, 0);

>on a port with "-clocal".

I have found out that "stty clocal" or "stty -clocal" have no effect in AIX.
You select modem control *once* when you run "devices", afterwards
you cannot change it.

Have fun with this:
Make a device with (without) modem control
type on this device:
$ stty clocal  ($ stty -clocal)
$ stty
$ stty <`tty`

and watch the difference!
-- 
--------------------+----------------------+-----------------------------------
Pim Zandbergen      | phone: +31 70 542302 | CTI Software BV
pim@ctisbv.UUCP     | fax  : +31 70 512837 | Laan Copes van Cattenburch 70
...!uunet!mcvax!hp4nl!ctisbv!pim           | 2585 GD The Hague, The Netherlands

karish@forel.stanford.edu (Chuck Karish) (07/17/89)

In article <786@ctisbv.UUCP> pim@ctisbv.UUCP (Pim Zandbergen) wrote:
>I have found out that "stty clocal" or "stty -clocal" have no effect in AIX.
>You select modem control *once* when you run "devices", afterwards
>you cannot change it.

All `devices' seems to do with these parameters is to edit the
appropriate entry in /etc/ports.  It would seem that parameters not
offered for change in `devices' could be changed there, but this
doesn't work for all of them.  In particular, I've noticed that istrip
doesn't work (AIX 2.2.1).

	Chuck Karish		{decwrl,hpda}!mindcrf!karish
	(415) 493-7277		karish@forel.stanford.edu

pim@ctisbv.UUCP (Pim Zandbergen) (07/18/89)

karish@forel.stanford.edu (Chuck Karish) writes:

>In article <786@ctisbv.UUCP> I, pim@ctisbv.UUCP (Pim Zandbergen) wrote:
>>I have found out that "stty clocal" or "stty -clocal" have no effect in AIX.
>>You select modem control *once* when you run "devices", afterwards
>>you cannot change it.

>All `devices' seems to do with these parameters is to edit the
>appropriate entry in /etc/ports.

No, there is nothing in /etc/ports that reflects the modem control
of a device. I suppose modem control is handled in VRM, and cannot
be changed in AIX.
-- 
--------------------+----------------------+-----------------------------------
Pim Zandbergen      | phone: +31 70 542302 | CTI Software BV
pim@ctisbv.UUCP     | fax  : +31 70 512837 | Laan Copes van Cattenburch 70
...!uunet!mcvax!hp4nl!ctisbv!pim           | 2585 GD The Hague, The Netherlands

kevin@msa3b.UUCP (Kevin P. Kleinfelter) (07/18/89)

In article <3680@portia.Stanford.EDU>, karish@forel.stanford.edu (Chuck Karish) writes:
> In article <786@ctisbv.UUCP> pim@ctisbv.UUCP (Pim Zandbergen) wrote:
> >I have found out that "stty clocal" or "stty -clocal" have no effect in AIX.
> >You select modem control *once* when you run "devices", afterwards
> >you cannot change it.
> 
> All `devices' seems to do with these parameters is to edit the
> appropriate entry in /etc/ports.  It would seem that parameters not

Not quite true.  It also does a "mknod c /dev/tty0 5 96" for tty0.
The minor device number contains a bit mask which determines modem control.
In order to get modem control, you must have the correct minor device number
AND -clocal.

As near as I can tell, when processing tty devices, "devices updates
	/dev/tty?
	/etc/ports
	/etc/inittab
I see no reason why these things cannot ALL be done manually if desired.
Am I wrong?
-- 
Kevin Kleinfelter @ Management Science America, Inc (404) 239-2347
gatech!nanovx!msa3b!kevin

karish@forel.stanford.edu (Chuck Karish) (07/21/89)

In article <671@msa3b.UUCP> kevin@msa3b.UUCP (Kevin P. Kleinfelter) wrote:
>In article <3680@portia.Stanford.EDU>, I wrote:
>> All `devices' seems to do with [stty] parameters is to edit the
>> appropriate entry in /etc/ports.  It would seem that parameters not

>Not quite true.  It also does a "mknod c /dev/tty0 5 96" for tty0.
>The minor device number contains a bit mask which determines modem control.
>In order to get modem control, you must have the correct minor device number
>AND -clocal.

I discovered today that HP does it with the minor device number, too.
Both HP and IBM hide the documentation for this feature pretty effectively.
The AIX line protocols arent't discussed comprehensibely anywhere;
to figure out what's going on, you have to read the system management
guide and the VRM device driver reference.

>As near as I can tell, when processing tty devices, "devices updates
>	/dev/tty?
>	/etc/ports
>	/etc/inittab
>I see no reason why these things cannot ALL be done manually if desired.
>Am I wrong?

I think you're right.  I've been successful changing both disk
partition and terminal parameters by hand.  The policy of making system
administration magic, and hiding the details from the administrator, is
annoying.  Especially when the tools provided don't do enough.  Try to
re-arrange your disk partitions using minidisks!  I've learned to use
the VRM maintenance facility, and to edit /etc/system and
/etc/filesystems by hand.  Changing simple options by editing /etc/ports
works OK.  It's also possible to change some stty options that aren't
offered by `devices'.

	Chuck Karish		{decwrl,hpda}!mindcrf!karish
	(415) 493-7277		karish@forel.stanford.edu