by May 8, 2004 0 comments

In one of our last month’s article Linux the Bluetooth Way (page 100), we saw how easy it is to configure a Linux machine to send and receive files via Bluetooth. And, as promised in that article, this time we will demonstrate how you can access the Internet via a Bluetooth-enabled GPRS

Step 1: Check compatibility
The first step is to connect your PC and cellphone via Bluetooth (read our last month’s article for a step-by-step guide on how to do so). Then, check if your cellphone has a built-in modem that can be used over Bluetooth or not. To do this, run the following command. 

#sdptool search DUN

If the output shows ‘Dialup Networking’ in the ‘Service Class ID List’ then your phone is compatible. 

If this service is not available on your phone, then you cannot use it as a modem. We used a Sony Ericsson T610 phone, which has this facility, to connect to the Net. Other cellphones, such as Nokia 6600, Sony Ericsson T630 and Sony Ericsson P900, also support

Step 2: Initialize modem device
Now you have to bind the MAC address of your cellphone to rfcomm device so that this device can be used as a GPRS modem. Run the following commands to do so.


This command will show you the MAC address of your cellphone. Use this Mac address in the following command to bind it with the rfcomm device.

#rfcomm bind 0 <mac_address_of_your_phone> 1

You will encounter a small bug that you have to fix to get the proper rfcomm device. In PCQLinux (all versions) and RedHat/Fedora you don’t get the /dev/rfcomm0 device by default, so you have to create this device manually. To do so, run the following command.

#mknod /dev/rfcomm0 c 216 0

This will create a device called rfcomm0 that has a major number of 216 in the /dev directory. Now you can symlink this device to /dev/modem so that any dialer program, such as minicom, can easily detect it.

Step 3: Configure dialer
Everything, except the dialer that will dial out through your PC to your GPRS service provider, is now set. For this, you can use the standard wvdial program that comes with every Linux distribution and is also easy to configure. To configure wvdial, first, open the file called /etc/wvdial.conf and enter the following lines.

Modem = /dev/rfcomm0
Baud = 57600
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
Init3 = ATM0
FlowControl = None
[Dialer GPRS]
Username = user
Password = user 
Phone = ATD*99***3#
Stupid Mode = 1
Inherits = Modem0

Direct Hit!
Applies to: Mobile Linux users
USP: Windows not required to surf through GPRS

In the above file you will notice that we have used the /dev/rfcomm0 device as the modem and ‘user’ as the username and password. wvdial won’t dial unless you provide a username and password to it; so you can give any name in this place. The numbers by which you will dial for GPRS are standard numbers and are independent of any carriers. The numbers you can use are *99***x# where x ranges from 0 to 9. 

Step 4: Dial out
Now, you have to run the wvdial command with the appropriate dialer name to connect you to the Internet. The command is as follows.

#wvdial GPRS

After running the above command you will be connected to the Internet within seconds. Once you are connected, run the command ‘ifconfig’ and you will find that your ppp0 connection is active and has obtained an IP address from your GPRS service provider. This means you are ready to surf.

Anindya Roy

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.