Archive for May 2009
Connecting to the Internet on Ubuntu using Nokia E51 as modem
So lets say you have a brand new (or you know, slightly used) Nokia E51 phone. You looked it up, saw it had some cool features, all that smartphone stuff etc. So you buy it and now you want to connect your laptop to the Internets using it as the modem. Well its not very hard to do on Windows because Nokia provides Windows users with the Nokia PC Suite which makes connecting to the Internet a piece of cake.
But in Linux or Ubuntu specifically, because that’s what I use, we can use the wvdial utility to connect to the world wide web. For that we need to install wvdial (if its not already in the system). Since you aren’t connected to the Internet on Linux yet, find a Windows box or if you’re dual booting fire up that trusted Windows XP (or Vista if you’re one of those people) and download it from http://packages.ubuntu.com. Be sure to download all the dependencies as well. Once you have wvdial just create a new wvdial.conf file at /etc. And fill it up with the following:
[Dialer Defaults]
Modem = /dev/ttyACM0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","ufone.pfinternet","",0,0
ISDN = 0
Modem Type = USB Modem
Phone = *99#
Username = "blank"
Password = "blank"
Stupid Mode = 1
|
Since I’m a Ufone subscriber (unfortunately) I’ve used its APN i.e. ufone.pfinternet. If you have a different provider use theirs. If you’re already using GPRS on your phone then you can find it in your phone’s connection settings. And if the username and password are blank use “blank”, otherwise type in the correct credentials. Now fire up a terminal and type:
sudo wvdial
|
Give your password and if successful should show some output like this:
--> 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+CGDCONT=1,"IP","ufone.pfinternet","",0,0
AT+CGDCONT=1,"IP","ufone.pfinternet","",0,0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sun May 17 13:07:08 2009
--> Pid of pppd: 8662
--> Using interface ppp0
--> pppd: ��� �� ��
--> pppd: ��� �� ��
--> pppd: ��� �� ��
--> pppd: ��� �� ��
--> local IP address 10.2.85.37
--> pppd: ��� �� ��
--> remote IP address 10.6.6.6
--> pppd: ��� �� ��
--> primary DNS address 172.16.13.219
--> pppd: ��� �� ��
--> secondary DNS address 58.65.175.74
--> pppd: ��� �� ��
|
If the connection process breaks then check your credentials and APN. Most likely one of them is wrong. Fix it and try again. I’ve tried this procedure successfully on both Ubuntu 8.04 and 9.04. Although in 9.04 when you connect your phone to the PC using a USB cable, a dialog will pop up asking you if you want to connect to the Internet using your phone. It provides a very convenient GUI interface to do the same thing wvdial does. But for some reason it gives me slower speeds so I had to go out and install wvdial and now mostly I use that. A word about the Ufone GPRS/EDGE services in case you didn’t know it already, it kind of sucks. Also using your phone as a modem for long periods can result in decreased battery and phone life and a general disturbance in the force. So be careful…