
This article discusses about how to connect to the internet using a modem wvdial intermediary software.
Tools used are:
- A handphone modem, in this article i use CDMA C700 series modem from Haier, or you can use another modem.
- Ubuntu Linux, (can also use another Linux distributions with customized setting terms).
First step, make sure your system is updated, use this command to update the system, but before all of the following step below is executed, login as root is a must.
sudo apt-get update
if the system already being update use the following command to install wvdial software
sudo apt-get install wvdial
if for some reason are not connected to the internet, wvdial can be installed offline, but first the packages mentioned below must be prepared otherwise the wvdial will refused to installed properly.
libxplc0.3.13_0.3.13-1build1_i386.deb
libwvstreams4.4-base_4.4.1-0.2ubuntu2_i386.deb
libwvstreams4.4-extras_4.4.1-0.2ubuntu2_i386.deb
libuniconf4.4_4.4.1-0.2ubuntu2_i386.deb
wvdial_1.60.1+nmu2_i386.deb
install the packages using following command.
dpkg -i (package_name)
after all packages is installed properly, cek your modem if it is detected by the system or not.
lsusb
the output from the command are.
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 05c6:9004 Qualcomm, Inc.
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 002: ID 125f:c03a A-DATA Technology Co., Ltd.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
watch th line
Bus 004 Device 002: ID 05c6:9004 Qualcomm, Inc. This marks tell me that my modem has been detected by my Linux system with product ID = 05c6 or in hex format 0x05c6 and vendor ID = 9004 or in hex format 0x9004.
If you use another type of modem, the product id and the vendor id will be different with the example above.
next step is to use modprobe command so the modem can be detected and recognized by wvdial.
sudo modprobe usbserial vendor=0x05c6 product=0x9004
use the following command to cek if modem had been detected.
dmesg | tail
the output from the command are.
[ 27.989235] CPUFREQ: Per core ondemand sysfs interface is deprecated - up_threshold
[ 80.725304] ttyS1: LSR safety check engaged!
[ 105.329452] usbcore: registered new interface driver usbserial
[ 105.329859] USB Serial support registered for generic
[ 105.330246] usbserial_generic 3-1:1.0: generic converter detected
[ 105.332269] usb 3-1: generic converter now attached to ttyUSB0
[ 105.332298] usbserial_generic 3-1:1.1: generic converter detected
[ 105.334224] usb 3-1: generic converter now attached to ttyUSB1
[ 105.334277] usbcore: registered new interface driver usbserial_generic
[ 105.334281] usbserial: USB Serial Driver core
run the wvdial configuration.
sudo wvdialconf
the output from the command are.
Editing `/etc/wvdial.conf'.
Scanning your serial ports for a modem.
ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Modem Port Scan<*1>: S1 S2 S3
WvModem<*1>: Cannot get information for serial port.
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
WvModem<*1>: Cannot get information for serial port.
ttyUSB1<*1>: ATQ0 V1 E1 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB1<*1>: Modem Identifier: ATI -- Manufacturer: QUALCOMM INCORPORATED
ttyUSB1<*1>: Speed 9600: AT -- OK
ttyUSB1<*1>: Max speed is 9600; that should be safe.
ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
Found a modem on /dev/ttyUSB1.
Modem configuration written to /etc/wvdial.conf.
ttyUSB1: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
the modem had been well detected in
/dev/ttyUSB1.
next, edit the wvdial configuration.
sudo gedit /etc/wvdial.conf
the contents are.
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CRM=1
Password = smart
Phone = #777
Idle Seconds = 300
Modem Type = Analog Modem
Stupid Mode = yes
Compuserve = yes
Baud = 921600
New PPPD = yes
Modem = /dev/ttyUSB1
ISDN = 0
Username = smart
FlowControl = CRTSCTS
because now i'm using internet from SmartFren provider so the contents are like above.
if you use another provider please simply adjust the configuration using the settings from your provider.
next, dial to the provider using wvdial.
sudo wvdial
the output from the command are.
--> 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+CRM=1
AT+CRM=1
OK
--> Modem initialized.
--> Idle Seconds = 300, disabling automatic reconnect.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Tue Feb 22 18:51:09 2011
--> Pid of pppd: 16049
--> Using interface ppp0
--> pppd: 0X[16][08]
--> pppd: 0X[16][08]
--> pppd: 0X[16][08]
--> pppd: 0X[16][08]
--> pppd: 0X[16][08]
--> pppd: 0X[16][08]
--> local IP address 10.xxx.xxx.xx
--> pppd: 0X[16][08]
--> remote IP address 10.xx.xx.xx
--> pppd: 0X[16][08]
--> primary DNS address 10.17.3.252
--> pppd: 0X[16][08]
--> secondary DNS address 10.17.3.244
--> pppd: 0X[16][08]
cek the connection using the ping command, or simply run your browser and start browsing.
I hope this article is help to solve your problem.