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

392

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

Share:
392
neo
Author by

neo

Updated on September 17, 2022

Comments

  • neo
    neo over 1 year

    I have UIScrollView with other UIView elements inside. My other UIView elements are mostly segmented controls. If I click on a UISegmentedControl and hold for a second and then try to scroll, then no scrolling happens. I can only scroll when my finger touches and swipes immediately. I checked other iOS applications such as mail. The behavior was that you touch and hold on a mail, then it's highlighted, but as soon as finger moves away, the scrolling happens and highlighting is undone. How can I implement this behavior?

    • Sudershan shastri
      Sudershan shastri over 10 years
      If you have added segmented control over the Scroll View, you can add it over the controller's view. It should work.
  • studiohack
    studiohack over 12 years
    You should make this into a small blog post for the SU Blog, Sathya. +1 for awesomeness! :)
  • juanefren
    juanefren almost 12 years
    I would like to add that I needed to install "libimobiledevice-dev" package in order to be able to make ipheth-pair.
  • neo
    neo over 10 years
    I forgot to mention that I already have a controller and I add the segmented control to the controller's view.