Article View: comp.os.linux.setup
Article #306Re: ppp and chat permanent connection
From: Al Longyear
Date: Wed, 02 Oct 1996 00:00
Date: Wed, 02 Oct 1996 00:00
55 lines
2506 bytes
2506 bytes
Glenn Powell <ma.eng@mailbox.uq.oz.au> writes:
>Can someone help me with this script that I am writing to keep my modem
>connected to my ISP.
>Please note that 200.200.200.200 is the number that my ISP gives me apon
>connection.
>Here it is
>( sleep 20 ; while : ; do /usr/sbin/pppd connect ' /usr/sbin/chat -f
>./login.txt ' -detatch lcp-echo-interval 30 lcp-echo-failure 4
>:200.200.200.200 /dev/cua0 38400 ; sleep 30 ; done ) &
^^^^
You have this reversed. It should read as follows: 200.200.200.200:
(The colon _follows_ your IP address and preceeds the IP address of the ISP)
>my chat script login.txt is as follows
>" " +++ " " ATH0 " ATZ OK ATDT 1234567 ogin: username word: pword "
NO. That won't work. Use:
TIMEOUT 4 "" AT OK-+++\c-OK ATH0 TIMEOUT 60
OK ATZ OK AT&C1&D2DT1234567 CONNECT \c ogin: username word: pword
1. Do not put spaces where you don't expect to receive spaces. They
are not there for just being pretty formatting.
2. The attention sequence does not work if the modem is already at
the command level. Just sending "AT" should return OK in this case.
3. You need the \c after the plus characters to prevent the additional
CR character which would invalidate the attention sequence.
4. Don't trust that "Z" will set the modem flow control options. Always
set them yourself and you will have fewer problems.
5. D is the command to dial, 'T' is to switch to tone dialing. If you
put a space after the 'T' then this becomes a reply string and that is
not what you want.
And finally, Add the options:
modem
defaultroute
crtscts
asyncmap 0
to the above list of options on pppd.
--
Al Longyear longyear@netcom.com
Technical Details
Message-ID:
<longyearDyMpH4.GHB@netcom.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<324F275E.7C806654@mailbox.uq.oz.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1103af,a2023bcd1861f0b5 X-Google-Attributes: gid1103af,public X-Google-Thread: f9b51,a2023bcd1861f0b5 X-Google-Attributes: gidf9b51,public X-Google-Thread: 102983,a2023bcd1861f0b5 X-Google-Attributes: gid102983,public X-Google-Thread: 10669a,a2023bcd1861f0b5 X-Google-Attributes: gid10669a,public From: longyear@netcom.com (Al Longyear) Subject: Re: ppp and chat permanent connection Date: 1996/10/02 Message-ID: <longyearDyMpH4.GHB@netcom.com> X-Deja-AN: 186612406 sender: longyear@netcom7.netcom.com references: <324F275E.7C806654@mailbox.uq.oz.au> organization: personal account at NETCOM Communications newsgroups: comp.os.linux.setup,comp.os.linux.misc,comp.os.linux.networking,aus.computers.linux