HOWTO: Airtel GPRS on Linux via Bluetooth

Here’s a mini HOWTO explaining how Airtel GPRS users can connect their linux boxes to the net using only a bluetooth connection from their phone. That’s right, no data cable required!

NOTE: I’ve only tried this on Debian but it should work fine on just about any distro.. use your distro’s package management tool instead of apt.

Follow these steps:

1. First make sure GPRS (Mobile Office) is enabled on your phone. This won’t work with Airtel Live šŸ˜›

2. Install the Bluetooth utilities:

sudo apt-get install bluez-gnome bluez-utils

3. Find the MAC address of your phone:

hcitool scan

The output should be something like this:

Scanning ...
00:19:63:74:XX:YY saurav

Write down this address somewhere for future reference.

4. Now, determine the channel used for dial up networking using the MAC you just found:

sdptool browse 00:19:63:74:XX:YY

...
Service Name: Dial-up Networking
Service RecHandle: 0x10001
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100

In this case, the required channel is channel no. 1. This will be used to configure the bluetooth connection.

5. Open up /etc/bluetooth/rfcomm.conf with your favorite editor.

sudo nano -w /etc/bluetooth/rfcomm.conf

Make it look something like this (replace with your MAC address and channel):

rfcomm0 {
bind yes;
device 00:19:63:74:XX:YY;
channel 1;
comment "Dial-up Networking";
}

6. Next, restart bluetooth services:

sudo /etc/init.d/bluetooth restart

7. We’re done with the bluetooth configuration. Now we need to configure wvdial:

8. Install wvdial

sudo apt-get install wvdial

9. Run wvdialconf. This generates a dummy /etc/wvdial.conf

sudo wvdialconf

10. Now we need to edit /etc/wvdial.conf and feed in the values for the GPRS connection:

sudo nano -w /etc/wvdial.conf

It should look something like this:

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
stupid mode = 1
Modem Type = Bluetooth Modem
Baud = 115200
New PPPD = yes
Modem = /dev/rfcomm0
ISDN = 0
Phone = *99#
Username = a
Password = b

11. We’re done. Make sure Bluetooth is turned on in your phone and enter the following command to connect:

sudo wvdial

It might ask you for a PIN the first time you connect, in which case you must enter the same digits in the phone and PC in order to pair them.

12. Press Ctrl-C when you want to disconnect.

Advertisements

3 thoughts on “HOWTO: Airtel GPRS on Linux via Bluetooth

  1. hey there another way
    rfcomm:-
    rfcomm release /dev/rfcommblabla
    rfcomm bind /dev/rfcommblabla blue-addr channel
    wvdial

    perhapes may not work

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