# Exit code 16 with wvdial

## erveegh

I installed wvdial and it works up until it starts pppd, wherupon it disconnects with exit code 16: the modem hung up.

The disconnect message, the logs, and pppd's man pages all tell me the same thing : error 16 means the modem is disconnecting.

I've made sure that ppp and async were enabled under menuconfig, tried "Stupid Mode = on" in wvdial.conf, and changed my init strings on the off chance that that might work.

I've checked the docs, forums, and google with no luck. Any help would be appreciated.

- Bob

----------

## Qubax

try pppconfig - creates the needed config files, after all if you don't want to use pppconfig, you can use the created files to compare them for error finding

----------

## erveegh

 *Quote:*   

> try pppconfig - creates the needed config files, after all if you don't want to use pppconfig, you can use the created files to compare them for error finding

 

Tried that; It yielded no change in behavior and the resulting config files provided me with no new information.

I think I may be overlooking something fairly obvious, but have no idea what it is.

Again, any help would be appreciated.

----------

## Qubax

du you have an extern modem(which com/usb), or intern?

what do you think is meant by "hung up"? can you hear the modem dialing, trying to make a simple "beep", or doesn't it make any sound?

do you try to connect as user, or as root? as user you have to be able to execute chat und pppd, and have read permission for the scripts in /etc/ppp/peers/* (here i've my dial scripts) and /etc/chatscripts/*

----------

## erveegh

 *Quote:*   

> du you have an extern modem(which com/usb), or intern?
> 
> what do you think is meant by "hung up"? can you hear the modem dialing, trying to make a simple "beep", or doesn't it make any sound?

 

I have an external modem.

Under wvdial it dials, handshakes, and runs happily though the login/password chat sequence. It then starts pppd, and throws exit code 16.

 *Quote:*   

> do you try to connect as user, or as root? as user you have to be able to execute chat und pppd, and have read permission for the scripts in /etc/ppp/peers/* (here i've my dial scripts) and /etc/chatscripts/*

 

I've been trying to connect as root thus far.

----------

## Qubax

so which version of ppp are you using?

----------

## StrCrssd

He's using ppp-2.4.1-r11.ebuild

I tried playing with it several times.  He's using an external USR 33.6 modem on ttsy0.

It exhibits the same behavior using both wvdial and /etc/net.ppp0.  

From what I've been able to tell, it looks like ppp terminates with error code 16 (modem hangup) which is consistant with it being across both net.ppp0 and wvdial.

The modem does work in Windows and did work under SuSe 7.2.

----------

## telex4

I've also been having problems with wvdial & ppp.... wvdial initialises the modem, connects to the ISP, authenticates, then tries to start pppd, when it just sits there and fails to start it properly (that is to say it starts pppd, givs me its pid, but doesn't complete... I didn't notice any exit codes, but then again I'm too lazy to sit and wait while it does nothing, so it might have exitted after sitting there for a while  :Smile: 

I haven't touched anything other than wvdial.conf, so maybe I need to look into some ppd confs?

Here's some output:

```

... gets up to:

--> Looks like a password prompt.

--> Sending: (password)

Exiting shell, and starting PPP session.

~[7f]}#@!}!}!} }8}!}$}%\}"}&} }*} } }%}&Hu}4[01]}'}"}(}"[1e]U~

--> PPP negotiation detected.

--> Starting pppd at Fri Sep 27 18:30:19 2002

--> pid of pppd: 1440

then it stops. in suse atm it goes on to print:

--> pppd: Using interface ppp0

--> pppd: local  IP address 213.104.109.46

--> pppd: remote IP address 213.104.82.217

--> pppd: primary   DNS address 194.168.4.100

--> pppd: secondary DNS address 194.168.8.100

--> pppd: Script /etc/ppp/ip-up run successful

--> Default route Ok.

--> Nameserver (DNS) Ok.

--> Connected... Press Ctrl-C to disconnect

```

Now I've started to look through the file /etc/ppp/ip-up and, well, it's crazy  :Very Happy:  and I'm not really getting too far (though if I sort it, I'll post the answer here!).

Basically... can anyone point me in the right direction/ I assume it'll be do to with confiruing pppd so that it can sort out the DNS and complete the connection, but atm I'm just reading endless docs that aren't helping me much   :Crying or Very sad: 

----------

## Qubax

how do you mean this with the dns sort out?

i have to put a dns ip in my /etc/resolv.conf, otherwise it won't work

----------

## telex4

Hrm, I'll change that when I reboot *again*  :Smile:  I just thought it might be the DNS anyway as that's one of the things pppd fails to report back about

At the moment though I'm suspicious about the ppp0 interface, as it stops just before that... I've been looking at various files associated with pppd to find any references to ppp0 (or lack of in gentoo, where they exist in suse), and I'm just getting myself very confused  :Smile:  For instance I just found /etc/init.d/net.ppp0 which failed to start due to bad configs (tho' wvdial shouldn't need them surely?).

hmm, very confused!

----------

## telex4

Right, after  a bit of fuss I've got pppconfig on, and running it just brings up an error message saying I haven't got "/usrsbin/pppconfig.real" lol so this just gets more fun with every step!!!

I'm sure there must be a very simple explanation for all this, so here's everything I know atm:

kernel modules loaded;

bsd_comp

ppp_generic

ppp_deflate

ppp_async

I previously used a network card, so ifconfig brings up eth0 and no ppp0, tho by the time wvdial grinds to a halt, ppp0 shows up and even shows an IP that looks about right (judging by what I get in suse). Might eth0 cause a problem?

wvdial, well, I've described its behaviour above, but I've now got a little more info by tailing the file /var/log/everything/current , which brought up the following:

```

Sep 28 02:17:17 [pppd] pppd 2.4.1 started by root, uid 0

Sep 28 02:17:17 [pppd] Using interface ppp0

Sep 28 02:17:17 [pppd] Connect: ppp0 <--> /dev/tts/0

Sep 28 02:17:23 [pppd] local  IP address 213.104.112.39

Sep 28 02:17:23 [pppd] remote IP address 213.104.82.221

Sep 28 02:17:23 [pppd] primary   DNS address 194.168.4.100

Sep 28 02:17:23 [pppd] secondary DNS address 194.168.8.100

Sep 28 02:17:47 [pppd] Terminating on signal 15.

Sep 28 02:17:47 [pppd] Connection terminated.

Sep 28 02:17:47 [pppd] Connect time 0.5 minutes.

Sep 28 02:17:47 [pppd] Sent 292 bytes, received 144 bytes.

Sep 28 02:17:47 [pppd] Exit.

```

Signal 15 shows up in the pppd man page as: The link was terminated because  the  peer  is  not responding to echo requests.

If someone has got wvdial working with gentoo (I'm using 1.4rc1), can you please just say what you did?

----------

## Qubax

it won't help you much, i just had to emerge wvdial, add the account and play a bit with this adls,t-online and other provider options to get it work. i was not sure, what those options were exactly meaning, so i decided to go back to the script itself and use wmppp to just start the the pon script (where there is nothing more in it than 

```
pppd call *scriptname*
```

 where scriptname is the name i saved the script in /etc/ppp/peers/*providername*

----------

## telex4

Horray! By moving some files from the portage tree to /usr/sbin, I got pppconfig working, and got it to create the various configs... then after reading your post, I tried what you suggested, and it connected fine! So I suppose now its just a matter of making it more user-friendly than opening a terminal, su-ing to root and running the script   :Very Happy: 

thanks!

----------

## Qubax

to run it as a normal user you have to be able to execute pppd and chat, and read permission to /etc/ppp/peers/*providername* and /etc/chatscripts/*providername*. thats all

----------

## telex4

don't I need to set-up some permissions for the modem device /dev/tts/0 ?

----------

## Qubax

no, i had not

----------

