Ubuntu – How to use iPhone internet tethering via USB with Ubuntu 10.04

connection-sharingiphonenetworkingUbuntuusb

What are the steps to use iPhone 3G Internet tethering via USB on Ubuntu 10.04?

What software do I need to install on Ubuntu for this? The phone is detected and I am able to play its songs in Ubuntu, also the tethering works fine on Windows OS.

Best Answer

I had written a post long ago on this, writing it here as well.

Get the source from Diego’s git repository. If you don’t have git installed, open the terminal and type:

sudo apt-get install git-core

Once git is installed, get the source for the drivers

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

The output should be something like

sathya@shaman:~$ git clone git://github.com/dgiagio/ipheth.git
Initialized empty Git repository in /home/shaman/ipheth/.git/
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 10 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (10/10), 8.11 KiB, done.
sathya@shaman:~$

Now, compile the pairing program.

cd ipheth/ipheth-pair

make

You should get an output like:

sathya@shaman:~/ipheth/ipheth-pair$ make
gcc -Wall -O2 ipheth-pair.c -o ipheth-pair -liphone

Next, type:

sudo make install

You should get an output like:

sathya@shaman:~/ipheth/ipheth-pair$ sudo make install
install -m 0755 ipheth-pair /lib/udev/
install -m 0644 90-iphone-tether.rules /etc/udev/rules.d
/sbin/udevadm control –reload-rules
sathya@shaman:~/ipheth/ipheth-pair$

Compile the Kernel driver:

cd ipheth/ipheth-driver

make

You should get an output like:

sathya@shaman:~$ cd ipheth/ipheth-driver
sathya@shaman:~/ipheth/ipheth-driver$ make
make -C /lib/modules/2.6.28-15-generic/build M=/home/sathya/ipheth/ipheth-driver modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-15-generic’
CC [M] /home/sathya/ipheth/ipheth-driver/ipheth.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/sathya/ipheth/ipheth-driver/ipheth.mod.o
LD [M] /home/sathya/ipheth/ipheth-driver/ipheth.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-15-generic’
sathya@shaman:~/ipheth/ipheth-driver$

The kernel module is ready. Now load the module.

sudo insmod ipheth.ko

Now connect the iPhone. The iPhone should get detected, as shown in the picture.

enter image description here

To confirm that the USB Ethernet driver is in use, open the terminal and type

dmesg | grep iPhone

You should get an output like:

sathya@shaman:~/ipheth/ipheth-driver$ dmesg | grep iPhone
[22871.808469] ipheth 2-2:4.2: Apple iPhone USB Ethernet device attached

Switch on tethering.

enter image description here

To confirm that we have indeed connected using iPhone let’s have a look at Network Manager connections:

enter image description here

Related Question