My WaR WiTh WoRdS

The AIM of one’s life is to become AIMLESS

Using GPRS with Ubuntu without Bluetooth on Airtel

with 12 comments

Well i know you wont be interested in using GPRS for connecting to net as it offers a download speed of 5KB/s instead of your broadband connection, but it can be of great help when you are traveling or when you dont have a broadband like me ( special thanks to BSNL for that).

I wanted to install Amarok on my newly installed Ubuntu 7.04 so i needed a net connection for that there were a hell lot of dependency as Amarok is basicly a KDE application. so my hunt began for a way to connect my Nokia 3250 with Airtel MobileOffice to it. I found a hell lot of sites upon searching for it but all of them required me to download some or other package for which i needed a net connection lol, but then on Linuxquestions.org i finally found a way to configure it without any extra package just the default Ubuntu Install and guess what it works with all Linux systems (it was originally posted for Fedora). So here is what to do

First:- check the VID and PID of your phone, To do this simpily connect your phone in PcSuit mode through the USB cable provided then type in terminal
lsusb

to get the output somewhat like this

ankur@ankur-desktop:~$ lsusb
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 002: ID 0421:042d Nokia Mobile Phones
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

Notice the ID 0421:042d Nokia Mobile Phones here 421 is the VID and 42d is the PID replace them with what is shown in your case below. Now run the command
sudo /sbin/modprobe usbserial vendor=0x(vid) product=0x(pid)

Like “sudo /sbin/modprobe usbserial vendor=0x421 product=0x42d” in my case

then run the following command
wvdialconf create

To get the following output
ankur@ankur-desktop:~$ sudo wvdialconf create
Scanning your serial ports for a modem.
Port Scan: S0 S1 S2 S3
WvModem: Cannot get information for serial port.
ttyACM0: ATQ0 V1 E1 -- OK
ttyACM0: ATQ0 V1 E1 Z -- OK
ttyACM0: ATQ0 V1 E1 S0=0 -- OK
ttyACM0: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM0: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM0: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM0: Modem Identifier: ATI -- Nokia
ttyACM0: Speed 4800: AT -- OK
ttyACM0: Speed 9600: AT -- OK
ttyACM0: Speed 19200: AT -- OK
ttyACM0: Speed 38400: AT -- OK
ttyACM0: Speed 57600: AT -- OK
ttyACM0: Speed 115200: AT -- OK
ttyACM0: Speed 230400: AT -- OK
ttyACM0: Speed 460800: AT -- OK
ttyACM0: Max speed is 460800; that should be safe.
ttyACM0: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
Found an USB modem on /dev/ttyACM0.
Modem configuration written to create.
ttyACM0: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

This shows that a modem is connected at /dev/ttyACM0, Now substitute this at (your modem) in the script below
Enter the command
sudo gedit etc/wvdial.conf

delete any thing already written there and place this in that
[Dialer Defaults]
Modem = (your modem)
Baud = 230400
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Phone = *99***1#
Username = A
Password = B
Stupid Mode = 1

