|
Connecting to the Internet on Ubuntu 7.04 using your mobile (GPRS) phone as a modem |
|
|
|
|
Written by Alexander Sea
|
|
Wednesday, 15 August 2007 |
Smart Philippines is offering PHP10/30 minutes GPRS internet connection for 3G phones. The question is “What if I want to surf the net on my laptop using my 3G phone as a modem?”.
For those who already have a broadband internet connection, maybe some of you are not interested connecting to the internet using GPRS as it offers slower internet connection (dial-up speed). Somehow it might be a great help especially when you are mobile, traveling in the Philippine's 7100 islands or like me who don't have a broadband connection at all.
My Laptop (Acer Aspire 4520) is running Ubuntu 7.04 (Feisty Fawn), my phone (sorry, my girlfriend's phone pala. Thank you Erin for lending me. Ganda ng kulay ng phone mo... kulay arbor. he he he. I love you) is a Nokia 6233 model and using Smart Network. I am using a usb cable to my phone. Let's get started. Plug your phone to the usb port. Now let's check if your mobile phone is being recognized. Open a terminal console and issue a command
alex@alex-laptop:~$ lsusb
and you will get an output something like
Bus 001 Device 004: ID 0421:0491 Nokia Mobile Phones Bus 001 Device 003: ID 15ca:00c3 Bus 001 Device 001: ID 0000:0000 Bus 004 Device 002: ID 064e:a101 Suyin Corp. Bus 004 Device 001: ID 0000:0000 Bus 003 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000
Then run the following command
alex@alex-laptop:~# sudo wvdialconf create
and you will get an output similar to this
Editing `create'.
Scanning your serial ports for a modem.
Modem Port Scan<*1>: S0 S1 S2 S3 WvModem<*1>: Cannot get information for serial port. ttyACM0<*1>: ATQ0 V1 E1 -- OK ttyACM0<*1>: ATQ0 V1 E1 Z -- OK ttyACM0<*1>: ATQ0 V1 E1 S0=0 -- OK ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK ttyACM0<*1>: Modem Identifier: ATI -- Nokia ttyACM0<*1>: Speed 4800: AT -- OK ttyACM0<*1>: Speed 9600: AT -- OK ttyACM0<*1>: Speed 19200: AT -- OK ttyACM0<*1>: Speed 38400: AT -- OK ttyACM0<*1>: Speed 57600: AT -- OK ttyACM0<*1>: Speed 115200: AT -- OK ttyACM0<*1>: Speed 230400: AT -- OK ttyACM0<*1>: Speed 460800: AT -- OK ttyACM0<*1>: Max speed is 460800; that should be safe. ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
Found an USB modem on /dev/ttyACM0. Modem configuration written to create. ttyACM0<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
Above means that your modem(cellphone) is connected at /dev/ttyACM0
Next, lets edit the wvdial.conf created by the previous command. Issue the vim command (or you can use gedit as an editor)
alex@alex-laptop:~$ vim /etc/wvdial.conf
Replace anything written with the following, changing the modem entry with your modem. In my case it's /dev/ttyACM0. Also change the username with the mobile number of your phone. It's in the format +639XXXXXXXXX
[Dialer Defaults] Modem = /dev/ttyACM0 Baud = 230400 Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ISDN = 0 Modem Type = Analog Modem Phone = *99***1# Username = (your mobile number here) Password = B Stupid Mode = 1
We are all done at this point. On the terminal console type
alex@alex-laptop:~$ sudo wvdial
Congratulations, you are now connected to the internet using GPRS with the following output on your terminal
--> Carrier detected. Starting PPP immediately. --> Starting pppd at Wed Aug 15 01:08:37 2007 --> Pid of pppd: 8555 --> Using interface ppp0 --> pppd: �[10][06][08]H [06][08] --> pppd: �[10][06][08]H [06][08] --> pppd: �[10][06][08]H [06][08] --> pppd: �[10][06][08]H [06][08] --> local IP address 10.157.147.114 --> pppd: �[10][06][08]H [06][08] --> remote IP address 10.6.6.6 --> pppd: �[10][06][08]H [06][08] --> primary DNS address 203.172.28.136 --> pppd: �[10][06][08]H [06][08] --> secondary DNS address 202.57.67.45 --> pppd: �[10][06][08]H [06][08]
I hope this helps you. Happy Surfing. To disconnect just press CTRL+C source http://sealex.blogspot.com |