Raspberry Pi How To: Tether to Android Phone

How to tether your Raspberry Pi to an Android phone for the purpose of providing an internet connection to the RaPi:

Firstly you should consider a high current (2A or more) USB hub as some phones draw a lot of current when they start charging (as soon as you connect to USB). The RaPi may not be able to supply sufficient power for your phone.

Before you connect the USB lead enable the "Personal Hotspot" on the phone and check interfaces on the RaPi:

ifconfig -s

You will see a table with the first column (headed Iface) showing the interface name.

Connect the phone and run ifconfig -s again, this time you should see one additional interface (probably usb0) - that's the interface provided by the phone. Write down the name of this interface you will need in the next step.

Edit you network interface configuration file:

sudo nano etc/network/interfaces

Add the following lines at the end of the configuration file (replace eth1 with the interface name of your phone)

allow-hotplug usb0
iface eth1 inet dhcp 

^O to save, ^X to exit

Reboot the Pi and you should be online via your phone