Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Sep 1997 18:47:14 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Snob Art Genre <benedict@echonyc.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: chat script
Message-ID:  <19970924184714.65118@lemis.com>
In-Reply-To: <Pine.GSO.3.96.970924043858.7079A-100000@echonyc.com>; from Snob Art Genre on Wed, Sep 24, 1997 at 04:41:12AM -0400
References:  <19970924180641.63284@lemis.com> <Pine.GSO.3.96.970924043858.7079A-100000@echonyc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 24, 1997 at 04:41:12AM -0400, Snob Art Genre wrote:
> On Wed, 24 Sep 1997, Greg Lehey wrote:
>
>> On Wed, Sep 24, 1997 at 03:38:35AM -0400, Snob Art Genre wrote:
>>> I am having a very hard time getting a chat script working.
>>>
>>> It needs to dial my ISP, expect ">", send "ppp", do the login/password
>>> thing and exit.
>>
>> And what's the problem?
>
> How do I set the device name when I run chat myself?  "chat -f scriptfile
>> /dev/modem"?

Here's how I start pppd.  This file is /etc/ppp/pppd.start:

--------------------------------------------------
pppd /dev/cuaa2 57600 connect 'chat -f /etc/ppp/pppd.chat'
--------------------------------------------------

And /etc/ppp/pppd.chat is something like:

--------------------------------------------------
# Abort the chat script if the modem replies BUSY or NO CARRIER
ABORT BUSY 
ABORT 'NO CARRIER' 
# Wait up to 5 seconds for the reply to each of these
TIMEOUT 5 
'' ATZ 
OK ATD<phone number>
# Wait 40 seconds for connection
TIMEOUT 40 
CONNECT
--------------------------------------------------

Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970924184714.65118>