Linux: WVDIAL [Dialer Configuration] for 3G Cards

Tazz_Tux

Linux Guru
Joined
Jan 28, 2005
Messages
622
Once your card is up and running you need something to do the dial with. I use wvdial so here is the mini-mini-howto on using it. :)

edit /etc/wvdial.conf to look like this:

Code:
[Dialer Defaults]

Phone = *99***1#
Username = name
Password = surname
Stupid Mode = 1
Dial Command = ATDT

[Dialer novatel]
Modem = /dev/ttyS0
Baud = 460800
Init1 = ATZ
Init2 = ATE0V1&D2&C1S0=0+IFC=2,2
ISDN = 0
Modem Type = Analog Modem

[Dialer option]

Modem = /dev/ttyUSB0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem

[Dialer onboard]

Modem = /dev/ttySHSF0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem

[Dialer internet]

Init4 = AT+CGDCONT=1,"IP","internet";

[Dialer internetvpn]

Init4 = AT+CGDCONT=1,"IP","internetvpn";

[Dialer myapn]

Init4 = AT+CGDCONT=1,"IP","myapn"

[Dialer 384k]

Init5 = AT+CGEQMIN=1,4,64,384,64,384
Init6 = AT+CGEQREQ=1,4,64,384,64,384

[Dialer 144k]

Init5 = AT+CGEQMIN=1,4,64,144,64,144
Init6 = AT+CGEQREQ=1,4,64,144,64,144

[Dialer 64k]

Init5 = AT+CGEQMIN=1,4,64,64,64,64
Init6 = AT+CGEQREQ=1,4,64,64,64,64

[Dialer 2gonly]

Init3 = AT+COPS=0,0,"Vodacom-SA",0

[Dialer 3gonly]

Init3 = AT+COPS=0,0,"Vodacom-SA",2

This will setup both cards on the first ports, you might have to change the ports to suite your needs :)

To start the dialing, you can use commandline or any applet that will "fake" it

Code:
wvdial novatel internet 3gonly 384k
wvdial option internet 3gonly 384k

That will dial the two cards to the net at full speed.

Hope this helps !!!
 
Last edited:

agentpt

Active Member
Joined
Jan 25, 2005
Messages
43
Hey Tazz_Tux,

Ok, I have created the file /etc/wvdial.conf and copied your code exactly across. I'm not sure if username and password should be 3g number and pin, I assume at some point these will have to be entered somewhere,(Pls forgive stupid questions, as like I said I'm really new to Linux), but I left the code exactly as is.

I then opened a terminal and typed the the comand "wvdial"

I get these three lines back

WvDial: Internet dialer version 1.54.0
Cannot open /dev/modem: No such file or directory
Cannot open /dev/modem: No such file or directory
Cannot open /dev/modem: No such file or directory

Any suggestions as to what to do?
 

Tazz_Tux

Linux Guru
Joined
Jan 28, 2005
Messages
622
agentpt said:
Hey Tazz_Tux,

Ok, I have created the file /etc/wvdial.conf and copied your code exactly across. I'm not sure if username and password should be 3g number and pin, I assume at some point these will have to be entered somewhere,(Pls forgive stupid questions, as like I said I'm really new to Linux), but I left the code exactly as is.

I then opened a terminal and typed the the comand "wvdial"

I get these three lines back

WvDial: Internet dialer version 1.54.0
Cannot open /dev/modem: No such file or directory
Cannot open /dev/modem: No such file or directory
Cannot open /dev/modem: No such file or directory

Any suggestions as to what to do?

Howzit,

Try "wvdial option internet 3gonly 384k"

laterz !
 

agentpt

Active Member
Joined
Jan 25, 2005
Messages
43
Tazz_Tux said:
Howzit,

Try "wvdial option internet 3gonly 384k"

laterz !

Hi Tazz_Tux,

My post seems to have disappeared of nthis thread for some reason, so here it is again; I went through the whole procedure again and this is what I got:

(In the console where I did the wvdial option internet 3gonly 384k command)

--> WvDial: Internet dialer version 1.54.0
--> 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+COPS=0,0,"Vodacom-SA",2
AT+COPS=0,0,"Vodacom-SA",2
OK
--> Sending: AT+CGDCONT=1,"IP","internet";
AT+CGDCONT=1,"IP","internet";
OK
--> Sending: AT+CGEQMIN=1,4,64,384,64,384
AT+CGEQMIN=1,4,64,384,64,384
OK
--> Sending: AT+CGEQREQ=1,4,64,384,64,384
AT+CGEQREQ=1,4,64,384,64,384
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT 57600
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu May 12 11:29:34 2005
--> pid of pppd: 7606
--> Using interface ppp0
--> pppd: l Command
--> pppd: l Command
--> pppd: l Command
--> pppd: l Command
--> pppd: l Command
--> Disconnecting at Thu May 12 11:30:16 2005
--> The PPP daemon has died: PPP negotiation failed (exit code = 10)
--> man pppd explains pppd error codes in more detail.
--> I guess that's it for now, exiting
--> The PPP daemon has died. (exit code = 10)

(In the tail -f/var/log/messages terminal)

May 12 11:29:34 localhost kernel: PPP generic driver version 2.4.2
May 12 11:29:39 localhost pppd[7606]: pppd 2.4.2 started by root, uid 0
May 12 11:29:39 localhost pppd[7606]: Using interface ppp0
May 12 11:29:39 localhost pppd[7606]: Connect: ppp0 <--> /dev/ttyUSB0
May 12 11:29:39 localhost pppd[7606]: CHAP authentication succeeded
May 12 11:29:39 localhost kernel: PPP BSD Compression module registered
May 12 11:29:39 localhost kernel: PPP Deflate Compression module registered
May 12 11:30:09 localhost pppd[7606]: IPCP: timeout sending Config-Requests
May 12 11:30:15 localhost pppd[7606]: Connection terminated.
May 12 11:30:15 localhost pppd[7606]: Exit.
 

pevans

Active Member
Joined
Mar 5, 2005
Messages
83
WhooHoo!

A BIG shout out to Tazz for this super cool script.

I'm a Linux newbie, but with this script I had my Novatel card online in no time at all.

HOORAY! :D

Thanks Tazz!
 

vodacom3g

Vodacom Representative
Joined
Jan 14, 2005
Messages
12,065
Tazz_Tux, can the forum ask you to put together a single doc, thread that collates all the various Linux issues into one place? Is something like this possible?

As the resident 3G / Linux guru, your help is greatly appreciated!

I can then merge it into the FAQ.

ic, another option would be to make the link in the FAQ do a google in the forum?

What would you suggest?
 

Tazz_Tux

Linux Guru
Joined
Jan 28, 2005
Messages
622
vodacom3g said:
Tazz_Tux, can the forum ask you to put together a single doc, thread that collates all the various Linux issues into one place? Is something like this possible?

As the resident 3G / Linux guru, your help is greatly appreciated!

I can then merge it into the FAQ.

ic, another option would be to make the link in the FAQ do a google in the forum?

What would you suggest?

Hey v3g,

Will try and get on it :)

Laterz
 

ic

MyBroadband
Super Moderator
Joined
Nov 8, 2004
Messages
14,805
vodacom3g said:
Tazz_Tux, can the forum ask you to put together a single doc, thread that collates all the various Linux issues into one place? Is something like this possible?

As the resident 3G / Linux guru, your help is greatly appreciated!

I can then merge it into the FAQ.

ic, another option would be to make the link in the FAQ do a google in the forum?

What would you suggest?
Something like this:

Google for Linux related 3G data card threads: +site:mybroadband.co.za +vodacom +"3g" +linux +data +card

Google for Linux related 3G Novatel data card threads: +site:mybroadband.co.za +vodacom +"3g" +linux +novatel

Google for Linux related 3G Option data card threads: +site:mybroadband.co.za +vodacom +"3g" +linux +option

Still too many results on each of those searches, but they could be refined better than I've cobbled together there :).
Tazz_Tux said:
Hey v3g,

Will try and get on it :)

Laterz
TT, the forum will most certainly appreciate it - you've definitely earned forum-cred as the goto guy for Linux...:D

My advice though - approach this as a work in progress, a separate tutorial type thread would be great, let me know if I can help with anything :).
 
Last edited:

jean

New Member
Joined
Dec 10, 2005
Messages
3
IPCP: timeout -- solution?

agentpt said:
May 12 11:30:09 localhost pppd[7606]: IPCP: timeout sending Config-Requests
May 12 11:30:15 localhost pppd[7606]: Connection terminated.
May 12 11:30:15 localhost pppd[7606]: Exit.

I get stuck at the same place. Have you found a fix?

Any advice would be veeeeery appreciated.
 

feppa

New Member
Joined
Sep 18, 2006
Messages
4
Hey. I have a Huawei e620 card and i have trouble with "Invalid dial command." as you see below. Is there a list of avaiable dial commands? I'm not sure thats wrong.

fredrik@mars:/etc$ wvdial
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Modem initialized.
--> Sending: ATDT#99*
--> Waiting for carrier.
ATDT#99*
ERROR
--> Invalid dial command.
--> Disconnecting at Mon Sep 18 18:47:09 2006
fredrik@mars:/etc$ wvdial
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
ERROR
--> Invalid dial command.
--> Disconnecting at Mon Sep 18 18:50:47 2006
 

Tazz_Tux

Linux Guru
Joined
Jan 28, 2005
Messages
622
Hey Feppa,

It's because you havn't set the APN to use. have a look at the other Linux thread and you will find my file there. I think the command is something like AT+CGDCONT=1,"IP","internet";

Laterz !

Hey. I have a Huawei e620 card and i have trouble with "Invalid dial command." as you see below. Is there a list of avaiable dial commands? I'm not sure thats wrong.

fredrik@mars:/etc$ wvdial
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Modem initialized.
--> Sending: ATDT#99*
--> Waiting for carrier.
ATDT#99*
ERROR
--> Invalid dial command.
--> Disconnecting at Mon Sep 18 18:47:09 2006
fredrik@mars:/etc$ wvdial
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
ERROR
--> Invalid dial command.
--> Disconnecting at Mon Sep 18 18:50:47 2006
 
Last edited:

feppa

New Member
Joined
Sep 18, 2006
Messages
4
Hey! Thanx for the reply. I'm not sure where to put that code. My wvdail.conf looks like this.

[Dialer Defaults]
Phone = *99***1#
Username = username
Password = password
Stupid Mode = 1
Dial Command = ATDT

[Dialer pin]

Init1 = AT+CPIN=7304



[Dialer option]

Modem = /dev/ttyUSB1
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem

[Dialer 2gonly]

Init4 = AT+COPS=0,0,"Telia",0

[Dialer 3gonly]

Init4 = AT+COPS=0,0,"Telia",2

[Dialer internet]

Init5 = AT+CGDCONT=1,"IP","internet";

[Dialer internetvpn]

Init5 = AT+CGDCONT=1,"IP","internetvpn";

[Dialer myapn]

Init5 = AT+CGDCONT=1,"IP","myapn"

[Dialer 384k]

Init6 = AT+CGEQMIN=1,4,64,384,64,384
Init7 = AT+CGEQREQ=1,4,64,384,64,384

[Dialer 144k]

Init6 = AT+CGEQMIN=1,4,64,144,64,144
Init7 = AT+CGEQREQ=1,4,64,144,64,144

[Dialer 64k]

Init6 = AT+CGEQMIN=1,4,64,64,64,64
Init7 = AT+CGEQREQ=1,4,64,64,64,64

In the begining it says "phone" am i supposed to use the default one or *99# as i show up in Windows networkconnections?
 

feppa

New Member
Joined
Sep 18, 2006
Messages
4
Oki u mean the 3G file :) I forgot about that!

I have tested with different solutions and think im getting closer now i get:

fredrik@mars:~$ /etc/3g.sh
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=7304
AT+CPIN=7304
OK
--> Modem initialized.
--> Sending: *99#
--> Waiting for carrier.
--> Timed out while dialing. Trying again.



My 3g.sh looks like this:

wvdial pin && wvdial internet 3gonly 2gonly 384k

and my wvdial looks like this:

[Dialer Defaults]
Phone = *99#
Stupid Mode = 1
Username = username
Password = password
Dial Command =

