[comp.sys.att] UNIX PC obm and /usr/include/sys/phone.h

lenny@icus.UUCP (Lenny Tropiano) (11/12/87)

How would one write a program that basically opened up the phone
device /dev/ph1 with:
		fd = open("/dev/ph1", O_RDWR | O_NDELAY);

get the phone data and check to see if it is in VOICE or DATA mode.

/usr/include/sys/phone.h has the c_lineparam in the structure updata
that gives you a bit setting for VOICE and DATA... This is gotten with a:
		ioctl(fd, PIOCGETP, &upd);

That's not my problem....  My problem arises when I open /dev/ph1 while
there is a [uu]getty on the line.  For some reason this confuses the
[uu]getty and it no longer operates normally.   The phone answers, gives
the login prompt, you type in your id and you get:

	login:  loginid
	Login incorrect
	login:

It never asks for a password.  There is also a problem dialing out and
getting the system you are connecting with to respond normally.  It seems
you can't have /dev/ph1 opened by two processes?  Maybe there is another
way?  I need to do this in a loop every 15 seconds, so I would like to
keep the port open...

Any suggestions would be appreciated!  Thanks.

							-Lenny

============================ US MAIL:   Lenny Tropiano, ICUS Computer Group
 IIIII   CCC   U   U   SSSS             PO Box 1
   I    C   C  U   U  S                 Islip Terrace, New York  11752
   I    C      U   U   SSS   PHONE:     (516) 968-8576 [H] (516) 582-5525 [W] 
   I    C   C  U   U      S  AT&T MAIL: ...attmail!icus!lenny  TELEX: 154232428
 IIIII   CCC    UUU   SSSS   UUCP:
============================       ...{uunet!godfre, mtune!quincy}!\
                              ...{ihnp4, boulder, harvard!talcott}! >icus!lenny 
"Usenet the final frontier"        ...{cmcl2!phri, hoptoad}!dasys1!/