Wednesday, 2 April 2014

USB Tethering Android Device with Mac OS X

USB Tethering has its advantages over Wi-Fi Hotspot. Most importantly it doesn't drain the battery juice of your phone compared to a Wi-Fi Hotspot. And when you need tethering, you're probably travelling (away from power sources, ...). 


Internet <----> Mobile Operator <----> Android Phone/Tablet <--USB--> Mac OS X



Enable USB Tethering on Android Device

Verify that your Android device has the capability exposed in Settings > Wireless & Networks > More ... > Tethering & portable hotspot > USB tethering. 

Tick it.

Background of RNDIS

Android devices utilize Microsoft's RNDIS (Remote Network Driver Interface Specification) protocol for USB tethering. With Windows it works out of the box and Linux drivers too exist. Now a driver maintained by Joshua, brings RNDIS support for to OS X. 

Download and Install 

Download latest driver's binary package for Mac OS X from local mirror (rel 5) or JoshuaWise or compile from sources if you must from git

Quoting from Joshua's page:

HoRNDIS (pronounce: “horrendous”) is a driver for Mac OS X that allows you to use your Android phone's native USB tethering mode to get Internet access. It is known to work with Mac OS X versions 10.6.8 (Snow Leopard) through 10.9 (Mavericks – see notes below), and has been tested on a wide variety of phones. Although you should be careful with all drivers that you install on your computer, HoRNDIS has been tested at least well enough for the author (and many others) to run full time on their own personal computers.

HoRNDIS is implemented as a kext, rather than as a user-space program that opens a TAP or TUN device; this means that it does not conflict with other TAP/TUN kexts that you might have installed (like OpenVPN, Tunnelblick, or Cisco VPN). The driver implements Microsoft's proprietary RNDIS protocol, which is the only protocol supported natively by Android devices; although Linux and Windows users have enjoyed native RNDIS drivers for years, Mac OS X supports only CDC Ethernet devices out of the box.

The chief advantage of HoRNDIS over other tethering solutions is that it uses the a first-class supported feature in the phone's firmware. Other solutions either take over the phone's Wi-Fi stack without the Android operating system's knowledge, or create an emulation IP stack in userspace on the phone; in many cases, the built-in USB tethering support can be more stable, more reliable, and faster.



Assuming you start with the binary package, double click to start installing and accept defaults. 
Once you reach the "completed successfully" screen, connect your Android phone or tablet over USB and you're good to go. OS X will show a popup about new network interface. If you don't see one, you can always go to the same through System Preferences > Internet & Wireless > Network
Defaults shown on OS X when Nexus 4 with USB Tethering is connected
Here again accept the defaults and click "Apply".




Now the same screen will display IP addresses fetched from the Android device as shown in the screenshot and your laptop will be connected to the Internet. 

Enjoy browsing on Mac OS X with Internet from your phone.

No comments:

Post a Comment