Guide: iPhone 3G Tethering on Linux Mint or Ubuntu

Share this:

One of the reasons that I was quite reluctant to move over to Linux from Windows was the ease of tethering Internet connection from my iPhone. In Windows, all you need is to install iTunes (which would install the required drivers) and voila, all you need is just enable tethering on your iPhone and connect the USB cable to your PC. That’s it!

However, thankfully there’s the Bluetooth PAN option as well for tethering. And since the iPhone uses the standard Bluetooth PAN for sharing it’s Internet connection, this should also work with any other platforms as well!

But one can only wish that someone would just make it a lot easier to get this done in Linux. Initially, I tried to use the default bluetooth manager to try and get the bluetooth PAN to work to no avail. Instead, here are the steps I used in order to get it working on my Linux Mint 8 machine.

Firstly, the Bluetooth manager that is installed with Linux Mint needs to be replaced with the Bluez version.

sudo apt-get install bluez-compat

Once that’s done, here’s what you need to configure to get it working. Firstly, edit /etc/default/bluetooth to include the following lines

Remember to sudo when you edit as it’s a protected file accessible by root only. Once you’ve edited that file, let’s restart the bluetooth device for the new configurations to take effect.
sudo /etc/init.d/bluetooth restart
Once restarted, you’d then need to add the BNEP network adapter as a new network interface. Otherwise, Mint (or Ubuntu) would not see it as a network adapter even after pairing the iPhone. To do so, edit /etc/network/interfaces and add the following line.
iface bnep0 inet dhcp
You’re almost there now! Next, let’s start pairing the iPhone with your machine. Just use the Bluetooth manager’s pairing wizards and get it over with. The idea here is to get the iPhone and your machine to allow each other to connect. Once that’s done, I’d suggest creating a shell script for starting up and shutting down the tethering session.
For the startup script, create a script file (i.e: in a convenient directory such as your home directory and fill in the following lines. But before that, whip out your iPhone and go to Settings -> General -> About and look for the Bluetooth address. The format of the address should look something like 00:aa:bb:cc:dd:ee. So when creating the script file, replace 00:aa:bb:cc:dd:ee with your own iPhone’s address.

sudo pand –connect 00:aa:bb:cc:dd:ee -n
sleep 1
sudo ifup bnep0

And here are the commands for shutting down the PAN connection.
sudo ifdown bnep0
sudo pand -K
That’s it! If you start up the script, you should see the following output in your terminal and it should receive an IP assigned by your  carrier’s DHCP server.
Share this:

You may also like...

1 Response

  1. Rodney1524 says:

    When I enter sudo /etc/init.d/bluetooth restart
    I get the following message:
    bluetoothd compatibily daemons not started, see bluez-compat package.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.