Archive for category modem

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.

18 Comments