How to: Connect to the Internet via Bluetooth

From EasyPeasy Wiki

Jump to: navigation, search
Needs a Bluetooth adapter, google for e.g. "Nano Bluetooth USB Adapter".

Contents

[edit] Install needed applications (Ubuntu 8.04 Hardy)

  • Add the GPG key, from the terminal:
sudo wget http://download.tuxfamily.org/blueman/blueman.gpg -O- | sudo apt-key add -
  • Go to System → Administration → Software Sources → Third-Party Software → Add..., → add “deb http://download.tuxfamily.org/blueman hardy blueman” → Add Source → Close → Reload
  • Close Software Sources.
  • Install apps, from the terminal:
sudo apt-get install -y blueman && sudo apt-get install -y gnome-ppp

[edit] Configure Blueman

  1. Start Blueman from Applications - Accessories
  2. Choose Inquiry, select your phone and choose Bond
  3. Type the same pin on both your computer and your phone and the bonding should be successful
  4. With the phone selected, Choose Other → “Set Trusted”
  5. Choose Edit → Services
  6. Enable Serial by selecting its Autostart, selecting its off Status button to turn it on then selecting the correponding 'configure' button on the far right
  7. Choose Add New Serial Port
  8. From the Host dropdown, select your phone
  9. From the Service dropdown, select “dun: Dial-Up Networking” and select Add Port
  10. When done, select Close

[edit] Configure the dial-up

  1. Choose Applications → Internet → GNOME PPP
  2. Select Setup and write “/dev/rfcomm0″ in the Device field
  3. Under Options, I recommend you check “On connection″ → “Dock in notification area”
  4. Choose Close
  5. If you have gotten your own unique username, password and phone number, write those in
  6. Otherwise, write your phone number as username and password and *99***# as phone number”"
  7. “Remember password” must be checked (this is a bug)
  8. Choose Connect

[edit] How to connect in the future

  1. Applications → Internet → GNOME PPP → Connect

[edit] Notes on working with Verizon

gnome-ppp settings:

Type: usb modem

On options tab: Ignore terminal strings (stupid mode)

Username <your cell phone number>@vzw3g.com Password vzw Number #777

In ~/.local/share/applications/GNOME-PPP-favorite-1225048048.desktop

Change Exec=gnome-ppp to Exec=gksudo gnome-ppp

[edit] Alternative Internet Connection Via Bluetooth PAN

Many modern phones do not use the standard GSM Modem dialup arrangements (*99***# etc.) - in fact they are not true modems at all in the sense of being MOdulator/DEModulators - instead they offer a fully digital network connection via a PAN - Personal Area Network - either via the USB port on the 'phone or via Bluetooth (Bluetooth PAN).

Mainly by following the guide at http://ubuntu-utah.ubuntuforums.org/showthread.php?t=598890 and some other sources I can't remember I have been able to set up a full Bluetooth PAN using a Win Mobile 6.5 3G phone and Easy peasy 1.5. The same configuration worked also with Easy Peasy 1.0.

Have the following packages installed with your favourite package manager apt-get, aptitude, synaptic. With Easy Peasy 1.5 most packages are probably already installed by default. I only had to install the first two packages.

  • bluez-compat
  • bluez-hcidump
  • bluez-utils
  • bluetooth
  • bluez-gnome

Now create a bluetooth bond (pairing) between your phone and the eeePC.

Open a terminal. On the command line, enter the following commands and taking note of the information where asked to.

$ sudo hcitool scan

Make a note of the hardware address of your phone as listed. You need it later as the <HWADDR>.

Use your favourite editor to edit "/etc/default/bluetooth". Please note you need sudo rights to save the file. I use vi.

$ sudo vi /etc/default/bluetooth

Edit the file by changing or adding the following line:

PAND_ENABLED=1

Also change or add the line:

PAND_OPTIONS="--role=PANU"

Save the file.

Create a directory called "/etc/bluetooth/pan". Use your favoutite editor again to create a file called "/etc/bluetooth/pan/dev-up" and put the following lines into that file. Please note to replace <HWADDR> with the noted hardware address of your phone.

#!/bin/bash
pand --connect <HWADDR> -n
sleep 1
ifup bnep0

Save that file. The sleep 1 gives pand the time (1 second) to start.

Now, use your editor to create another file called "/etc/bluetooth/pan/dev-down" and put the following lines into it:

#!/bin/bash
ifdown bnep0
pand -K

Save that file also. Make both files in /etc/bluetooth/pan/ executable:

$ sudo chmod 750 /etc/bluetooth/pan/dev-*

Last file to edit: "/etc/network/interfaces". Add the following line to that file:

iface bnep0 inet dhcp

Save it and you're done!

Now fire up the PAN connection at your phone. When your phone has it's 3G connection established, run:

$ sudo /etc/bluetooth/pan/dev-up

Your eeePC should now make a bluetooth connection to the phone and establish a network connection with it.

When you're done, just run:

$ sudo /etc/bluetooth/pan/dev-down

That will bring the connection down between the eeePC and phone.

Personal tools