iPhone Tethering on Ubuntu 9.10 (Karmic)

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.



Tether via Bluetooth:

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.



Tether via USB:

Tethering your iPhone via USB uses a iPhone Ethernet driver written by Diego Giagio as well as several packages from Jonathan Beck’s PPA. For ease and to maintain sanity I opted to use a PPA with packages for a bulk of the tutorial. 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:jonabeck/ppa
sudo apt-get update
---------------------------------------------------------------

Once it finishes updating you can continue by downloading and installing the needed libraries and programs by executing:


-----------------------------------------------------------------------------------
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

-----------------------------------------------------------------------------------
When it finishes downloading and installing 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

-------------------------------------------------------
plug in your iPhone via USB and if internet tethering is enabled you should see a new interface pop up and a blue banner on your iPhone. 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 articles

Howto setup Second IP address or Virtual IP address to your Networkcard in ubuntu

Fix for Broadcom 4328 v3 wireless problem in Ubuntu 9.10 (Karmic)

Debian/Ubuntu GNU/Linux device driver check.

Increase your internet speed with Namebench

0 comments: