15 March 2012

Using Android’s tethering in TPlink MR3420

If your router has a USB port you can use Android’s USB tethering to connect to Internet when your regular service provider is down. To do so just follow these steps::

  1. Update the package list
      opkg update
  2. Install the following components::
      opkg install kmod-usb-uhci kmod-usb-net-rndis
  3. Once installed, connect your Android device and enable the USB tethering.
  1. In the router, check if the device has been detected:
      root@OpenWrt:~# logread
      May 22 03:16:51 OpenWrt user.info kernel: usb 1-1: USB disconnect, address 4
      May 22 03:16:51 OpenWrt user.info kernel: usb 1-1: new high speed USB device using ar71xx-ehci and address 5 May 22 03:16:51 OpenWrt user.info kernel: usb 1-1: configuration #1 chosen from 1 choice
      May 22 03:16:51 OpenWrt user.info kernel: usb0: register 'rndis_host' at usb-ar71xx-ehci-1, RNDIS device, 82:ab:00:f2:6d:9c
      root@OpenWrt:~# ifconfig
      usb0 usb0 Link encap:Ethernet HWaddr 82:AB:00:F2:6D:9C 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)
  2. Now you must choose usb0 as the wan interface by editing the /etc/config/network file or using the web interface:

config interface 'loopback'

option ifname 'lo'

option proto 'static'

option ipaddr '127.0.0.1'

option netmask '255.0.0.0'

config interface 'lan'

option ifname 'eth0'

option type 'bridge'

option proto 'static'

option ipaddr '192.168.10.1'

option netmask '255.255.255.0'

config interface 'wan'

option ifname 'eth1

' option proto 'dhcp'

option ifname 'usb0'

  1. Bring down the wan interface, then bring it up:
      ifdown wan ifup wan

No comments: