LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-05-2017, 11:58 AM   #1
wyz42
LQ Newbie
 
Registered: May 2017
Posts: 4

Rep: Reputation: Disabled
Wvdial fails to connect pppd


Hi,

I got a puzzle I can't figure out : I have two Rpis, but only one is able to connect to internet using an Huawei E220 modem.

For both I use the same wvdial configuration file :

Code:
[Dialer orange]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init4 = AT+CGDCONT=1,"IP","orange.m2m.spec"
Stupid mode = 1
Auto DNS = 1
Modem Type = Analog Modem
ISDN = 0
New PPPD = yes
Dial Attempt = 4
Phone = *99#
Modem = /dev/ttyUSB1
Username = orange
Password = orange
Baud = 9600

[Dialer pin]
Init1 = AT+CPIN=0000
Baud = 9600
Modem = /dev/ttyUSB1

The rpi with the kernel version :
Code:
Linux raspberrypi 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux
is working properly.

The other is returning an error :
Code:
sudo wvdial orange
--> WvDial: Internet dialer version 1.61
--> 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
--> Sending: AT+CGDCONT=1,"IP","orange.m2m.spec"
AT+CGDCONT=1,"IP","orange.m2m.spec"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Fri May  5 15:32:45 2017
--> Pid of pppd: 1272
--> Using interface ppp0
--> pppd: ���v
--> pppd: ���v
--> pppd: ���v
--> pppd: ���v
--> pppd: ���v
--> pppd: ���v
--> pppd: ���v
--> Disconnecting at Fri May  5 15:33:16 2017
--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> man pppd explains pppd error codes in more detail.
--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.
--> Auto Reconnect will be attempted in 5 seconds
--> 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
--> Sending: AT+CGDCONT=1,"IP","orange.m2m.spec"
AT+CGDCONT=1,"IP","orange.m2m.spec"
OK
--> Modem initialized.
--> 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
--> Sending: AT+CGDCONT=1,"IP","orange.m2m.spec"
AT+CGDCONT=1,"IP","orange.m2m.spec"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
^BOOT:64069862,0,0,0,6
^BOOT:64069862,0,0,0,6
^BOOT:64069862,0,0,0,6
^RSSI:14
^BOOT:64069862,0,0,0,6
^BOOT:64069862,0,0,0,6
^BOOT:64069862,0,0,0,6
^BOOT:64069862,0,0,0,6
^BOOT:64069862,0,0,0,6
^BOOT:64069862,0,0,0,6
^BOOT:64069862,0,0,0,6
^CCaught signal 2:  Attempting to exit gracefully...
--> Disconnecting at Fri May  5 15:37:59 2017
The var/log/message content is not really inspiring me :

