PDA

View Full Version : [ubuntu] USRobotics 5610 Modem - pppd error code 2



gr33nman
May 8th, 2009, 11:14 PM
Environment:
Dell Optiplex GX110, 800MHz PIII
192 MB RAM
USRobotics 5610 modem - pci slot - should work out-of-the-box with linux.
Ubunty Jaunty 9.04
(While this does have on-board ethernet, the finished box will be sent to my brother who only has dialup.)

At first Gnome PPP wouldn't recognize the modem, so I followed the directions here (http://ubuntuforums.org/showpost.php?p=441910&postcount=1).
Now the modem is visible to Gnome PPP.

Then I did a 'sudo wvdialconf', edited /etc/wvdial.conf, and did 'sudo pppconfig'

I also did this:

$ sudo chmod a+x /usr/sbin/pppd
$ sudo chmod a+rw /etc/ppp/pap-secrets
$ sudo chmod a+rw /etc/ppp/chap-secretsbecause I was getting feedback from Gnome PPP's log that the files were not editable, and I'd rather not attempt to get my newbie family members to sudo on terminal.

So now, I've gotten this far with Gnome PPP:

--> Ignoring malformed input line: ";Do NOT edit this file by hand!"
--> WvDial: Internet dialer version 1.60
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATM1L1DT7065554801
--> Waiting for carrier.
ATM1L1DT7065554801
CONNECT 24000/ARQ/V34/LAPM/V42BIS
--> Carrier detected. Waiting for prompt.
Level 3 Comm nas111.atl1 UQKT2
Username:/login:/Login:
--> Looks like a login prompt.
--> Sending: me@myself.i
me@myself.i
Password:
--> Looks like a password prompt.
--> Sending: (password)
Entering PPP Session.
IP address is 4.154.124.145
MTU is 1500.
--> Looks like a welcome message.
--> Starting pppd at Fri May 8 17:26:03 2009
--> Pid of pppd: 6402
--> Disconnecting at Fri May 8 17:26:04 2009
--> The PPP daemon has died: pppd options error (exit code = 2)
--> man pppd explains pppd error codes in more detail.
--> I guess that's it for now, exiting
--> The PPP daemon has died. (exit code = 2)
I can hear the gerbils inside the modem rattling their cage and answering the phone, so I know the card is good. I just am not sure why I'm getting (exit code = 2). I even tried setting the speed as low as 38, rather than 56 or 115 in Gnome PPP. No dice.

Error Code 2 from the pppd man page: "An immediately fatal error of some kind occurred, such as an essential system call failing, or running out of virtual memory. "

I'm not using that much of the hard drive - maybe 3 out of 20 GB.
When I view the system monitor during an attempt, the memory (74% of 180.5MB) and swap memory (27% of 525.5MB) barely flinched and were within acceptable parameters, so I doubt it's a memory thing.

I would be grateful for any suggestions or help.

Chris

EDIT: username and password are correct. I double checked. C.

ModelM
May 9th, 2009, 12:22 AM
Check the files

/etc/wvdial.conf

/etc/ppp/peers/wvdial

/etc/ppp/peers/wvdial-pipe

and see that they all have the same speed setting. (just set them all to 115200). If one file has one speed setting, but another file has a different speed the daemon will kick out with an error 2 due to conflicting options.

Hope this helps

gr33nman
May 9th, 2009, 02:59 AM
ModelM,

Thanks for your reply.

Below are the settings in each file accordingly.
In some resources it's just '115200'.
In other resources it seems to be 'baud = 115200'
I've not been able to find a reasonable 'sample file' for any
of the particular files below on google.

Would you mind showing me the exact settings as they
should be in each of the three files you mentioned?


===== /etc/ppp/peers/wvdial =====

noauth
name wvdial
usepeerdns===== /etc/ppp/peers/wvdial-pipe =====

noauth
name wvdial

plugin passwordfd.so

defaultroute
replacedefaultroute===== /etc/wvdial.conf =====

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Phone = 7065554801
ISDN = 0
Password = blahblahblah
Username = me@myself.i
PPPD Path = /usr/sbin/pppd
Modem = /dev/ttyS2
Baud = 115200

[Dialer pulse]
Dial Command = ATDPJust for good measure I thought I'd show my .wvdial.conf to see if it was throwing anything off:
===== ~/.wvdial.conf =====

