Subject: Re: ttyflags: TIOCSFLAGS on /dev/mdm02: Device not configured
To: None <port-atari@NetBSD.ORG>
From: Waldi Ravens <waldi@moacs.indiv.nl.net>
List: port-atari
Date: 11/28/1995 02:49:16
Hi Michael,

> > > mdm02   "/usr/libexec/getty std.19200"  network off rtscts mdmbuf
> > > 
> > > However, `ttyflags' (run from /etc/rc) complains (here's the output of
> > > "ttyflags -a -v"):
> > > 
> > >     ttyflags: setting flags on /dev/mdm02 to c
> > >     ttyflags: TIOCSFLAGS on /dev/mdm02: Device not configured
> > It's a bit strange, I added exactly the same line without having troubles.
> > I tried it without mdmbuf when my modem was disconnected. With 'mdmbuf'
> > I only tried it with my modem connected (just bad reading on my part).
> 
> I looked at this again: I always get the error message when specifying
> "mdmbuf", whether I'm connected or not.

`rtscts' and `mdmbuf' are driver settings, it doesn't matter whether
some physical equipment is connected to the specified port or not.
These flags only influence the behaviour of the computer, not the
behaviour of the equipment (terminal, modem, etc.) on the other
end of the line.

> Anyway, I've (again) looked up the meaning of "mdmbuf" (it means use
> DTR/DCD flow control), and this is not quite what I want :) .  So my
> solution now is to just leave out "mdmbuf" in /etc/ttys.

I assume, what you want, is for DTR to drop when the device is closed,
and a SIGHUP being generated when DCD drops. Both of these are the
default behaviour. We're talking NetBSD here, not MiNT. :-)

> > > Using "stty -f /dev/mdm02 crtscts mdmbuf" works fine, however.  Can
> > > anyone explain what is giong on?
> 
> (Perhaps the driver just doesn't know about DTR/DCD flow control,

The driver definitely does not support DTR/DCD flow control.
It supports CTS/RTS and XON/XOFF flow control.
 
> and `stty' silently ignores the error?

Maybe stty uses the tc{get,set}attr() functions, instead of ioctl().
According to P1003.1 tcsetattr() does not detect errors in the
termios structure. To determine if a particular terminal attribute
was set as requested, the software must follow the tcsetattr() with
a tcgetattr() and compare the requested and actual attributes.

> "Device not configured" would still be a somewhat stange error message...)

I agree, "Operation not supported" would make more sense.


Waldi