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. Donkey89: I resolved this issue by uninstalling kubuntu-netbook as I read somewhere that it may not work with it.

  2. Doug: I found that starting fresh fixed my issue. Delete the libiphone directory, as well as removing anything “iphone” related in Synaptic. Essentially, search for “iphone” and then remove everything that is installed. After that download a fresh copy of libiphone and the packages needed and try again.

  3. SUCCESS! Thanks for all the effort made to get this right. I’m now able to hook up via USB or Bluetooth.

  4. Tried the new updated tutorial. This is what I get in the step right before last one.

    [email protected]:/home/dimitar/ipheth/ipheth-driver# sudo make installmake -C /lib/modules/2.6.31-16-generic/build M= modules_install
    make[1]: Entering directory `/usr/src/linux-headers-2.6.31-16-generic’
    cp: cannot stat `/usr/src/linux-headers-2.6.31-16-generic/modules.order’: No such file or directory
    make[1]: *** [_modinst_] Error 1
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-16-generic’
    make: *** [install] Error 2

    Now the network wizard is trying to connect via iphone eth2 but it drops the trying in few seconds. I can tether on windows with no problem. I dont have carrier limitations.

  5. Using Ubuntu 9.10 Netbook Remix I get the following error right after the last make:

    [email protected]:~/ipheth/ipheth-pair$ make
    gcc -Wall -O2 ipheth-pair.c -o ipheth-pair -liphone
    ipheth-pair.c: In function ‘main’:
    ipheth-pair.c:84: error: too few arguments to function ‘lockdownd_client_new’
    ipheth-pair.c:105: error: too few arguments to function ‘lockdownd_client_new’
    ipheth-pair.c:115: warning: passing argument 2 of ‘lockdownd_pair’ from incompatible pointer type
    /usr/local/include/libiphone/lockdown.h:81: note: expected ‘lockdownd_pair_record_t’ but argument is of type ‘char *’
    ipheth-pair.c:123: warning: passing argument 2 of ‘lockdownd_validate_pair’ from incompatible pointer type
    /usr/local/include/libiphone/lockdown.h:82: note: expected ‘lockdownd_pair_record_t’ but argument is of type ‘char *’
    make: *** [all] Error 1

  6. Eduardo Garcia-Prieto: This error is due to a change in the libiphone package. The library was updated and broke the compile of ipheth. I’ve written an e-mail to Diego, the author of ipheth, calling attention to the change. Hopefully he will fix it.

  7. @LonelyTV Sorry to spam, but I got the tethering to work and now I cant get any usb device except the iphone on usb. Any device, any port.
    Mouse, flash drive, bluetooth, webcam. Nothing.
    They work fine on the virtual machine (XP, as guest). Do you have any Idea how to fix the problem?

  8. When I make in ipeth-pair, the make fails as it says there are too few arguments in function lockdown_client_new

  9. Sadly, No new news. The author has yet to write me and I lost the old iPhone libraries before the update. If anyone has successfully compiled libiphone and still has the folder with the source please let me know. Thanks.

  10. Eduardo & Jim: Just wanted to let you two know that I have updated the tutorial with a new link to the libiphone archive that will allow ipheth to compile correctly. I still have no heard back from ipheth’s author, but for the time being this older commit of libiphone should work.

  11. Diego: I’m updated the tutorial AGAIN. It now works, and hopefully this edit will be the last for a while.

  12. After restart, now I cant use the mouse…
    What can I do?
    How can Uninstall all? If is posible

  13. OY! I lost all access to the internet, TWICE. The 1st time I didn’t think it had to do with tethering via USB, but it was the only change I made after doing a fresh install. Now it happened again.

  14. Trying to get Bluetooth working… hitting the “keys” icon yields a request for a password. WHAT password? About ready to give up! (Shit like this is why ultimately, MS & Mac rule)

  15. For what its worth, the first github clone command is spelled wrong and is case sensitive. it should be “git clone git://github.com/MattColyer/libiphone.git”

    Also, this is amazing how fast workarounds have been coming through. Im on a conference for school and not having internet other than over the iphone has been killing me.

  16. Also, for some reason I am still getting the same error as far as the compilation goes. :/

  17. This patch should fix the compilation issue with libiphone 0.9.6

    — a/ipheth-pair/ipheth-pair.c
    +++ b/ipheth-pair/ipheth-pair.c
    @@ -81,7 +81,7 @@
    char *device_name = NULL;
    rv = iphone_device_new(&device, devices[i]);
    if (rv == 0) {
    – rv = lockdownd_client_new(device, &client);
    + rv = lockdownd_client_new(device, &client, “ipheth-pair”);
    if (rv == 0) {
    rv = lockdownd_get_device_name(client, &device_name);
    @@ -102,7 +102,7 @@
    fprintf(stderr, “%s: cannot get %s device\n”, argv[0], uuid ? uuid : “default”);
    return -1;
    – rv = lockdownd_client_new(device, &client);
    + rv = lockdownd_client_new(device, &client, “ipheth-pair”);
    if (rv) {
    fprintf(stderr, “%s: cannot get lockdown\n”, argv[0]);

    I’ve submitted it to the author already, and binaries for karmic are in my ppa:


  18. how do we apply that patch? I’ve added your repos and it tells me that the packages don’t exist. Am I missing something?

  19. Well I did get the iPhone tethering on USB to work, but sadly my WIFI adapter stopped working after a reboot.

    Pardon my ignorance here, I am a Linux noob… but how do I uninstall the iphone tethering driver?

  20. Eduardo, did you compile from source or did you download the deb binaries?

    Also, the binary debs won’t install on my system. Anyone else having this problem?

  21. madcap,

    I compiled from source code as per the earlier revision of the tutorial. I will try the new tutorial (once I reinstall Ubuntu) and post the results.

  22. Not that I would like to detract in any way from the article, as it gives insight into what is required to compile this stuff…

    A standard installation of Ubuntu karmic with my PPA enabled (plus and apt-get update && apt-get dist-upgrade), should pull in the following packages from the repository (including their deps):

    * libiphone-0.9.6 (with patches to fix some bugs)
    * libgpod (with patches for 3.x firmware)
    * ipheth – with DKMS dynamic compiling module

    I will admit its not extensively tested, but Its what I run on my own laptop. I dont tend to do source compiles, as they are quite messy.



  23. Sorry.

    ipheth-utils will need to manually be apt-get installed.

    And gvfs is also automatically upgraded with the rest.


  24. I have a problem with the package, the error is always
    E: Konnte Paket ipheth nicht finden
    (Cannot find the package ipheth)

    thank you for some advices!!

  25. hey, nice utility, have it working fine over bluetooth but for some reason the usb port is not forcing the phone to start tethering. phone works fine if i plug it into my mac.

    any guesses?



Leave a comment

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