[Dialer Defaults]
Modem = /dev/ttyS2
ISDN = off
Modem Type = Analog Modem
Baud = 115200
Init = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 =
Init4 =
Init5 =
Init6 =
Init7 =
Init8 =
Init9 =
Phone = 7065554801
Phone1 = 7065554801
Phone2 =
Phone3 =
Phone4 =
Dial Prefix =
Dial Attempts = 1
Dial Command = ATM1L1DT
Ask Password = off
Password =
Username = me@myself.i
Auto Reconnect = off
Abort on Busy = off
Carrier Check = on
Check Def Route = on
Abort on No Dialtone = on
Stupid Mode = off
Idle Seconds = 0
Auto DNS = on
;Minimize = off
;Dock = off
;Do NOT edit this file by hand!I also had to reset the serial port again for some reason.

setserial /dev/ttyS2 uart 16550A port 0xecf8 irq 9How often should I have to 'setserial'?

Cheers,

Chris

ModelM
May 9th, 2009, 05:04 AM
Check for any other files in the /etc/ppp directory & inspect them for speeds. If no speed is mentioned, as in the files you've posted, that's ok. If they have a line with a speed other than 115200, change it.

Also, we can eliminate a lot of variables by using wvdial "raw". Just bring up a terminal window & type:

sudo wvdial

& let's see what happens.

My 5610 is the only card in my machine & also the only serial port so I've never used setserial.

gr33nman
May 9th, 2009, 02:09 PM
ModelM,

Here are the results. It looks like we're getting somewhere.
How do I shut off the modem when it's done this way?
It's not immediately apparent from the man pages.
As you can see, I had to setserial again, since the machine was rebooted.

Chris


rod@rod-desktop:~$ sudo wvdial
--> WvDial: Internet dialer version 1.60
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.
rod@rod-desktop:~$ setserial /dev/ttyS2 uart 16550A port 0xecf8 irq 9
Cannot set serial info: Operation not permitted
rod@rod-desktop:~$ sudo !!
sudo setserial /dev/ttyS2 uart 16550A port 0xecf8 irq 9
rod@rod-desktop:~$ sudo wvdial
--> WvDial: Internet dialer version 1.60
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT7065554801
--> Waiting for carrier.
ATDT7066214801
CONNECT 24000/ARQ/V34/LAPM/V42BIS
--> Carrier detected. Waiting for prompt.
Level 3 Comm nas111.atl1 UQKT2
Username:/login:/Login:
--> Looks like a login prompt.
--> Sending: me@myself.i
me@myself.i
Password:
--> Looks like a password prompt.
--> Sending: (password)
Entering PPP Session.
IP address is 4.154.121.150
MTU is 1500.
--> Looks like a welcome message.
--> Starting pppd at Sat May 9 09:01:38 2009
--> Pid of pppd: 9303
--> Using interface ppp0
--> pppd: X�i ��i
--> pppd: X�i ��i
--> pppd: X�i ��i
--> pppd: X�i ��i
--> local IP address 4.154.121.150
--> pppd: X�i ��i
--> remote IP address 209.244.16.181
--> pppd: X�i ��i
--> primary DNS address 209.244.0.3
--> pppd: X�i ��i
--> secondary DNS address 209.244.0.4
--> pppd: X�i ��i

gr33nman
May 9th, 2009, 05:35 PM
Okay, I found some answers:
A. sudo wvdial can be stopped from terminal with 'control c'. Duh. I should have thought of that, since control c works that way on a lot of stuff.

B. This article (http://www.justlinux.com/nhf/Modems/Configuring_Your_ISA_External_or_PCI_Modem.html) had great tips for setting up a modem.

I had to put this:

setserial /dev/ttyS2 uart 16550A port 0xecf8 irq 9as the last line of /etc/init.d/bootmisc.sh .

The article also led me to believe that the Gnome PPP problems I was having were user-permissions oriented. I don't have linuxconf installed on my machine and probably won't need to since my brother won't be using it, but I do have from the menu:
System -> Administration -> Users and Groups.

There were two users: 'root' and 'rod'. I selected 'rod' and clicked 'properties'.
I went to the 'user privileges' tab just to look around and found that several important things were unchecked, like 'Use modems' and 'Connect to internet using a modem'. I checked this items, clicked 'OK' and 'Close'.

Then I rebooted and tried Gnome PPP.

Voila - connection via Gnome PPP.

Thanks for your help!