Subject: Re: Reading from a serial port/modem
To: David Forbes <david@flossy.u-net.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-help
Date: 07/23/2000 17:18:48
On Sun, Jul 23, 2000 at 03:10:42PM +0100, David Forbes wrote:
> 
> I've been trying to read data from the serial port to which my modem is
> connected.  I wish to be able to detect when the phone is ringing.
> 
> Originally, I tried using /dev/tty00 (which is what pppd uses).  However,
> I found that I couldn't read anything and I wasn't convinced that I was
> successfully writing anything either, even when I'd tried various things
> to set the clocal flag.

My guess is that you have to deal with some termios properties - see
termios(4).
BTW, what are you tring to do ? There's several packages to deal with modems
already available, maybe one could suit your needs ?

> 
> I noticed a recent message on current-users that recommended using
> /dev/dty00, so I've tried that without any luck.  I know it must be
> possible because I can use minicom to read the "RING" string when the
> phone rings.

You have to use tty?? for this, dty is for dial-out.

--
Manuel Bouyer <bouyer@antioche.eu.org>
--