Linux iPhone Tethering over Bluetooth

A while ago I wrote about how to do a wifi iPhone tether with a SOCKS proxy. Now, I’ll be writing about a Bluetooth tether on 3.0/3.0.1 with a 3G/3GS. To make this work on 3.1, you will need to enable tethering separately, which can usually be done by installing the “Internet Tethering” package in Cydia. This does NOT rely on that uit.sh script floating around, and will work on any Linux system with bluetooth. I used my Fedora 10 laptop for this.

Enable PAND

First, check /etc/sysconfig/bluetooth, and add this to the file if it is not already there:
PAND_ENABLED=1
PAND_OPTIONS="--role=PAN"

Restart the bluetooth service, or your computer if you can’t find the init.d script for it.

Install Blueman

First, install the “Blueman” program. It will put a bluetooth icon in your notification area. If you already have one, click both to check which is the blueman icon and which is provided by another bluetooth service. First of all, right click the blueman icon and go to local services. Click on network and select the “integrate with NetworkManager” option. Close this window.

Prepare the Phone

Browse to help.benm.at on your phone and select your country and carrier. After installing the carrier settings, reboot your phone. In Settings>General>Network, you should see an internet tethering option. If you don’t, reinstall the carrier settings and reboot again. When you get a notice about tethering not being activated and that you need to contact AT&T, close it and the menu should be activated. Go into the tethering menu and turn tethering on. Tethering has not been reported to add to your phone bill, so it is safe to ignore the warning if you get one. Now, go to your bluetooth menu (settings>general>bluetooth) turn bluetooth on and stay in the menu.

Back on the computer, click the blueman icon and click the search button.

You should see the phone. Select the phone then click the bond button. Make a passcode consisting of numbers, then when the phone asks you to input a passcode, enter the same code. Your phone and computer should now be paired.

Connect

Now that the phone and computer are paired, you can follow these steps whenever you want to connect to the phone.

Go to the bluetooth menu on the phone. Tap on the computer’s name. The first time you connect, you might get a notice about incoming authorization, as shown below, click “Check Authorization” and be sure to always grant access. This might not appear on subsequent connections.

Now, open blueman on the computer and right click the phone. Connect to network>network access. Wait a minute for network-manager to pick up on the connection, and you should be connected.

You can do other things with your phone while tethering is active. To stop tethering, you can just disconnect in blueman or turn bluetooth off on the phone. For your information, the network interface that is created will typically be bnep0, not the pan0 network interface that is already present in some systems.

If it doesn’t work, make sure your bluetooth is functioning correctly. If all else fails, unpair the iPhone on the computer and remove the computer from the iPhone’s list of bluetooth devices.

I’ll be writing some more OpenWRT stuff later, so you can subscribe to my RSS feed or follow me on twitter (@Mattventura) to hear more.

This entry was posted
on Thursday, August 27th, 2009 at 14:54 and is filed under linux.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.

7 Responses to “Linux iPhone Tethering over Bluetooth”

I have my phone tethered to my computer using the method above. I also have a router running DDWRT with a USB port. Do you know if it is possible to connect the iphone to a router to share the connection?

I think there would be 2 ways to do it with a router. Some people have done a Linux-iPhone USB connection with, IIRC, a ppp connection between the phone and computer. The other way to do it would be a Bluetooth connection and the posted method, but with command-line versions of the utilities used.