Translation(s): English - EspaƱol


What is Tethering?

Tethering is a way to access the Internet via cell phone, either by WiFi, Bluetooth or USB cable.

WiFi

This method converts the phone into a wireless router that will connect to the computer via WiFi. This method is easily accessible from the menu. With Android 4 you can could access it in Settings -> Wireless and network -> More Settings -> portable hotspot and tethering -> Portable WiFi Zone.

Once in the menu you can set the name of the wireless network, security and even restrict the computers by MAC Address. It is important to note that this method requires intensive use of the 3G Modem and wireless antenna, so you will spend a lot of battery.

Finally validate the network administrator of your choice, for example the new Wicd network.

USB Tethering

Using DebianWheezy with Gnome and the NetworkManager and Android 4.1.2 the process was very simple:

So the process below might still be necessary for older devices or different configurations:

To use this method requires enabling USB debugging. However not on all devices, so try first without USB debugging or even switch it off. For Android 4.0 you can enable it in Settings -> Developer Options -> USB debugging.

You must also activate the USB tethering. For Android 4.0 you can do it settings -> Wireless and network -> More Settings -> portable hotspot and tethering -> USB tethering.

Depending on the version of Android you have to reboot your cell phone.

Disconnect and connect the USB mobile port or USB cable. If you are debugging or testing, also disconnect the wireless network.

Run with sudo or root:

ifconfig -a

Should show output similar to the following:

eth0      Link encap:Ethernet  HWaddr 04:7d:7b:3d:a5:fc
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:43 Base address:0xc000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:84 errors:0 dropped:0 overruns:0 frame:0
          TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7924 (7.7 KiB)  TX bytes:7924 (7.7 KiB)

usb0      Link encap:Ethernet  HWaddr aa:bb:cc:dd:ee:ff
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

You see a new node USBx interface type (where X is a number) in my case it is usb0, depending on your computer could also be usb1, usb2, etc. It is usually usb0, but if it was not and you have several USB ports, disconnect the phone and run the command again to check the interface which was disappeared.

We will work with the following examples usb0 as it will be the most common, if not replace it with appropriate usb1, usb2, etc, in those steps.

Let's configure the usb0 interface to obtain DHCP and permit to go out to the Internet via the phone:

ifconfig usb0 up && dhclient usb0

Check out if the computer has internet access.

Sources