LINK="#3366FF" VLINK="#A000A0">

"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
LinuxCare, http://www.linuxcare.com/


(?) PPP disconnect

From Timmy Douglas on Sun, 18 Jul 1999

I have a question that has been bugging me. I have read your PPP disconnect page but I am just using minicom to try to establish a connection and I am disconnecting right after it starts PPP.

(!) When you exit minicom are you using [Ctrl]+[A], [X] or [Ctrl]+[A], [Q]? When you use the latter of these, minicom should ask you to confirm that you really want to "quit without resetting the modem." Are you getting that? You should be, otherwise minicom is resetting the modem as it exits ([Ctrl]+[A], [X]) which disconnects the phone, naturally enough.

(?) Here is what the capture file (MINICOM.CAP) says:


Annex Command Line Interpreter   *   Copyright (C) 1988, 1998 Bay Networks
Checking authorization, Please wait...
Username:my_name
Password:
Switching to PPP.
(!) This phrase should be the last "expect" string in your chat script. (PPP should be sufficient). That will clear the buffer so that pppd will see the other "stuff" (LCP, link control protocol traffic).
... [BINARY DATA ELLIDED] ...
(note: Please do NOT send binary data through e-mail unless your correspondent has specifically requested it).
When sending a bit of binary data in a mostly textual message it's recommended that you use the MIME "quoted-printable" encoding. This leaves most printable characters unmodified and encodes any non-printable characters into short sequences like =2A etc.
(?)NO CARRIER

do you know how I can get rid of the no carrier thing? You said you had a similiar experience so I thought you might be able to help. Thanks!

(!) Convince your ISP to stop hanging up the phone on you.
(NO CARRIER is a message reported by your modem when the line is disconnected --- when either of the modems has hung up on the other or when the intervening phone systems have broken the connection).

(?) --- Timmy

(!) Play with your chat script more. Make sure that pppd works when you use the "quit without reset" from minicom.
In any future questions that you post to me, or to the various support mailing lists and newsgroups, you should:
Include any syslog messages that correlate to your attempts to establish PPP sessions (tail -f /var/log/messages).
Include the settings in your /etc/ppp/options file and the command line which you are using to invoke pppd.
Look for any of the other settings files that pppd is accessing during your efforts. For example it will try to read /etc/ppp/options.ttyS* to correspond to your modem device node, and/or ~/.ppprc of the user under which it is running, and it will look for and execute /etc/ppp/ip-up (as described in the man page).
The fact that the required chat script differs based on which modem and ISP your using is a major source of the confusion for setting up new PPP accounts.
The fact that the Linux pppd looks to so many sources of options (its command line, the /etc/ppp/options.* files, the ~/.ppprc, etc) and that it has other "moving parts" (like the /etc/ppp/ip-up and various chap-secrets and pap-secrets files) is another.
Sometimes when troubleshooting these sorts of things I run pppd under the strace command. This will give you a "blow-by-blow" account of every system call made by the process that you are tracing (and optionally by any of its children).
Most of the output from strace doesn't mean much to me. However I have learned to pay attention to open(), stat(), and lstat() calls --- and to interpret many of the errors returned by them. Try it! It's not that hard.

(?) More on PPP + minicom Disconnects

From Timmy Douglas on Mon, 19 Jul 1999

Thank you for all the info. I guess I will have to learn how to mess with those scripts and that pppd thing. Originally I tried to stay away from them because the seemed a pain to mess with.

(!) It's possible that you could use KPPP or wvDial (free packages, you can look for them on your distribution CD, or download them. One place to look for Linux PPP files, programs and scripts is at:
Metalab: Index of /pub/Linux/system/network/serial/ppp
http://metalab.unc.edu/pub/Linux/system/network/serial/ppp
... Metalab is the canonical archive of Linux software.
Another place to look (somewhat easier to use, especially for the novice) is Freshmeat: http://www.freshmeat.net
Freshmeat's "quickfind" feature spits up wvDial at:
[fm] WvDial
http://www.freshmeat.net/appindex/1998/08/26/904189535.html

(?) "Try it! It's not that hard"....well, I wish I knew as much as you.

(!) How do you think I got to know any of this?

(?) WvDial Success

(Was: PPP ???)

From Timmy Douglas on Mon, 19 Jul 1999

(?) Thanks you sooooo much!!! I GOT CONNECTED WITH VWDIAL!!!!!!!!!! The first time I was so happy i didn't edit the resolv.conf file so it had like "<setup here>" or soemthing in it. Then I connected with my windows computer to find the dns server stuff with winipcfg.exe.

(!) I think you mean wvdial. I've never heard of a VWDial (though it might combine fine German engineering with a mod retro '60's styling ;) ).

(?) The only thing left is I hate pressing the modem - off - on to get disconnected and vwdial sort of leaves the xterm hanging with no prompt. So now I just have to figure out how to get disconnected. Maybe I could try figuring out by myself.

(!) Try hitting [Ctrl]-[C] to kill wvdial process in your xterm (or VC) when you down. If that doesn't work then look for a file named /var/run/pppd.pid (or something like that). When you see that file it should contain the process ID of the running pppd program. You can then use something like:
kill `cat /var/run/ppp0.pid`
... as appropriate to your installation.
Naturally you can embody this into a script, possibly a PERL script. If it is a perl script and you have SUID PERL installed you can use SUID permission on it to imbue normal users (possibly limited to some specific group) with the power to launch and shoot down your connections. You can also install and configure the sudo package to allow normal shell scripts to be run by "unprivileged" users.

(?) Thanks again, Timmy

(!) As you can see the basic answer is: "kill the pppd process." However the details on how you do that come with the universal UNIX operations qualifier: "it depends."


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 44 August 1999
HTML transformation by Heather Stern of Starshine Techinical Services, http://www.starshine.org/


[ Answer Guy Index ] 1 4 7 9
11 12 14 17
18 19 20 21 24 25 26
28 29 30 31 32 33 34
35 36 37 38 39 40 41
42 43 44 45 46 47 48


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]