LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-22-2012, 05:18 PM   #1
fbov
LQ Newbie
 
Registered: Apr 2011
Location: Italy
Distribution: Slackware
Posts: 8

Rep: Reputation: Disabled
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.

Last edited by fbov; 12-22-2012 at 07:08 PM. Reason: correction, wrong exit code
 
Old 12-22-2012, 07:15 PM   #2
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware64/current
Posts: 175

Rep: Reputation: 44
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!
 
Old 12-23-2012, 04:32 AM   #3
fbov
LQ Newbie
 
Registered: Apr 2011
Location: Italy
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by slacktroll View Post
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.
 
Old 12-23-2012, 06:38 AM   #4
lkraemer
Member
 
Registered: Aug 2008
Posts: 113

Rep: Reputation: 10
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

Last edited by lkraemer; 12-23-2012 at 06:59 AM.
 
Old 12-23-2012, 07:45 AM   #5
slacktroll
Member
 
Registered: May 2011
Distribution: Slackware64/current
Posts: 175

Rep: Reputation: 44
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.
 
Old 12-23-2012, 01:19 PM   #6
irgunII
Member
 
Registered: Jan 2012
Location: Directly above the center of the earth
Distribution: Slackware. There's something else?
Posts: 383

Rep: Reputation: 72
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.
 
Old 01-04-2013, 08:14 PM   #7
fbov
LQ Newbie
 
Registered: Apr 2011
Location: Italy
Distribution: Slackware
Posts: 8

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-04-2014, 11:01 AM   #8
manish671
LQ Newbie
 
Registered: Oct 2014
Posts: 1

Rep: Reputation: Disabled
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

Thanks
 
Old 11-06-2014, 12:29 AM   #9
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
Quote:
Originally Posted by manish671 View Post
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

Thanks
Solved thank you
 
  


Reply

Tags
modem, slackware, usb, wvdial



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
Change between 2G/3G modes on a USB stick modem. (Alcatel x220) masmddr Linux - Networking 5 05-01-2011 03:17 AM
Installing an Alcatel USB Modem in Slackware yonski Slackware 0 07-28-2004 02:19 PM
[slackware]alcatel speedtouch 330 usb modem hylke Linux - Newbie 16 06-24-2004 02:21 AM
alcatel usb modem (slackware 9) flump Linux - Hardware 1 08-11-2003 08:15 PM
Slackware and Alcatel USB SpeedTouch Modem... dochyde Slackware 9 09-03-2002 04:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:22 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