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

Re: pppd problem -- modem *not* disconnecting when connection lost.



On Tue, 30 Jan 1996, Mike Blatchley wrote:
> 
> On Tue, 30 Jan 1996, Rob Browning wrote:
> >
> > Basically the problem is that I can run pppd to connect to my ISP with
> > no problems, but then pppd will never die, even if the connection to
> > the other machine is lost.  I can pick up the line and hear a dial
> 
> I don't have my Hayes command set here at work, but my recollection is
> that you need to send an &C1 and &D2 command to the modem to tell it to
> monitor carrier detect and drop DTR when the connection is lost (or does
> the &D2 tell it to monitor DTR and hangup?  Well, something like that).  I
> see that you are using the &D2, but not &C1 (unless the modem already
> defaults to that). 
> 
> Also, specify the HUPCL option in your gettydefs/ttydefs file for the
> serial port you're using; when you terminate the pppd process from your
> end, this will force the modem control lines to be dropped and hang up. 
> 
> I'll double check these modem commands when I get home tonight.
> 

Yep, &C1 and &D2 were the commands I was remembering.  So, I wonder why 
it's not working on your system.  Well, maybe I should reach over and 
pull my phone cord out of the wall to ensure my setup is disconnecting 
:-).  O.K, it dropped carrier detect, the modem hung up, but *pppd did 
not die*  :-( .  Peculiar how I've never run into this problem during 
normal operation.

Anyway, the quickest fix for me is to use pppd's lcp-echo-interval and 
lcp-echo-failure options.  I now initiate pppd with:

  exec /usr/sbin/pppd lcp-echo-interval 5 lcp-echo-failure 5 auth \
     crtscts modem mru 1500 $MODEM defaultroute                   \
     connect $DIALER_SCRIPT  # proxyarp  

The lcp-echo-interval tells pppd to send an echo-request to the remote pppd
process if no packets have been received for 5 seconds.  If the remote 
system does not respond 'lcp-echo-failure' number of times, pppd will 
terminate.  Pulling the cord seems to work now!

Mike Blatchley
======================================================================
      * email: Mike_Blatchley@maxtor.com -or- mikeb@maxtor.com *
======================================================================



Reply to: