Use Your Bluetooth Phone To Access The Internet

This is really cool! I could finally access the internet over a bluetooth personal area network (PAN) on my Ubuntu Hardy, here are the steps:

  1. Install the following packages: bluez-utils, bluetooth, bluez-gnome, bluez-hcidump
  2. you will need to enable the BlueTooth applet in GNOME. Do this by going to “System->Preferences->BlueTooth Preferences”. Set the mode of operation on the “Devices” tab to “Other devices can connect”. On the “General” tab, set the program to always show the BlueTooth systray applet (personal preference).
  3. Pair your phone and computer
  4. Open a terminal. On the command line, enter the following commands and taking note of the information where asked to.
    sudo bash

    hcitool scan #(Make a note of the hardware address of your phone as listed).
    gedit /etc/default/bluetooth #You can use any other text editor of course

    Find the line which has something like:


    and change it to:


    Next, find the line which looks like:


    and change that to:

    PAND_OPTIONS="--listen --role=PANU --devup /etc/bluetooth/pan/dev-up --devdown /etc/bluetooth/pan/dev-down"

    Save the file.

  5. Now, create a directory called “/etc/bluetooth/pan”. Use an editor to create a file called “/etc/bluetooth/pan/dev-up” and put the following lines into that file:
    ifup bnep0

    Save that file.

  6. Now, use a text editor to create another file called “/etc/bluetooth/pan/dev-down” and put the following lines into it:
    ifdown bnep0

    Save that file as well.

  7. Add a line to /etc/network/interfaces. Open that file with a text editor (as root) and add the following line to it near the end:
    iface bnep0 inet dhcp

  8. Start up the Internet Sharing on your phone and connect from your PC. The Internet Sharing on your phone is going to be different depending on the phone, but on the Linux client, use the following command:
    pand --connect  #The address you have got in the "hcitool scan" command
    ifup bnep0

  9. That’s it. You should see the bnep0 interface come up and get a DHCP address from your phone. After you have the address, you can freely browse the Internet.

    To disconnect, simply run:

    pand -K

    Remember, any time you want to connect or disconnect, you must run the “pand” commands as root. BTW, I’m now using my new HTC Touch 3G to post this :)))). Article Source (with some changes):

About SoCRaT

Systems Engineer, OSS & Linux Geek
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s