Sandeep Kedarasipalli

Using a GSM Cellphone as a GPRS Modem

Posted by: Sandeep Kedarasipalli on: April 5, 2007

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.

12 Responses to "Using a GSM Cellphone as a GPRS Modem"

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”.

Thank You,
that was a good how to

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.

Hi !

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

Good luck

I’m Linked you … please link me :)

Thanks for this article. Perfect

Thanks for this article. Perfect.

tanx . very very tanx ;)

Thanks dear, you have done a good work.

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

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

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”

Leave a Reply


  • tz: hi i was in the 2nd yr wen this event took place...i was one among the organizers and was also a part in the registration team....sorry for wat all ha
  • tecgaty: 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
  • soundarwel: 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/wvdi

Categories