How To: iPhone Tethering on Ubuntu 9.10 via USB




ubuntu-logoYesterday, I posted a tutorial on how to tether your iPhone on Ubuntu 9.10 using Bluetooth, and now I have another tutorial to tether iPhone using USB on Ubuntu Linux.

In this tutorial, we’ll be using an iPhone Ethernet driver written by Diego Giagio and several packages from Jonathan Beck’s PPA.

iPhone Tethering on Ubuntu 9.10 Using USB

First step is to add the PPA repository to your Synaptic repositories. Go to Terminal and run the following commands:

sudo add-apt-repository ppa:jonabeck/ppa
sudo apt-get update
sudo apt-get install automake autoconf libtool libusb-dev libfuse-dev libglib2.0-dev libxml2-dev libreadline5-dev libusbmux-dev libplist-dev libplist++-dev libplist++1 git-core build-essential libgnutls-dev python2.6-dev

After it finishes, you will have a few more things needed to get it working correctly. Both of these are downloaded via GIT repositories that require you to manually compile them. The first we will download is libiphone from Matt Colyer’s GIT repository. In your terminal window execute:

git clone git://github.com/MattColyer/libiphone.git

It should download and un-zip it in whatever folder you are in. Type in:

cd libiphone

and hopefully you will be moved into it’s directory. Next, you will need to compile the libraries so that the iPhone ethernet driver can access it. To do so execute:
./autogen.sh

followed by

sudo make install

If all goes well, you will get no errors and be back at the command prompt. Exit the directory:

cd ..

and download the iPhone Ethernet driver from it’s GIT repository:

git clone git://github.com/dgiagio/ipheth.git

now, we will need to enter into directory as well as the first directory we’ll work in:

cd ipheth/ipheth-pair

Once there you can excute:

make

followed by

sudo make install

If all goes well you should be at a command prompt again without errors. Now navigate to the last directory needed by executing:

cd ..
cd ipheth-driver

Once there you can execute the final compiling commands:

make

followed by

sudo make install

Hopefully you got no errors and are back to the command prompt.

Now, you can execute the driver:

sudo insmod ipheth.ko

Now plug in your iPhone with the USB cable to check if Internet is now working. If not, double check if tethering is enable on your phone from: Settings > General > Network > Internet Tethering and turn it on.

Also See: iPhone Tethering on Ubuntu 9.10 via Bluetooth

[Via Ubuntu Geek]

Was this post helpful? Follow us on Twitter (@SizzledCore) or become our Facebook fan for all the latest updates!


  • Pingback: iPhone Tethering on Ubuntu 9.10 (Karmic Koala) via Bluetooth()

  • Arthur

    Followed your instructions carefully, line by line, to no avail
    Error just after

    arturo@VaioTX3:~/iPhone$ cd ipheth/ipheth-pair

    arturo@VaioTX3:~/iPhone/ipheth/ipheth-pair$ make
    gcc -Wall -O2 ipheth-pair.c -o ipheth-pair -liphone
    ipheth-pair.c:25:32: error: libiphone/lockdown.h: No such file or directory

  • tommysaksvik

    Hi, got the bluetooth guide to work but USB dont..
    Why is this? i did download “git clone git://github.com/dgiagio/ipheth.git” and think that success… but why cant i make..?

    Just get this:
    calvin@laptop:~/ipheth/ipheth-pair$ make
    gcc -Wall -O2 ipheth-pair.c -o ipheth-pair -liphone
    ipheth-pair.c:25:32: error: libiphone/lockdown.h: No such file or directory
    ipheth-pair.c: In function ‘main’:
    ipheth-pair.c:36: error: ‘iphone_error_t’ undeclared (first use in this function)
    ipheth-pair.c:36: error: (Each undeclared identifier is reported only once
    ipheth-pair.c:36: error: for each function it appears in.)
    ipheth-pair.c:36: error: expected ‘;’ before ‘rv’
    ipheth-pair.c:37: error: ‘iphone_device_t’ undeclared (first use in this function)
    ipheth-pair.c:37: error: expected ‘;’ before ‘device’
    ipheth-pair.c:38: error: ‘lockdownd_client_t’ undeclared (first use in this function)
    ipheth-pair.c:38: error: expected ‘;’ before ‘client’
    ipheth-pair.c:75: error: ‘rv’ undeclared (first use in this function)
    ipheth-pair.c:75: warning: implicit declaration of function ‘iphone_get_device_list’
    ipheth-pair.c:82: warning: implicit declaration of function ‘iphone_device_new’
    ipheth-pair.c:82: error: ‘device’ undeclared (first use in this function)
    ipheth-pair.c:84: warning: implicit declaration of function ‘lockdownd_client_new’
    ipheth-pair.c:84: error: ‘client’ undeclared (first use in this function)
    ipheth-pair.c:86: warning: implicit declaration of function ‘lockdownd_get_device_name’
    ipheth-pair.c:87: warning: implicit declaration of function ‘lockdownd_client_free’
    ipheth-pair.c:89: warning: implicit declaration of function ‘iphone_device_free’
    ipheth-pair.c:96: warning: implicit declaration of function ‘iphone_device_list_free’
    ipheth-pair.c:115: warning: implicit declaration of function ‘lockdownd_pair’
    ipheth-pair.c:123: warning: implicit declaration of function ‘lockdownd_validate_pair’
    make: *** [all] Error 1

    Thanx, nice guide.

  • perkesson

    Sounds easy. I have 3Gs with os 3.1. Must I jailbreak the phone?

  • such innovation are very puzzling really…

  • nmacleod

    The Link above to MattColyer's libiphone no longer works.
    The following link should be used instead.
    git://github.com/mcolyer/libiphone.git

  • danny

    i get the same errors as tommysaksvik.

  • Hunter

    hunter@ubuntu:~/libiphone$ ./autogen.sh
    ./autogen.sh: 2: aclocal: not found
    libtoolize: putting auxiliary files in `.'.
    libtoolize: linking file `./ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
    libtoolize: linking file `m4/libtool.m4'
    libtoolize: linking file `m4/ltoptions.m4'
    libtoolize: linking file `m4/ltsugar.m4'
    libtoolize: linking file `m4/ltversion.m4'
    libtoolize: linking file `m4/lt~obsolete.m4'
    ./autogen.sh: 5: automake: not found
    configure.ac:6: error: possibly undefined macro: AM_INIT_AUTOMAKE
    If this token and others are legitimate, please use m4_pattern_allow.
    See the Autoconf documentation.
    configure.ac:12: error: possibly undefined macro: AM_PATH_PYTHON
    configure.ac:13: error: possibly undefined macro: AC_PROG_SWIG
    configure.ac:29: error: possibly undefined macro: AM_PROG_CC_C_O
    configure.ac:30: error: possibly undefined macro: AC_PROG_LIBTOOL
    configure.ac:72: error: possibly undefined macro: AM_CONDITIONAL
    configure.ac:110: error: possibly undefined macro: AS_COMPILER_FLAGS
    ./configure: line 2187: syntax error near unexpected token `dist-bzip2'
    ./configure: line 2187: `AM_INIT_AUTOMAKE(dist-bzip2 no-dist-gzip)'

    FAIL