Subject: Getting mgetty to work.
To: None <port-i386@NetBSD.ORG>
From: Dave Burgess <burgess@cynjut.neonramp.com>
List: port-i386
Date: 09/07/1997 17:38:56
I've been having some trouble with mgetty this week-end.

I've compiled the system, using (what appears to be) the correct options
in the profile.h file.  I've hooked a modem to /dev/tty00, set the ttys
file so that the mdmbuf and rtscts options are being used.  I've done
all the obvious stuff (made sure there are no IRQ conflicts, the devices
are in the kernel, etc.)  I also tried all the other comm ports on the
computer (tty0[0123]) and all of them performed exactly the same way.
While I suppose it's possible to burn out all four comm ports on this
machine, I find that a little improbable.  I've also tried two different
modems, just to be sure it isn't one of the modems.

The basic problem is a failure in the ioctl for getting the line info.
I've written a short program to test if it was mgetty, or something
else.  It is definitely the ioctl that is failing (can't fault mgetty).
Another data point is that the port is not asserting DTR.

The error message returned from the ioctl is "Innapropriate ioctl for
device".  The ioctl I'm using is TIOCMGET.  I've opened the port
(/dev/tty00) for read and write.  Other ioctl's seem to 'work' (for
example, TIO[CG]FLAGS calls don't fail - they also don't return any
information about the port settings or set the port correctly).

I am using the 1.2G tar set from a few weeks ago for both the user and
kernel programs, so all of my libs, etc. should be OK.

Just for grins, I also tried talking to the modem with 'kermit'.  Same
basic problem.  A 'sho comm' gives Kermit's idea of the port but it
doesn't report the status of the modem lines.  Any attempt to
communicate with the port yields the same results.  There is no incoming
data to the modem (according to my probe) and there is no information
transmitted back to the computer by the modem.

I've also looked at the 'stty' settings for the lines, and they look
exactly as I would have expected them to.  This, of course, means that
my program (which relies on TIOGFLAGS) is failing to return the correct
information.  This is worrisome to me.

Is there fundamentally simple thing I've forgotten to do or set?  My
other systems (which are all using the same tar set) all seem to work -
the serial mouse under 'X' on one of the other systems is working fine.
-- 
Dave Burgess                   Network Engineer - Nebraska On-Ramp, Inc.
*bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom
"Just because something is stupid doesn't mean there isn't someone that 
doesn't want to do it...."