Code:
May  5 15:53:24 raspberrypi pppd[3196]: pppd 2.4.6 started by root, uid 0
May  5 15:53:24 raspberrypi pppd[3196]: Using interface ppp0
May  5 15:53:24 raspberrypi pppd[3196]: Connect: ppp0 <--> /dev/ttyUSB1
May  5 15:53:54 raspberrypi pppd[3196]: LCP: timeout sending Config-Requests
May  5 15:53:54 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Fri May  5 15:54:24 2017 [try http://www.rsyslog.com/e/2007 ]
May  5 15:53:54 raspberrypi pppd[3196]: Connection terminated.
May  5 15:53:54 raspberrypi pppd[3196]: Receive serial link is not 8-bit clean:
May  5 15:53:54 raspberrypi pppd[3196]: Problem: all had bit 7 set to 0
May  5 15:53:54 raspberrypi pppd[3196]: Modem hangup
May  5 15:53:54 raspberrypi pppd[3196]: Exit.
Any guess/hints is more than welcome !

I checked various config files from ppp/options,interfaces,lsusb without much luck.
The only difference I was able to make between the two is the kernel version
4.1.11 (ok) vs 4.1.19 (not working) [edit : I tested also 4.9.25, still not working]
and the firware version
may 2016 (ok) vs may 2017 (not working)

Best regards !

[edit : fixed typo in firware revision which is no working]

Last edited by wyz42; 05-09-2017 at 04:04 AM.
 
Old 05-08-2017, 12:28 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,315

Rep: Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538
Quote:
Originally Posted by wyz42 View Post
Hi,

Code:
May  5 15:53:24 raspberrypi pppd[3196]: Connect: ppp0 <--> /dev/ttyUSB1
May  5 15:53:54 raspberrypi pppd[3196]: LCP: timeout sending Config-Requests
Your modem is sending a Config-Request to the other modem and not receiving a reply within 30 seconds. That probably means that the other modem either did not receive the request or thought it was noise. Perhaps your kernel USB modem is creating a malformed or non existent Config-Request.

Did you compile your own kernel? If so then check to make sure that the USB modem options for kernel 4.1.19 are the same as the USB modem options you set for kernel 4.1.11.


-----------------------
Steve Stites

Last edited by jailbait; 05-08-2017 at 05:01 PM.
 
Old 05-09-2017, 03:54 AM   #3
wyz42
LQ Newbie
 
Registered: May 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
hi,

nope, i did not compile my own kernel, I take out the box raspbian linux.
I checked the drivers and they seems the same to me (usb-devices output are strictly the same, printed below). How can I check which modem options where used ? is that the stty command ?

Code:
usb-devices 

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 12 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=1003 Rev=00.00
S:  Manufacturer=HUAWEI Technologies
S:  Product=HUAWEI Mobile
C:  #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#= 2 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
stty
 
Old 05-09-2017, 12:07 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,315

Rep: Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538
Quote:
Originally Posted by wyz42 View Post
How can I check which modem options where used ? is that the stty command ?
The remote modem is ignoring the "handshaking" request which begins the process of the two modems agreeing on what line speed etc. to talk together with. After 30 seconds of no response your modem is timing out. I suspect that the newer kernel driver or newer firmware is generating an invalid command to send to the remote modem. Back in the day I would attach a diagnostic machine to the line and it would display the actual commands and data on the line as it happened. Without that equipment the best that I can tell you is to try to display the bad traffic by following this diagnostic guide:

http://pptpclient.sourceforge.net/howto-diagnosis.phtml

The section that is pertinent to your timeout problem is:

http://pptpclient.sourceforge.net/ho...ml#ccp_timeout

--------------------
Steve Stites

P.S. In the diagnostic tutorial their example shows that the two modems were not in agreement on the encryption protocol.

Last edited by jailbait; 05-09-2017 at 12:12 PM.
 
Old 05-10-2017, 04:12 AM   #5
wyz42
LQ Newbie
 
Registered: May 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
thanks for you help, I will investigate the pppd logs (so far nothing was showing up, even following the links you provided, I'll try harder).

Do you yhink this is woth to submit as a "bug" as it was working on previous version of the drivers ?
 
Old 05-10-2017, 10:45 AM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,315

Rep: Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538
Quote:
Originally Posted by wyz42 View Post
thanks for you help, I will investigate the pppd logs (so far nothing was showing up, even following the links you provided, I'll try harder).

Do you yhink this is woth to submit as a "bug" as it was working on previous version of the drivers ?
I suggest that you set up a test with the last kernel that worked and using your current firmware and pppd configuration. If that works OK then you should report a bug in the latest version of the driver.

If that test does not work then the bug is in either your pppd configuration or the latest version of your firmware. In that case you could try running the latest kernel, your old pppd configuration and the latest firmware. This test would show whether or not the bug is in your pppd configuration.



---------------------
Steve Stites
 
Old 05-15-2017, 05:46 AM   #7
wyz42
LQ Newbie
 
Registered: May 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
ok, found a combination of kernel / firmware that works :
4.4.50-v7+ #970

the configuration file provided in the begining is valid. If you read this out of despear, just think to update operator specific entry lines of the wvdial conf.
(Init4 apn, username, password and stupid mode)

thanks for your reply, marked as solved !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pppd/wvdial chidley Linux - Desktop 1 02-02-2011 02:09 PM
wvdial-pppd problem with earthlink Geocritter Linux - Networking 7 07-19-2005 08:23 AM
wvdial and pppd exit code 10 Hal Linux - Networking 5 07-08-2004 12:43 PM
pppd(wvdial) problem nakkaya Linux - Networking 3 06-23-2003 04:19 AM
pppd/wvdial permission probs Heinz Linux - Networking 2 03-16-2003 12:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration