wvdial, connection fails with 3G USB modem on slackware, Alcatel X220
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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.
Last edited by fbov; 12-22-2012 at 07:08 PM.
Reason: correction, wrong exit code
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 :-)
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.
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.
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
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)
Last edited by slacktroll; 12-23-2012 at 08:20 AM.
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.
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.
Although this is an old thread but many persons may be landing here. Earlier with Ubuntu 12.04 I was using NM after installing libhuawei_ec325. But in 14.04 it does'nt installs so I am back to wvdial. Following worked for me for huawei EC_325 in Ubuntu 14.04. Service Provider is TATA INDICOM .
1. In terminal $sudo wvdialconf /etc/wvdial.conf
which will detect the modem and installs it for internet connection.
2 Now edit the file $gedit /etc/wvdial.conf
which will open the configuration file as shown below.
3. Make the following changes in the configuration file.
o Delete the semi colon before last three lines phone, username, password
o Enter phone no, username and password. For TATA it isa #777,internet,internet.
o add this 2 extra lines in the configuration file at the last
Init3 = AT+CRM=1
Stupid Mode = 1
Final File is like this
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Modem = /dev/ttyUSB0
Baud = 9600
New PPPD = yes
Init3 = AT+CRM=1
Stupid Mode = 1
ISDN = 0
Phone = #777
Password = internet
Username = internet
4. However if wvdial gives message "Modem not responding" then we have to adjust
Modem = /dev/ttyUSB?
to find the correct mount point
a)manually connect and disconnect the modem from computer then check file /var/log/syslog
b)$ dmesg | grep -i modem
c)file /var/log/wvdialconf.log
Although this is an old thread but many persons may be landing here. Earlier with Ubuntu 12.04 I was using NM after installing libhuawei_ec325. But in 14.04 it does'nt installs so I am back to wvdial. Following worked for me for huawei EC_325 in Ubuntu 14.04. Service Provider is TATA INDICOM .
1. In terminal $sudo wvdialconf /etc/wvdial.conf
which will detect the modem and installs it for internet connection.
2 Now edit the file $gedit /etc/wvdial.conf
which will open the configuration file as shown below.
3. Make the following changes in the configuration file.
o Delete the semi colon before last three lines phone, username, password
o Enter phone no, username and password. For TATA it isa #777,internet,internet.
o add this 2 extra lines in the configuration file at the last
Init3 = AT+CRM=1
Stupid Mode = 1
Final File is like this
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Modem = /dev/ttyUSB0
Baud = 9600
New PPPD = yes
Init3 = AT+CRM=1
Stupid Mode = 1
ISDN = 0
Phone = #777
Password = internet
Username = internet
4. However if wvdial gives message "Modem not responding" then we have to adjust
Modem = /dev/ttyUSB?
to find the correct mount point
a)manually connect and disconnect the modem from computer then check file /var/log/syslog
b)$ dmesg | grep -i modem
c)file /var/log/wvdialconf.log
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.