Wednesday, October 25, 2006

My Phone - GPRS - Bluetooth - Notebook - Internet

I have a Sony Ericsson Z600 mobile phone. I bought it 3 years ago. I had the GPRS enabled in my Mobitel Connection and used my Phone as a GPRS modem, to browse the Internet via my old notebook (provided from the office) using IR port. I did it in Windows, no worries. But after I installed Linux I couldn't configure my IR port and unable to connect to Internet via GPRS. But with my new notebook, Compaq Presario V3000 (Intel Core Duo) I had bluetooth inbuilt. After installing Ubuntu Dapper I gave it a try to connect via bluetooth. Bingo. Succeeded. After lot of Googling, I should say. So for the sake of people who need to connect to the Internet using their notebooks and Bluetooth phones, I thought of blogging my experience on that. You may find many good how to s related to this scenario though.

This is more adoptable for Ubuntu Dapper, but general configurations are same for other Distros too.


  • Latest 2.6 Kernel.
  • bluez-utils.
  • ppp.
  • openbox.
  • Bluetooth & GPRS enabled phone that can be used as a modem.
  • Bluetooth enabled PC/notebook. (those who don't have an inbuilt bluetooth port can use a bluetooth doungle instead.)
Install software.

$ apt-get update (just to update the packages in the source list)
$ apt-get install bluez-utils
$ apt-get install openbox
$ apt-get install ppp
Take a Terminal and become root (or sudo). I prefer to keep the root privileges rather than sudo. Turn on both phone's and PC's bluetooth service.

Discover the bluetooth phone from your notebook

$ sudo su -
$ hcitool scan

This is my phone's MAC address. You may copy the MAC address because you gonna need it few more times in this process.

00:0F:D9:BC:EA:C0 Dassa.Z600

Now pair your phone with notebook

$ hcitool cc 00:0F:D9:BC:EA:C0
$ hcitool auth 00:0F:D9:BC:EA:C0

You should put your phone's MAC address here.

Now you have to configure your device{modem (rfcomm)}

Get your channel number for your phone's dial up service

$ sdptool browse 00:0F:D9:BC:EA:C0
Check for “Service Name : Dial-up Networking”. And check and remember the Channel number. Mine it was “Channel : 1”

Now edit the /etc/bluetooth/rfcomm.conf
$ vim /etc/bluetooth/rfcomm.conf

Mine it was like this, you should replace your MAC and Channel No.

# RFCOMM configuration file.
# example:
# rfcomm0 {
# bind yes;
# # Bluetooth address of the device
# device 11:22:33:44:55:66;
# # RFCOMM channel for the connection
# channel 1;
# # Description of the connection
# comment "Example Bluetooth device";
#anuradha edited this.

rfcomm0 {
bind yes;
# Bluetooth address of the device
device 00:0F:D9:BC:EA:C0;
# RFCOMM channel for the connection
channel 1;
# Description of the connection
comment "Bluetooth Dialup";

Save and close frcomm.conf file.

Please note; I always keep the original file and work on a copy of that. Since I'm also a new linux guy, probability of going things wrong is very high.

Now create a peer file. This will create the peer to peer connection with the Notebook and phone.

$ vim /etc/ppp/peers/BluetoothDialup

connect "/usr/sbin/chat -v -f /etc/chatscripts/BluetoothDialup"
/dev/rfcomm0 115200
lcp-echo-failure 0
/dev/rfcomm0 115200
connect '/usr/sbin/chat -v -f /etc/ppp/chat-gprs'
modem -detach

This is how my peer file looks like.

Now you need to create a chat script for the connection.

My /etc/chatscripts/BluetoothDialup file look like this.

'' \rAT
OK 'AT+CGDCONT=2,"IP","wap"'
OK ATD*99***1 #

Note: You have to replace the “wap” with your APN, and ADT number with your service provider's dialing number.

There is another thing to specify here, if you are using a PIN (pass key) to pair bluetooth devices you need to create a file containing the pin. I use a pin and I created that file as below.

$ vim /etc/bluetooth/pin


This is a sample, you have to put your pin number here.
save and close.

Check whether you have a user that have the privileges to use the modem, else create a user that have the privilege.

$ adduser username dialout

Now get connected. Brows the Internet.

$ cd /etc/chatscripts
$ pon BluetoothDialup

Note: Some times you might get an error related to proxy server, if that problem showed up, go to edit – Preferences, under General tab go to Connection Settings... Select Auto Detect Proxy Settings for this Connection. Then give it a try.

After surfing, you have to close the connection.

$ poff BlutoothDialup

It's always good to close the peer connections too.
$ /etc/init.d/bluez-utils stop

Good Luck!

For me this setup was suitable. But what I have experienced is, sometimes one person's settings will not 100% suite for another one. I used several howtos to get my work done. This is the set of settings which worked for me. Can't say this will work for you too.


Voice in Colombo said...

How is the speed of GPRS internet access? Is it "manageable" or sucking slow? I also looking into having a try. Right now, I have a bluetooth enabled notebook (Windows) and a GPRS enabled SIM from Dialog. My phone doesn't support Bluetooth. So, if I shift to a Bluetooth phone, that's it? right?

~ lo$t $oul ~ said...

could you give details about connecting via bluetooth/IR, i got both of them on my laptop and phone. so connectivity is no problem, i need to know the configuration steps.

TEAM FILEnetworks said...

Yo dudes,
I'm from FILEnetworks Sri Lankan software security team and just dropping by to announce our blog and discussion forum launch. Some of you might never have heard about FILEnetworks before and must have begun wondering what the heck it is. Read all about us and about what we do here.

FILEnetworks blog intends to provide information about latest software releases, latest developments in the information technology arena and latest releases in software security arena.
You can also use our discussion forum to request software cracks which will remove Demo Versions/Trial Expirations/Online Activations of all leading software (Norton AV 2007, Windows Genuine Advantage, PC game copy protection schemes etc.).
FILEnetworks Discussion forum will also provide help in troubleshooting common PC problems and the discussion forum will allow users to share tips, tricks and hacks which might come in handy for computer users and web surfers.
There are thousands of teams on the net which provide similar services but ours is the first of this kind from srilanka and we provide everything for free.

Give it a go:

Discussion Forum:

If you want your blog affiliated and linked to from ours, email .