[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to make ppp die after only 4 rings?



Lawrence Chim wrote:
> 
> Since my ISP will answer the call after 2 rings,
> it is possible to set the pppd to die after 4 rings,
> otherwise, it keeps the line 'til 60s pass.
> 

Yes, it is. This timeout might be set in one of two places. First,
there's most likely an 'S' register which can be set in your modem
to control the amount of time the modem will wait for carrier after
dialing the modem. For my US Robotics Sportster I can use the
command ATS7=30 to tell my modem to wait 30 seconds to establish
carrier or give up and return 'NO CARRIER'. You'd probably need to
make this more like 10 seconds rather than four to allow for
modem-handshake time since the timeout is until the connection is
established, not the amount of time to wait for the other modem to
answer. 

The other method
(not quite as clean, in my estimation) would be to set the timeout
in your chat script. I'm guessing you use pon like everyone else
seems to. I don't know how its script works. I use "chat" which comes
with pppd, and you can change its timeout either by using the '-t'
parameter or using the "TIMEOUT" command in-line in the chat
script. Here's an example (yup, I stole it from the chat man page):

TIMEOUT
       The  initial  timeout  value  is  45  seconds. This may be
       changed using the -t parameter.

       To change the timeout value for the  next  expect  string,
       the following example may be used:

              ATZ  OK ATDT5551212 CONNECT TIMEOUT 10 ogin:--ogin:
              TIMEOUT 5 assowrd: hello2u2

       This will change the timeout to 10 seconds when it expects
       the  login:  prompt. The timeout is then changed to 5 sec­
       onds when it looks for the password prompt.

       The timeout, once changed, remains in effect until  it  is
       changed again.

Give one of these a try!

-- 
Jens B. Jorgensen
jjorgens@bdsinc.com


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: