Connect Linux to the internet using wvdial and a UMTS modem

I run a Fedora 12 and want to connect to Internet using the UMTS modem provided by Belgian ISP Mobistar.

UMTSMon is nice tools, but it requires QT3, not installed on all Linux. wvdial is a more common command line tools.

 

At first, the modem looks like a USB disk, providing Windows drivers and documentation. You need usb_modeswitch to switch it into modem mode. You can found in on the web

Search the vendor and product ID of the modem :

# lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 007: ID 0af0:6901 Option
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Switch the modem into modem mode

# usb_modeswitch -v 0x0af0 -p 0x6901
Looking for default devices ...
 Found default devices (1)
Accessing device 007 on bus 002 ...
Using endpoints 0x02 (out) and 0x82 (in)
Not a storage device, skipping SCSI inquiry

Device description data (identification)
-------------------------
Manufacturer: Option N.V.
     Product: Globetrotter HSDPA Modem
  Serial No.: Serial Number
-------------------------
Warning: no switching method given.
-> Run lsusb to note any changes. Bye.

Now configure wvdial, setup 2 files:

/etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
ISDN = 0
#Baud = 460800
Baud = 9600
New PPPD = yes
Modem = /dev/ttyUSB0

[Dialer pin]
Init3 = AT+CPIN=1234

[Dialer mobistar]
Phone = *99***1#
#Init3 = AT+CGDCONT=1,"IP","internet.be"
Username = mobistar
Password = mobistar
Stupid mode = 1

/etc/ppp/peers/wvdial

noauth
name wvdial
usepeerdns
#noccp

Unlock the SIM card using the PIN code in /etc/wvdial.conf

# wvdial pin
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> 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+CPIN=6232
AT+CPIN=6232
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> 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+CPIN=6232
AT+CPIN=6232
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> 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+CPIN=6232
AT+CPIN=6232
+CME ERROR: operation not allowed
--> Bad init string.

Start wvdial to connect to internet

# wvdial mobistar
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> 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
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT 7200000
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Wed Jul  6 20:45:53 2011
--> Pid of pppd: 3896
--> Using interface ppp0
--> Authentication (CHAP) started
--> Authentication (CHAP) successful
--> local  IP address 172.23.82.194
--> remote IP address 10.64.64.64
--> primary   DNS address 212.224.255.252
--> secondary DNS address 212.65.63.217
--> Script /etc/ppp/ip-up run successful
--> Default route Ok.
--> Nameserver (DNS) Ok.
--> Connected... Press Ctrl-C to disconnect

Add new comment