Using a GSM Cellphone as a GPRS Modem

hi all,

we know that .. in todays our pals are facing much problem in connecting to internet in Linux using modems.The following will let you learn how to connect to internet using your GSM mobile and the GPRS connectivity.

Before starting i will tell you my system configuration

— Intel 2.66 AM64T on Intel 915 GVW, 512MB RAM, 160 GB HDD

— Ubuntu Edgy 6.10 + Gnome

— Sony Ericsson K320i

So here we goes….

Step 1:

First connect your mobile to your system through the USB connectivity.

And chose the option “phone mode” (If its available)

Step 2:

Now its time to configure your mobile, Open a terminal and login into root account there.

$ sudo su

# wvdialconf

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.
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 — Sony Ericsson K320
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
WvModem<*1>: Cannot get information for serial port.
ttyACM1<*1>: ATQ0 V1 E1 — OK
ttyACM1<*1>: ATQ0 V1 E1 Z — OK
ttyACM1<*1>: ATQ0 V1 E1 S0=0 — OK
ttyACM1<*1>: ATQ0 V1 E1 S0=0 &C1 — OK
ttyACM1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 — OK
ttyACM1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
ttyACM1<*1>: Modem Identifier: ATI — Sony Ericsson K320
ttyACM1<*1>: Speed 4800: AT — OK
ttyACM1<*1>: Speed 9600: AT — OK
ttyACM1<*1>: Speed 19200: AT — OK
ttyACM1<*1>: Speed 38400: AT — OK
ttyACM1<*1>: Speed 57600: AT — OK
ttyACM1<*1>: Speed 115200: AT — OK
ttyACM1<*1>: Speed 230400: AT — OK
ttyACM1<*1>: Speed 460800: AT — OK
ttyACM1<*1>: Max speed is 460800; that should be safe.
ttyACM1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
ttyACM0<Info>: Speed 460800; init “ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0”
ttyACM1<Info>: Speed 460800; init “ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0”

Step 3:

We will be getting the similar output as above…. when we wvdialconf

So after we need to identify at which port (or the device) the modem is identified. That can be found out by identifying the line

“ttyACM1<*1>: Modem Identifier: ATI — Sony Ericsson K320”

and now open the file /etc/wvdial.conf

# gedit /etc/wvdia.conf

It will be looking like

[Dialer Defaults]
Modem = /dev/ttyACM0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = USB Modem
; Phone = <Target Phone Number>
; Username = <Your Login Name>
; Password = <Your Password>
New PPPD = yes

So in the above code we need to make some changes as per your mobile. Since the mobile is pointing to modem = /dev/ttyACM0, where as the wvdialconf returned /dev/ttyACM1 as the modem as shown above. So change the line “Modem = /dev/ttyACM0” in the /etc/wvdial.conf to  “Modem = /dev/ttyACM1.

And we cant just keep the other fields empty, so just dial your service customer care center and find out the dial up number for your GPRS-Internet connection. And ask for any username and password (if they exists for your GPRS service). Fill that fields in the /etc/wvdial.conf accordingly.

If you are not having any username and passwd … wvdial will not allow you leave those fields empty, so just fill them with your own data like

Username = bob

Password = crank

And be sure to keep the following line, if you are not having any username and password.

Stupid Mode = 1

Once you are sure that you, configured your wvdial fine. You can dial-up your GSM modem by following.

wvdial

and you will be given your IP address and the server IP address displayed. You can hang the connection by just pressing the CTRL+C.

Hope you got it well.

Later.

  1. #1 by Raghavendra on April 7, 2007 - 7:33 am

    Thanks sandy

    Its really a good work.Along with this u must also have given “how to approach in Windows”.I think linux is damn cool in this aspect as it identifies the modem automatically but the thing in windows is we need to install some stuff (Which i am not aware of).
    If u think it is possible please provide “How to for windows also”.

  2. #2 by B on April 16, 2007 - 9:54 pm

    Thank You,
    that was a good how to

  3. #3 by actualmind on July 18, 2007 - 7:36 am

    Awesome How To, i have a V3 and that how to worked perfect, I’ve just needed to download wvstreams and wvdial packages for slackware and install it… then worked perfectly.

  4. #4 by محمدرضا on October 4, 2007 - 8:06 pm

    Hi !

    This is very very Good … (And Working Well)
    thank you very much 😉

    Good luck

  5. #5 by محمدرضا on October 4, 2007 - 8:10 pm

    I’m Linked you … please link me 🙂

  6. #6 by Arthur on April 18, 2008 - 8:20 pm

    Thanks for this article. Perfect

  7. #7 by Arthur on April 18, 2008 - 8:22 pm

    Thanks for this article. Perfect.

  8. #8 by حمید on July 14, 2008 - 6:08 pm

    tanx . very very tanx 😉

  9. #9 by Binu on July 24, 2008 - 3:25 pm

    Thanks dear, you have done a good work.

  10. #10 by fly ringtone on August 8, 2008 - 4:28 am

    wow! you really put a lot of work into this, it really helped me out, Thanks Sandeep fly ringtone

  11. #11 by soundarwel on September 13, 2008 - 7:44 am

    hi friend
    i have a small problem in the step 2, i cant understand what is that open the file/etc/wvdial.conf and how u gave the name getid/etc/wvdial.conf

  12. #12 by tecgaty on December 3, 2008 - 5:17 am

    Hi Sandy,

    This was the easiest approach I have seen. But I wanted to connect my Reliance Netconnect DataCard to my DELL laptop. Unfortunately I am getting the error code 16, saying “A Modem Hung up the phone”

  13. #13 by Manuj on January 10, 2010 - 12:57 pm

    Hi Sandy,

    Thanx, it was very helpful. Just a minor problem left.

    My CDMA phone is conneccting and for few seconds that data transfer is taking place then the phone disconnects. Pls help.

    Manuj

  14. #14 by AKO on January 5, 2012 - 2:29 am

    Do you guys have a facebook fan webpage? I searched for one on facebook or myspace but couldnt find one, Id love to become a fan!

  15. #15 by Shad Baize on September 11, 2017 - 9:53 am

    This stuff is very satisfactorily written. The blog post was informative to subscribers who exactly possess a great value for articles. We look ahead for even more of the very same. He has described each and every little thing extremely beautifully and briefly.

  1. پارسه آی تی » Links for 2007-10-04 [del.icio.us]
  2. my pdq machine
  3. وبلاگ محمدرضا بوذری » GPRS ایرانسل خودتان را در اوبونتو هوا کنید!
  4. GPRS ایرانسل خودتان را در اوبونتو هوا کنید! « پرنده آی تی

Leave a reply to tecgaty Cancel reply