iPhone Tethering on Ubuntu 9.10 (Karmic)

Sponsored Link
If you're like me you have an iPhone and a portable computer running Ubuntu and you would like to have mobile internet without paying for an extra data plan from your carrier. Thanks to a few devoted individuals tethering the iPhone to Ubuntu is simple. The only prerequisite is that you must have an iPhone 3G or 3GS running OS 3.0 or higher. If you're running 3.0 then you can do this without jail breaking your phone by installing a modified carrier profile. However, if you're on OS 3.1+ then you will need to jail break your phone to install the modified carrier profile.

This tutorial is written for those who are not familiar with Ubuntu/Linux and is very detailed. If you are experienced feel free to just grab what you need from it.

Update: I've updated the tutorial to fix some errors that came up due to a change in the libiphone package.

Update (1/27/10): I've updated the tutorial with a new PPA and set of packages needed for tethering via USB to work. This should iron out all other problems with the tutorial.

Tethering the iPhone via Bluetooth is as simple as pairing the two devices and ensuring that Internet Tethering is turned on on your iPhone. To pair the devices you will need to install a new Bluetooth manager aptly named "blueman" from the Blueman Project PPA repository. To do this you will need to execute the following commands in a new Terminal window:

sudo add-apt-repository ppa:blueman/ppa
sudo apt-get update

After it finishes updating your repositories you can install Blueman by executing

sudo apt-get install blueman

Once everything stops working and you're back at a blank command prompt you can then close Terminal and open the "Bluetooth Manager" which can be found in the "System>Preferences" menu. (Note: A reboot may be needed for it to open) To pair the devices you will need to turn on Bluetooh on your iPhone and computer. To turn it on on your iPhone open the Settings application from your springboard, when the settings screen appears press the "General" button near the bottom, from here press the "Bluetooth" button, and then press the switch to turn it on. Once on you should see a list of devices as well as a message near the bottom saying that it is "Now Discoverable". In the "Bluetooth Manager" program press the "search" button and the list should be populated with nearby discoverable Bluetooth devices. Locate your iPhone 3G(S) from the list, select it, and press the "Keys" (pair) button above it. At this time Bluetooth Manager will attempt to pair the two devices. On both the iPhone and your computer you should see a prompt asking you if you want to pair the two. Press "Pair" on your iPhone and "Yes" on your computer. Once paired, press the diamond on Bluetooth Manager to trust your iPhone.

Now that everything is set up, you can go back into the "General" tab on your iPhone's settings and select "Network"  near the bottom you should see "Internet Tethering" (if you don't then you need to install the proper carrier profile to enable it) press on it and turn it on. Lastly, go back to the Bluetooth Manager program on your computer, right click on your iPhone and select "Network Access Point" from the option "Connect to:" it will work and hopefully give you a "Connection Established" message. Your iPhone should now have a blue banner with "Internet Tethering" on it. If all went well, you should now be able to access the internet through your iPhone's data connection.

Thanks to Sergey Stadnik Bluetooth tethering on 10.4 (Lucid) now works. According to him: "... right-click on the Blueman icon, select Plugins. Enable NMPANSupport plugin, press Ok."

Tether via USB:

Tethering your iPhone via USB uses a iPhone Ethernet driver written by Diego Giagio. Paul McEnery has set up a PPA repository with the driver and it's dependencies so there is no longer the need to compile both ‘libiphone' and ‘ipheth'. The first step is to add the PPA repository to your Synaptic repositories. To do so, open a new Terminal window and execute the following command:

sudo add-apt-repository ppa:pmcenery/ppa
sudo apt-get update

Once it finishes updating you can continue by downloading and installing the driver and the needed dependency:

sudo apt-get install gvfs ipheth-utils

