USB tethering an Android phone to an OpenWRT router

Now that I’ve got OpenWRT 10.03 “Backfire” running on my DIR-825, I decided to take advantage of the new USB tethering feature of Android 2.2 “Froyo”.  I connected my Nexus One phone to the USB port of the DIR-825, and installed the following packages:

  • kmod-nls-base
  • kmod-usb2
  • kmod-usb-core
  • kmod-usb-net
  • kmod-usb-net-cdc-ether
  • kmod-usb-net-rndis
  • kmod-usb-ohci
  • kmod-usb-uhci

Once these were installed, I edited /etc/config/network, and under “config interface wan” replaced “option ifname eth1″ with “option ifname usb0″.

I enabled USB tethering on the phone, and upon rebooting the router, it successfully set up the usb0 network interface and obtained its IP address, netmask, default gateway, etc. from the phone via DHCP.

At this point the only problem is that if I disconnect the phone (or disable tethering), then reconnect, the usb0 interface appears, but does not get configured by dhcp.

This entry was posted in Android, OpenWRT. Bookmark the permalink.

4 Responses to USB tethering an Android phone to an OpenWRT router

  1. Alex says:

    Hi!

    This is such a great idea.
    I am wondering, why nobody else is intersted in this topic! I am using a Netgear WNR3500L but I did not yet find a firmware.

    Alex

  2. gabriel says:

    rebooting the modem! that’s what was missing from me.

    This makes a great backup uplink for the times cable/dsl are down.

    Anyone want to take a shot at how to enable hotplugging the usb0 interface with udev rules? i’m failing miserably.

  3. Pingback: Usando el anclaje de red (tethering) de Android en OpenWrt | El Blog de Luis

  4. Nikolas Britton says:

    Hi,

    You can solve that problem by installing udev and usbutils packages… read more about it here: https://forum.openwrt.org/viewtopic.php?pid=146384

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>