Here I describe the procedure to connect through Claro, a telecom company established in Chile.
The hardware is a HSDPA USB Modem MF626 and Compaq 6715s laptop running Debian GNU/Linux Squeeze.
First, we need the package(s) for wvdial.
You may need some dependencies... yep, it may turn out to be the hen and egg problem (I used another laptop with a colorful operating system).
#apt-get install wvdial
Second, you run the autoconfiguration utility:
#wvdialconf
Third, check the configuration file written in /etc/wvdial.conf:
#cat /etc/wvdial.conf
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
ISDN = 0
New PPPD = yes
Phone = *99#
Modem = /dev/ttyUSB2
Username = claro
Password = claro
Baud = 112800
Verify the values, in my case the modem was not found in the place reported (/dev/ttyUSB1).
Fourth, run the dialer:
wvdial
--> 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#
--> Waiting for carrier.
ATDT*99#
CONNECT 3600000
--> Carrier detected. Waiting for prompt.
--> Don't know what to do! Starting pppd and hoping for the best.
--> Starting pppd at Sat Sep 17 18:03:22 2011
--> Pid of pppd: 11384
--> Using interface ppp0
--> pppd: �[7f]
--> pppd: �[7f]
--> pppd: �[7f]
--> pppd: �[7f]
--> pppd: �[7f]
--> local IP address 186.172.53.253
--> pppd: �[7f]
--> remote IP address 10.64.64.64
--> pppd: �[7f]
--> primary DNS address 8.8.8.8
--> pppd: �[7f]
--> secondary DNS address 8.8.4.4
--> pppd: �[7f]
# ifdown eth0
--> 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#
--> Waiting for carrier.
ATDT*99#
CONNECT 3600000
--> Carrier detected. Waiting for prompt.
--> Don't know what to do! Starting pppd and hoping for the best.
--> Starting pppd at Sat Sep 17 18:03:22 2011
--> Pid of pppd: 11384
--> Using interface ppp0
--> pppd: �[7f]
--> pppd: �[7f]
--> pppd: �[7f]
--> pppd: �[7f]
--> pppd: �[7f]
--> local IP address 186.172.53.253
--> pppd: �[7f]
--> remote IP address 10.64.64.64
--> pppd: �[7f]
--> primary DNS address 8.8.8.8
--> pppd: �[7f]
--> secondary DNS address 8.8.4.4
--> pppd: �[7f]
If your connection is still not working, try bringing down any other network interface:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1a:4b:77:59:eb
inet addr:192.168.0.29 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:16
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:747 errors:0 dropped:0 overruns:0 frame:0
TX packets:747 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:70604 (68.9 KiB) TX bytes:70604 (68.9 KiB)
eth0 Link encap:Ethernet HWaddr 00:1a:4b:77:59:eb
inet addr:192.168.0.29 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:16
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:747 errors:0 dropped:0 overruns:0 frame:0
TX packets:747 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:70604 (68.9 KiB) TX bytes:70604 (68.9 KiB)
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
# ifdown eth0
Try again:
# elinks www.google.com
It worked.
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1149 errors:0 dropped:0 overruns:0 frame:0
TX packets:1149 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:266335 (260.0 KiB) TX bytes:266335 (260.0 KiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:186.172.53.253 P-t-P:10.64.64.64 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:5935 errors:0 dropped:0 overruns:0 frame:0
TX packets:5673 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:4872033 (4.6 MiB) TX bytes:1055978 (1.0 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1149 errors:0 dropped:0 overruns:0 frame:0
TX packets:1149 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:266335 (260.0 KiB) TX bytes:266335 (260.0 KiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:186.172.53.253 P-t-P:10.64.64.64 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:5935 errors:0 dropped:0 overruns:0 frame:0
TX packets:5673 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:4872033 (4.6 MiB) TX bytes:1055978 (1.0 MiB)