Need a sure way to hangup modem

Need a sure way to hangup modem

Post by Antonio Jose Coutinh » Thu, 14 Nov 1996 04:00:00



Hi all!

I'm sorry if the question I'm about to ask was already answered a hundred times,
but I couldn't find it in any FAQ.

I'm using RedHat Colgate,  kernel 2.0.18, and I'm using pppd and IP-masquerading
to allow two other machines (WIN95 :-( ) to access the ISP. Everything works
fine, except for a small problem:

Sometimes, as when pppd gives up on a connection  because the ISP is misbehaving  
so that chat can't establish the connection , the modem stays connected after
the pppd process dies.

This is a major worry because the two WIN95 machines are far away from the
modem, so the user doesn't  know if the modem  is still connected. It could,
conceivably, stay connected all night long without anyone noticing.

Even when I notice the problem, it's not been easy to solve, even on the main
Linux box. I usually try minicom, and  after a few resets, +++ ATH and such I
get the modem to disconnect.

Note than the modem is disconnecting properly when pppd gets a SIGINT, so I
think the cable and the modem setup are  ok.

What I need is to know is there is some program that forces the  modem to
hangup, immediately and always.

I also could do with some programming info on that subject, if  someone pointed
the rigth ioctls, I could probably write that  program myself.

Thank you all for your attention.

reliable.

Thanks

Antonio

 
 
 

Need a sure way to hangup modem

Post by Andrew E. Miles » Thu, 21 Nov 1996 04:00:00



:
: Sometimes, as when pppd gives up on a connection  because the ISP is misbehaving  
: so that chat can't establish the connection , the modem stays connected after
: the pppd process dies.

Try: setserial /dev/modem hup_notify

--

Linux Plug-and-Play Kernel Project http://www.redhat.com/linux-info/pnp/
XFree86 Matrox Team http://www.bf.rmit.edu.au/~ajv/xf86-matrox.html

 
 
 

1. Need a reliable modem hangup

I need some method for reliably hanging up the modem from a user space
script which has just completed an ftp transfer.  I have tried the
following:

killall getty

This normally works from the command line with a su logon.  But I get
a 'permission denied' error when trying this from user space.

kill -HUP `cat /var/run/ppp0.pid`

This will shut down the pppd process again from an su logon, but gives
the same permission denied from user space.

I have also tried placing these commands in a shell script with root
ownership and chmod 6777 permission.  This also gives the permission
denied message when executed from a user logon....  Anyone have a
suggestion what to try next?

2. New to FBSD with questions

3. Need ways to find street prices of Unix boxes

4. /usr/bin/ls /usr/ucb/ls /usr/local/bin/ls

5. Mysterious ISDN modem hangup

6. Seyon problems

7. PPP Netcom Mindspring Modem Hangup

8. lex undefined reference to yywrap

9. Getting Modem To Hangup on Demand

10. trust modem hangup

11. Modem hangup using pppd with RH 5.0

12. PPP modem hangup??!!

13. Modem hangup immediately after dialing in