Subject: Re: Trying to talk to tty01 with cu...
To: Bill Studenmund <wrstuden@nas.nasa.gov>
From: William R. Dickson <wrd@awenet.com>
List: port-macppc
Date: 09/01/1999 12:53:39
On Wed, 1 Sep 1999, Bill Studenmund wrote:

> > So, I'm trying to set up dial-in on my system.  Ultimately it'll be a PPP
> > dial-in, but for now I'd just like to get it to respond with a login
> > prompt.  But I can't seem to communicate with the modem at all.  I've tried
> > this:
> > 
> > tty01   "/usr/libexec/getty std.9600"   vt100   off secure
> > 
> > and this:
> > 
> > tty01   "/usr/libexec/getty std.9600"   vt100   on insecure
> > 
> > ...plus various speeds.
> 
> I thing mgetty might be better. getty works with modems, but assumes that
> the modem is just there. If you need to do AT command setups on the modem,
> getty won't do.

Noted -- I'll talk more about mgetty below.

> > I've kill -HUP'd init each time I've changed /etc/ttys.  But when I try to
> > use cu to talk with the modem, I get:
> > 
> > cu: open (/dev/tty01): Permission denied
> > cu: tty01: Line in use
> > 
> > This happens whether or not a line appears in ps ax indicating that getty
> > is waiting for a connection on tty01.
> 
> cu has always given me problems. Try tip instead.

OK, if I can figure it out :).

> Do you have read/write access on /dev/tty01? where's the "permission
> denied" comming from?

crw------- 1 root wheel 12, 1 Aug 31 19:29 /dev/tty01

Since I'm su'd to root, I'm assuming that's sufficient.  The error occurs
when I do this:

ghek# cu -l /dev/tty01 -s 38400
cu: open (/dev/tty01): Permission denied
cu: /dev/tty01: Line in use

(I'm basically doing this so I can issue AT commands to the modem.)

> > Any suggestions?  Am I doomed?  Would it be helpful to install mgetty?
> 
> I think eventually, yes, about mgetty.

I've installed mgetty.  ps ax cheerfully claims:

 4113 ??  S      0:00.04 /usr/local/sbin/mgetty std.38400 tty01

...but the modem fails to answer the phone.  This could be an init string
problem, I suppose, but I thought the default string worked when I tried
this under linux.  (Of course, since /bin/login crashed under linux and it
didn't handle DTR properly, it didn't get me very far once the modem
picked up.)

> But try tip to talk to the modem. Also, check out /etc/remote - the data
> file for tip setup. For twiddling the modem, you want a ":dc" in the setup
> line (so tip won't wait for CD to be asserted before talking).

Thanks, will do.

If anybody is using netbsd/macppc to answer the phone with either a login
prompt or a ppp session, by any method, I'd love to hear from you.
Thanks!

-Bill

-- 
 William R. Dickson -- Consuming the Earth's limited resources since 1968
 wrd@awenet.com   < >   http://www.awenet.com/~wrd/   < >   ICQ: 14117523

   Moe:  Barney, don't steal any beer while I'm gone.

Barney:  What kind of pathetic drunk do you take me for?  (Gasp!)  Somebody
         spilled beer in this ashtray!  (Slurp)