[Dialer pin]

Init1 = AT+CPIN=7304



[Dialer option]

Modem = /dev/ttyUSB0
Baud = 460800
Init2 =
Init3 =
ISDN = 0
Modem Type = Analog Modem

[Dialer 2gonly]

Init4 = AT+COPS=0,0,"Telia",0

[Dialer 3gonly]

Init4 = AT+COPS=0,0,"Telia",2

[Dialer internet]

Init5 = AT+CGDCONT=1,"IP","internet";

[Dialer internetvpn]

Init5 = AT+CGDCONT=1,"IP","internetvpn";

[Dialer myapn]

Init5 = AT+CGDCONT=1,"IP","myapn"

[Dialer 384k]

Init6 = AT+CGEQMIN=1,4,64,384,64,384
Init7 = AT+CGEQREQ=1,4,64,384,64,384

[Dialer 144k]

Init6 = AT+CGEQMIN=1,4,64,144,64,144
Init7 = AT+CGEQREQ=1,4,64,144,64,144

[Dialer 64k]

Init6 = AT+CGEQMIN=1,4,64,64,64,64
Init7 = AT+CGEQREQ=1,4,64,64,64,64


Any ideas?
 

Tazz_Tux

Linux Guru
Joined
Jan 28, 2005
Messages
622
Hi

make your 3g.sh file just:

wvdial pin && wvdial internet 3gonly 384k

Oki u mean the 3G file :) I forgot about that!

I have tested with different solutions and think im getting closer now i get:

fredrik@mars:~$ /etc/3g.sh
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=7304
AT+CPIN=7304
OK
--> Modem initialized.
--> Sending: *99#
--> Waiting for carrier.
--> Timed out while dialing. Trying again.



My 3g.sh looks like this:

wvdial pin && wvdial internet 3gonly 2gonly 384k

and my wvdial looks like this:

[Dialer Defaults]
Phone = *99#
Stupid Mode = 1
Username = username
Password = password
Dial Command =

[Dialer pin]

Init1 = AT+CPIN=7304



[Dialer option]

Modem = /dev/ttyUSB0
Baud = 460800
Init2 =
Init3 =
ISDN = 0
Modem Type = Analog Modem

[Dialer 2gonly]

Init4 = AT+COPS=0,0,"Telia",0

[Dialer 3gonly]

Init4 = AT+COPS=0,0,"Telia",2

[Dialer internet]

Init5 = AT+CGDCONT=1,"IP","internet";

[Dialer internetvpn]

Init5 = AT+CGDCONT=1,"IP","internetvpn";

[Dialer myapn]

Init5 = AT+CGDCONT=1,"IP","myapn"

[Dialer 384k]

Init6 = AT+CGEQMIN=1,4,64,384,64,384
Init7 = AT+CGEQREQ=1,4,64,384,64,384

[Dialer 144k]

Init6 = AT+CGEQMIN=1,4,64,144,64,144
Init7 = AT+CGEQREQ=1,4,64,144,64,144

[Dialer 64k]

Init6 = AT+CGEQMIN=1,4,64,64,64,64
Init7 = AT+CGEQREQ=1,4,64,64,64,64


Any ideas?
 

hamish2014

New Member
Joined
Jan 4, 2016
Messages
2
Working Configuration

Hi Folks,

I successfully used wvdial to connect the internet using my
- Huawei E3131 usb stick (modem) with an
- Afrihost data sim on my
- Linux (Ubuntu 14.04) system
as follows

  1. Install the Linux drivers on the Huawei USB stick, from bash
    hamish@hamish-pc: /media/hamish/Mobile Partner/Linux$ sudo bash install
  2. install wvdial, on Debian like system
    hamish@hamish-pc: ~/ sudo apt-get install wvdial
  3. configure wvdial,
    - hamish@hamish-pc: ~/ sudo wvdialconf,
    as discussed on http://support.real-time.com/linux/dialup/wvdial.html
    - change the following parameters
    Phone = *99#
    Username = none
    Password = none
    Baud = 3600000
  4. run wvdial
    hamish@hamish-pc: ~/ sudo wvdial


That worked for me. (strangely i did not need to specify the afrihost APN)
 
Top