When it finishes plug in your iPhone via USB, if internet tethering is enabled you should see a new interface pop up and a blue banner on your iPhone along with a dialog on your computer notifying you about a new ethernet connect. If not, check to see if tethering is enabled by opening the Settings application on your iPhone and navigating to "General>Network", near the bottom you should see "Internet Tethering" (if you don't then you will need to download and install the proper carrier profile) press on it and turn it on. Open up a browser and enjoy your mobile internet.

Hopefully, you ran into no errors with this tutorial. If you did let me know, or let me know if you ran into any error with anything else pertaining to it.


Related posts

175 thoughts on “iPhone Tethering on Ubuntu 9.10 (Karmic)

  1. Yes, I’ve run it 2 or 3 times after I added Paul’s PPA.

    I looked, the list from http://ppa.launchpad.net were updated too.

    after that, i type in my terminal

    apt-get install gvfs ipheth ipheth-utils

    But the shell returns me an error, that the ipheth package cannot be found.

  2. ipheth is the name of the source package. You should only be installing ipheth-utils, so the command should be:

    apt-get install gvfs ipheth-utils

  3. i found for some odd reason that apt-get showed the same error as ultner. however synaptic found all the packages and libiphone and libgpod updates and dependencies. try that instead of apt-get..

    doesn’t make sense i know.


  4. Worked great. It timed out while waiting for the keyserver after
    sudo add-apt-repository ppa:pmcenery/ppa
    but then I just get kept going, and it installed fine.
    It came up as Auth eth1, which seems a little strange, but I’m not complaining…
    Thanks for putting the PPA together!

  5. Why do you suggest to install Blueman for bluetooth tethering? I manage to tether via bluetooth using the builtin karmic bluetooth applet and network manager. Steps:

    1) Turn on bluetooth on iphone, and *stay* within the bluetooth page (iphone is visible ONLY wihtin that page).

    2) Click on the bluetooth icon on the taskbar, select “Configure new device”. Select iphone from the dropdown list. Insert the suggest pin. Pairing done.

    3) Left-Click on the network manager icon, the iPhone device should be there. Click on the PANU line to activate tethering.

  6. Giovanni: I prefer blueman over the gnome-bluetooth manager because it, in my opinion, looks better, and it offers a traffic monitor so I can watch my bandwidth. Plus, in my experience it has just worked better than the other.

  7. Works great. Very simple to get working, at least w/usb… Many thanx for this. I was hoping to get ubuntu to use my newly tetherable iphone…

  8. Hi. Some kind of key problem (timeout), but proceeding its all available for download.

    Rythm box now works, and plays.
    Tethering sees auto eth1 however it fails and disconnects from it. so that means fail.


  9. I needed to do an apt-get dist-upgrade after your instructions as well as restart networking and network-manager before usb tethering worked:

    sudo apt-get dist-upgrade
    sudo /etc/init.d/networking restart
    sudo /etc/init.d/network-manager restart

  10. Un-freaking-believable… It works perfectly!!! Thank you so much; if I was a chick I’d totally hook up with you in exchange for this!

  11. Thank you, absolutely brilliant! It worked on the first try.

    … except that today, after updates, it stopped working 🙁 iPhone is still mounted but no tethering happens. I wonder what happened? Unfortunately I didn’t make note of which packages were upgraded.

  12. Sorry for flooding, but to everyone who found the same: removing ipheth-utils and ipheth-dkms and reinstalling the former fixed it after kernel update.

  13. A big thanks for this. I now have internet via my iPhone again and my conversion to Ubuntu is nearly complete.

  14. Great tip – thank you!

    Just a quick note for people struggling with the USB tethering. Make sure your iPhone is unlocked before plugging it in. When mine was locked, it would only mount as a drive for copying photos. Once I unlocked it and plugged it in, the USB tethering works.

  15. Yes .. kernel upgrade broke it but remove and re-install made it work again .. (hehe if I did not know better I would have thought I was using windows)…

    Anyway .. great great work I am really happy that I can now use my Iphone as modem – without Jailbreaking — coool!

  16. I’ve now seen two reports of an issue upgrading the kernel – and am quite worried by this. I’m not sure how it is happening, but I would like the feedback as the package is about to go into Debian in the next few weeks – from where I will request a sync on Launchpad. With some luck and speaking to a few people I know, ipheth _may_ make it into Lucid.

    If anyone comes across this again, please can you try a couple of things, just to see if you can help me debug it. I am yet to have to re-install after about 3 or 4 kernel upgrades. Here is what I am looking for after the upgrade and reboot:

    Has the module built correctly for the new kernel?
    $ ls -l /lib/modules/$(uname -r)/updates/dkms

    I’m hoping to see ipheth.ko in this directory.

    Is the module loaded?
    $ lsmod |grep ipheth
    $ dmesg |grep ipheth

    3. Just try running the pair program again manually:
    $ /lib/udev/ipheth-pair

    Does this report an error? Does the “Internet Tethering” message pop up on the iPhone screen?

    So far, I have been unable to replicate this problem, and DKMS is doing what it says on the tin…

    Any help would be much appreciated.


  17. I’m getting:

    $ dmesg | grep ipheth
    [ 149.370264] ipheth: ipheth_get_macaddr: usb_control_msg: -110
    [ 149.370295] ipheth: probe of 2-4:4.2 failed with error -110

    With 2.6.31-20-generic (Karmic), no Tethering message.

    Paul, any hints? 😛

  18. I’ve managed to track down the kernel upgrade bug.

    The latest package has been uploaded. Please report any issues…


Leave a comment

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