LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Slackware (http://www.linuxquestions.org/questions/forumdisplay.php?f=14)
-   -   wvdial, connection fails with 3G USB modem on slackware, Alcatel X220 (http://www.linuxquestions.org/questions/showthread.php?t=4175442601)

maladomini 12-22-2012 05:18 PM

wvdial, connection fails with 3G USB modem on slackware, Alcatel X220
 
Hello everyone,

I installed usb_modeswitch, wvdial, wvstreams on Slackware 14. Following some articles I found online I managed to configure and connect, but then the connection breaks without assigning me an IP:

Code:

root@maladominia:~# wvdial Wind
--> 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: ATE1+CGDCONT=1,"IP","internet.wind"
ATE1+CGDCONT=1,"IP","internet.wind"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT 7200000
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Sat Dec 22 12:52:37 2012
--> Pid of pppd: 2440
--> Using interface ppp0
--> pppd: P{[0c] [06] [01]
--> pppd: P{[0c] [06] [01]
--> pppd: P{[0c] [06] [01]
--> pppd: P{[0c] [06] [01]
--> pppd: P{[0c] [06] [01]
--> Disconnecting at Sat Dec 22 12:53:08 2012
--> 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
^CCaught signal 2:  Attempting to exit gracefully...
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.
--> Disconnecting at Sat Dec 22 12:53:18 2012

The modem wouldn't answer anyway, that's why I pressed CTRL-C. Afterwards I have to unplug and replug the modem in order to have it respond again, for example to issue commands with minicom.

Code:

root@maladominia:~# wvdial Wind
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.

This is the relevant content of /var/log/messages:

Code:

Dec 22 12:52:24 maladominia kernel: [ 1089.584023] usb 1-3: new high-speed USB device number 7 using ehci_hcd
Dec 22 12:52:25 maladominia kernel: [ 1089.700803] usb 1-3: New USB device found, idVendor=1bbb, idProduct=0017
Dec 22 12:52:25 maladominia kernel: [ 1089.700806] usb 1-3: New USB device strings: Mfr=3, Product=2, SerialNumber=4
Dec 22 12:52:25 maladominia kernel: [ 1089.700808] usb 1-3: Product: HSPA Data Card
Dec 22 12:52:25 maladominia kernel: [ 1089.700810] usb 1-3: Manufacturer: USBModem
Dec 22 12:52:25 maladominia kernel: [ 1089.700811] usb 1-3: SerialNumber: 1234567890ABCDEF
Dec 22 12:52:25 maladominia kernel: [ 1089.702990] option 1-3:1.0: GSM modem (1-port) converter detected
Dec 22 12:52:25 maladominia kernel: [ 1089.703064] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB0
Dec 22 12:52:25 maladominia kernel: [ 1089.703139] option 1-3:1.1: GSM modem (1-port) converter detected
Dec 22 12:52:25 maladominia kernel: [ 1089.703187] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB1
Dec 22 12:52:25 maladominia kernel: [ 1089.703262] option 1-3:1.2: GSM modem (1-port) converter detected
Dec 22 12:52:25 maladominia kernel: [ 1089.703312] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB2
Dec 22 12:52:25 maladominia kernel: [ 1089.703387] option 1-3:1.3: GSM modem (1-port) converter detected
Dec 22 12:52:25 maladominia kernel: [ 1089.703433] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB3
Dec 22 12:52:25 maladominia kernel: [ 1089.703526] scsi15 : usb-storage 1-3:1.4
Dec 22 12:52:25 maladominia kernel: [ 1089.703642] option 1-3:1.5: GSM modem (1-port) converter detected
Dec 22 12:52:25 maladominia kernel: [ 1089.703704] usb 1-3: GSM modem (1-port) converter now attached to ttyUSB4
Dec 22 12:52:25 maladominia mtp-probe: checking bus 1, device 7: "/sys/devices/pci0000:00/0000:00:02.1/usb1/1-3"
Dec 22 12:52:25 maladominia mtp-probe: bus: 1, device: 7 was not an MTP device
Dec 22 12:52:25 maladominia logger: usb_modeswitch: switched to 1bbb:0017 on 001/007
Dec 22 12:52:26 maladominia kernel: [ 1090.706321] scsi 15:0:0:0: Direct-Access    ALCATEL  Mass Storage    2.31 PQ: 0 ANSI: 2
Dec 22 12:52:26 maladominia kernel: [ 1090.709311] sd 15:0:0:0: [sdc] Attached SCSI removable disk
Dec 22 12:52:37 maladominia pppd[2440]: pppd 2.4.5 started by root, uid 0
Dec 22 12:52:37 maladominia pppd[2440]: Using interface ppp0
Dec 22 12:52:37 maladominia pppd[2440]: Connect: ppp0 <--> /dev/ttyUSB3
Dec 22 12:53:08 maladominia pppd[2440]: Connection terminated.
Dec 22 12:53:08 maladominia pppd[2440]: Modem hangup
Dec 22 12:53:08 maladominia pppd[2440]: Exit.

This is the automated wvdialconf wvdial.conf output:

Code:

[Dialer Defaults]
[Dialer Wind]
New PPPD = yes
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = ATE1+CGDCONT=1,"IP","internet.wind"
Modem Type = USB Modem
Carrier Check = off
Stupid Mode = on
; Phone = <Target Phone Number>
Phone = *99#
ISDN = 0
; Username = <Your Login Name>
Username = not_required
Init1 = ATZ
; Password = <Your Password>
Password = not_required
Modem = /dev/ttyUSB3
Baud = 9600

I added Carrier Check = off and Stupid Mode = on, plus defined the Init3 apn configuration. The baud rate is low, I tried also with 921600 as seen in another forum post, but the result is the same.

Exit code 16: The link was terminated by the modem hanging up.

I don't think I should issue a usb_modeswitch string since the modem answers already on /dev/ttyUSB3 (for example trying with minicom).

I added nameservers to resolv.conf, but it doesn't solve the problem.

I have seen several other posts regarding wvdial and 3G USB modems, none of which solves my problem.

Any idea?

Thanks in advance.

slacktroll 12-22-2012 07:15 PM

minicom -D /dev/ttyUSB3
AT+CFUN?
+CFUN: 4
Means modem is offline.
AT+CFUN=1
+CFUN=1
Now modem is online.
Press CTRL +A + Q to quit. (use xterm if in doubt)

However i strongly recommend you to use slackware's builtin pppconfig instead.
If you for some reason got a new slack installation, and don't have wvdial and in case of power outage and no wvdial package exists. then you're out of luck.

Make sure that the apn is correct.

i use Init2 = AT+CGDCONT=1,"IP","internet.blabla.se"
maybe not same modem :-)

Good luck!

maladomini 12-23-2012 04:32 AM

Quote:

Originally Posted by slacktroll (Post 4855219)
minicom -D /dev/ttyUSB3
AT+CFUN?
+CFUN: 4
Means modem is offline.
AT+CFUN=1
+CFUN=1
Now modem is online.
Press CTRL +A + Q to quit. (use xterm if in doubt)

However i strongly recommend you to use slackware's builtin pppconfig instead.
If you for some reason got a new slack installation, and don't have wvdial and in case of power outage and no wvdial package exists. then you're out of luck.

Make sure that the apn is correct.

i use Init2 = AT+CGDCONT=1,"IP","internet.blabla.se"
maybe not same modem :-)

Good luck!

Hello and thanks for your answer. Unfortunately this doesn't solve my problem. The modem is completely locked after I attempt to connect, so I have to unplug and replug it to have another try.

My problem is that after detecting the carrier, the pppd doesn't assign an IP (as I have seen in other logs when everything works as it should).

I have tried to add udev rules with usb_modeswitch but nothing changes. In another forum someone succeeded in making it work, with ubuntu, I tried to replicate the procedure without any success. They identified the modem as an X225S, but my modem is packaged as X220, even if the ROM says Vendor=0x1bbb Product=0x0017 as with the X225S... tried both to be sure. Nothing works.

Also for some reason I don't have pppconfig in my Slackware 14 fresh installation.

lkraemer 12-23-2012 06:38 AM

You will need your userlogin, password, ISP provider information, and pap or chap information for the connection.
(You can set up pap and then chap, if pap doesn't work.) Basically you just answer the questions that are presented.
You can delete a configurations and start over if you need to from the menu selections.

For more information try:
Code:

man pppd
man pppconfig


I know this information is from a different Distro, but it has some logical steps that you should follow:
https://help.ubuntu.com/community/ADSLPPPoE

First thing it suggests is to execute:
pppoeconf via:
Code:

sudo pppoeconf
and set up the "/etc/ppp/chap-secrets" or "/etc/ppp/pap-secrets" file. The Slackware file location and format might
be different format or at a different location.

Step two would be to try "pon" & "poff" (so if wvdial isn't an option you can still connect) which makes the following
statement false:
Quote:

If you for some reason got a new slack installation, and don't have wvdial and in case of power outage and
no wvdial package exists. then you're out of luck.
Code:

pon


poff

Typical dropped connections by pppd are for invalid username and/or password. VERIFY those first.

Once "pon" & "poff" are working then re-configure wvdial, and test wvdial.
Code:

sudo wvdialconf /etc/wvdial.conf
Your wvdial.conf will be something in the order of: (but this was an old config of mine for Dialup, so it's not totally correct)
Code:

[Dialer Defaults]
Auto DNS = yes
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 48800
New PPPD = yes
Stupid mode = yes
;carrier check = no
Modem = /dev/ttyACM0
ISDN = 0
Phone = 4460568
Password = yourpassword
Username = yourusername@yourisp.net

Verify the above items with yours.


REF's:
wvdial.conf info:
http://linux.die.net/man/5/wvdial.conf

PPP HOWTO:
http://tldp.org/HOWTO/PPP-HOWTO/index.html

PAP-SECRETS info:
http://tldp.org/HOWTO/PPP-HOWTO/x1034.html

CHAP-SECRETS info:
http://tldp.org/HOWTO/PPP-HOWTO/x1053.html

Setting up PPP Manually
http://tldp.org/HOWTO/PPP-HOWTO/manual.html

wvdial info:
http://en.wikipedia.org/wiki/Wvdial
http://support.real-time.com/linux/dialup/wvdial.html
http://tldp.org/HOWTO/PPP-HOWTO/x314.html
http://www.squarebox.co.uk/cgi-squar.../wvdial.conf.5


Thanks.

Larry

slacktroll 12-23-2012 07:45 AM

ok op. i'm sorry i can't find out how i set it up all the way with pppsetup.

if you want to debug the hole process. just open minicom and run the appropiate commands.

eg

minicom -D /dev/ttyUSB3
AT+CFUN?
AT+CFUN=1
*BLABLA <- online
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
AT+CGDCONT=1,"IP","internet.blabla.bla" <- this MUST be correct
OK
ATDT *99# <- dial modem
- now modem will dail the ISP.
Once connected write
CONNECT
#@%(&#*$@#${$#@_$(#@)$@} <- something like this will come up

If this succeeds then it means your 3g modem working.
My approach is to manualy setup the modem myself with

AT+CFUN=1
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
AT+CGDCONT=1,"IP","internet.blabla.bla" <- this MUST be correct

part myself in minicom.
after that i close minicom and run ppp-go with THIS
Code:

/etc/ppp/pppsetup.conf
TIMEOUT 60
ABORT ERROR
ABORT BUSY
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
"" "atdt*99#"
TIMEOUT 75
CONNECT

file. (obvious pppsetup is already configured but this file is changed)

irgunII 12-23-2012 01:19 PM

Wvdial never worked for me. I always used kppp. Are you sure you have the drivers for that particular modem? If they're not there and you can afford it, get a Zoom usb modem - worked right out of the box for me, model 3905.

maladomini 01-04-2013 08:14 PM

Thanks to everyone who tried to help me. NOTHING WORKED: wvdial is crap. NetworkManager worked smoothly instead, so now I'm forced to use KDE since nm-applet crashed with a Segmentation Fault error. Anyway at least I can connect to the internet with Slackware. Cheers.


All times are GMT -5. The time now is 06:54 PM.