All done now to connect open terminal and type sudo wvdial and you are connected with the following outputankur@ankur-desktop:~$ sudo wvdial
Password:
--> WvDial: Internet dialer version 1.56
--> 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
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sat May 26 23:56:24 2007
--> Pid of pppd: 5682
--> Using interface ppp0
--> pppd: �[06][06][08]` [06][08]
--> pppd: �[06][06][08]` [06][08]
--> pppd: �[06][06][08]` [06][08]
--> pppd: �[06][06][08]` [06][08]
--> pppd: �[06][06][08]` [06][08]
--> local IP address 10.190.137.17
--> pppd: �[06][06][08]` [06][08]
--> remote IP address 10.6.6.6
--> pppd: �[06][06][08]` [06][08]
--> primary DNS address 202.56.230.5
--> pppd: �[06][06][08]` [06][08]
--> secondary DNS address 202.56.240.5
--> pppd: �[06][06][08]` [06][08]
To disconnect press Ctrl+C. Enjoy

Advertisements

Written by Ankur

May 27, 2007 at 2:00 pm

Posted in Linux, Special, Stuff

12 Responses

Subscribe to comments with RSS.

  1. thanx for reconstructing this blog 4 ubuntu………
    I also gprs user n ws struggling to connect net through ubuntu 7.04…
    i knew that UBUNTU -being latest version should detect USB for nokia but i wasnt sure how to confirm n advent that…. thanx 4 this blog
    how much speed do you get through your cell??

    piyush

    August 23, 2007 at 10:15 pm

  2. thanx every thing ok

    asaoah

    August 25, 2007 at 11:57 pm

  3. woohoo! Thank you for this tutorial. I have been trying for about two weeks now to get ubuntu connected to my Sony M600i. It works! Now I have no more reason to use Windows…. finally. Thank you.

    Cheers,
    Adin

    Adin

    February 26, 2008 at 11:34 pm

  4. […] Using your phone as a modem (Very helpful) […]

    Start « Discover Ubuntu

    February 27, 2008 at 10:49 am

  5. […] blog (click here for blog) worked perfectly and my guess is that it will work for most phones. Hopefully this is the answer […]

  6. Not able to connect and not acquiring I.P
    GPRS working perfectly

    coolbuddy

    March 12, 2008 at 4:55 pm

  7. Hey have to set Settings>>Connection>>Packet Data>>Access point, properly or not
    if yes that what is the problem that you are facing???

    Ankur

    March 12, 2008 at 11:07 pm

  8. I performd the reqiured steps n my modem got detected al wz ok till i gv the command
    # sudo wvdial …. this wz my systems response

    [root@localhost ~]# sudo wvdial
    –> 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

    –> Modem initialized.
    –> Sending: ATDT*99***1#
    –> Waiting for carrier.
    ATDT*99***1#
    CONNECT
    ~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~
    –> Carrier detected. Starting PPP immediately.
    –> Starting pppd at Sun Sep 21 16:30:46 2008
    –> Pid of pppd: 3222
    –> Using interface ppp0
    –> pppd: �[05]M [18]
    –> pppd: �[05]M [18]
    –> pppd: �[05]M [18]
    –> pppd: �[05]M [18]
    –> pppd: �[05]M [18]
    –> pppd: �[05]M [18]
    –> Disconnecting at Sun Sep 21 16:30:51 2008
    –> The PPP daemon has died: A modem hung up the phone (exit code=16)
    –> man pppd explains pppd error codes in more detail.
    –> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.
    –> Auto Reconnect will be attempted in 5 seconds

    and this process is goin on again and again plz plz post me how do i configure gprs

    onkar

    September 21, 2008 at 5:13 pm

  9. i am using fedora 8 and this is my /etc/wvdial.conf file

    [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#
    Username = A
    Password = B
    Stupid Mode = 1

    plz help me i dun want to uz windowz yaar…it sucks

    onkar

    September 21, 2008 at 5:17 pm

  10. Hey onkar

    I read this blog a few days back, followed the same steps and got exactly the same error as you had. My phone always used to tell me that I should subscribe to data packet first while I could actually use gprs on Windows on my same pc.

    After doing quite a lot of research, trying out at least 10 different ways of setting up my nokia 6300 modem, i realized that the only thing which needed to be changed was my settings for the wvdial.conf
    Here’s my config that worked:

    Modem = /dev/ttyACM0
    Baud = 460800
    Init1 = AT&F
    Init2 = AT E0 V1 &D2 &C1 &S0 S0=0 +dr=1
    Init3 = AT+IFC=2,2;+CVHU=1
    Init4 = ATS7=60+DS=3,0;&K3
    Init5 = AT+CGDCONT=1,”IP”,”airtelgprs.com”,””,0,0
    Init6 = ATS0=0
    ISDN = 0
    Modem Type = Nokia GSM Phone USB Modem
    Phone = *99#
    Username = any
    Password = any
    Stupid Mode = 1

    If this doesn’t work, then you need to change the Init5 statement with the correct connection string. You may only have to replace “airtelgprs.com” with something else. I can suggest the following ways to setup your modem properly:
    1. Do googling to find out the settings for your gprs and hope that you are lucky like me and find the connection string.
    2. Look at your windows setting (i don’t know how this is done) and do similar setting on your linux
    3. Talk to your service provider on phone and ask him for the settings.

    raghu

    November 13, 2008 at 9:51 am

  11. Hi,
    what will i do in fedora 9 ?i am in trouble.connection ok…but cant ping any site…showin address not found?
    wat’s the problem?plz help me…

    sohel

    January 24, 2009 at 4:57 pm

  12. This is important!|I attempt to depict similar soulful message

    Eisha P1

    March 15, 2010 at 12:01 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: