Friday, March 4, 2011

EasyTether internet tethering for Android on Debian

My local cable provider likes to mess with me, so on occasion I get internet via my cellphone. In practice this works rather well. Install EasyTether on the phone and on your Debian machine. Connect via USB, then run some commands on the Debian side to route packets via your cellphone. The software is designed to be run standalone, not as part of the normal Linux system, which is a little weird. The following stanza helps with this. If you add the following to /etc/network/interfaces, you can turn on/off the tethering using the normal ifup/down commands:
iface easytether0 inet dhcp
      pre-up easytether connect &
      pre-up sleep 1
      pre-down killall easytether
That is, after the above is added, do "sudo ifup easytether0" to route packets through the USB-connected Android device. To turn it off, do "sudo ifdown easytether0". This solution is rather buggy. Disconnect and reconnect the USB cable to solve some problems. Also, by default EasyTether doesn't route ICMP packets, which means you can't use "ping -c1 4.2.2.2" to verify your internet connection is up. "curl google.com" is a good check instead. Note that EasyTether Lite doesn't route https, which means Gmail and Facebook doesn't work. To get around the latter, use the mobile site: http://m.facebook.com The full software is $10 and has been a fantastic value for me -- highly recommended. http://www.appbrain.com/app/easytether-lite/com.mstream.easytether_beta

No comments:

Post a Comment