[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, Rob Browning wrote:

> 
> I've had a problem with my modem, ppp, and detecting disconnections
> for quite some time now, and I have been completely unable to resolve
> the problem.  I thought I'd bring it up now in case anyone had fresh
> ideas.  Feel free to direct me to a more appropriate location if
> warranted.
> 
> 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
> tone, but pppd will still think it's connected.  I assume it's some
> kind of handshaking problem, but I could have sworn I had all that set
> right.
> 
> I have a USR 28.8 Sportster Internal (I've checked the ROM revision
> date), and I'm using it to connect via ppp.  My ppp-options are as
> follows:
> 
> connect /etc/ppp/ppp-connect
> /dev/cua0
> 38400
> crtscts
> modem
> defaultroute   
> 
> I've experimented with a number of modem string settings, and none of
> them seem to help.  Right now I'm just using the ones that the USR
> manual recommends for hardware handshaking, augmented by the USR tip
> from the Linux Serial-HOWTO.  My ppp-connect script (aside from
> variable assignments) is as follows:
> 
> #! /bin/sh
> /usr/sbin/chat ABORT BUSY ABORT 'NO CARRIER' \
>   ''   'ATZ' \
>   'OK' 'AT&F1' \
>   'OK' 'AT&H1' \
>   'OK' 'AT&R2' \
>   'OK' 'AT&B1' \
>   'OK' 'AT&D2' \
>   'OK' 'ATS13=1' \
>   'OK' 'ATM1L3' \
>   'OK' 'ATX4' \
>   'OK' "ATDT$phone" \
>   CONNECT '' \
>   name: $login \
>   word: "$password" \
>   '>' 'ppp default'             
> 
> These commands are used to initialize the port at boot time:
> 
> STD_FLAGS="session_lockout"
> SETSERIAL=/bin/setserial 
> ${SETSERIAL} -b  /dev/cua0 uart 16550A port 0x3F8 irq 2 spd_vhi ${STD_FLAGS}
> 
> and these (are they necessary?) hopefully finish setting up the port.
> 
> /bin/stty -ixon -ixoff -clocal crtscts < /dev/cua0
> 
> Thanks for any help.
> --
> Rob
> 

As a last resort you could use this script in your crontab:

------------------------------
#!/bin/sh

# This is run periodically from the crontab file to check if the
# connection is down.

ping -c 1 www.sgi.com | grep "received" > $HOME/ooga
if [ ! -s $HOME/ooga ]
then
	(command to kill pppd)
	sleep 5
	(command to restart pppd)
fi
----------------------------------

Where www.sgi.com is someone on the net with a solid connection.  If they
are inaccessible, the script will kill and revive the connection.  

Of course, don't pick someone unreliable or you go down when they go down.
You could also modify it to check several hosts. 

_____Running_Debian_Linux__(stable)__version_1.2.13___________
This is a test of the emergency broadcasting system.  In the /  --beeeeep--
case of a real emergency, this message would be followed by /  Kevin Bealer
light relaxing music, and I would be on my way to Idaho,   / kmb203@psu.edu
where cousin Jake has a concrete bunker with a six year    \______
supply of shotgun shells and ... um, gotta go! ... (light music)  | 
__________________________________________________________________|
            



Reply to: