Tuesday, July 12, 2011

Step by step to enable LAN access for Motorola XOOM

With the USB toggle cable connected with Motorola XOOM, Motorola XOOM can work with all kinds of USB devices, such as USB LAN, so to connect with Local Area Network.
Pre-requisite:
  • A rooted Motorola XOOM
  • USB toggle cable
  • USB LAN adapter
  • Networking Cat5 cable
USB LAN adapter:
Google USB LAN adapter, there are many USB LAN adapter. A typical USB LAN adapter is shown below.
Networking Cat5 cable:
Not sure why, but looks a straight through Networking Cat5 cable does not work with the above USB LAN adapter. Make sure the cable has one end terminated with T568A scheme, the other end terminated with T568B scheme. Google them for more details.
Kernel driver changes:
  • Get to know the USB LAN adapter device ID and vendor ID. With USB LAN adapter connected with Motorola XOOM through USB toggle cable, find dmesg kernel log with following information. Write down the device ID and vendor ID.
  • Add "CONFIG_USB_NET_DM9601=y" into kernel config file to have drivers/net/usb/dm9601.c compiled into kernel object.
  • Add vendor ID and device ID into drivers/net/usb/dm9601.c, struct usb_device_id structure, referenced by variable products[]. e.g.
  • + {
  • + USB_DEVICE(0x0fe6, 0x9700), /* XXXY */
  • + .driver_info = (unsigned long)&dm9601_info,
  • + },
  • Compile the kernel, and apply new kernel to Motorola XOOM. New kernel will fail to load Wifi module because of un-matched kernel version magic, disable kernel version magic matching will resolve this issue.
DHCP client for USB LAN adapter interface:
Power up Motorola XOOM with Network Cat5 cable connected with Motorola XOOM through USB LAN adapter and USB toggle cable. The connection looks like the following. After XOOM is up, run "dhcpcd eth0" in a console with root. After dhcpcd return, eth0 shall get an IP. Ping command shall work. But browser still not work.
Make XOOM browser work in LAN:
In a console with root, run following commands:
  • getprop dhcp.eth0.dns1 # get dns1
  • getprop dhcp.eth0.dns2 # get dns2
  • setprop net.dns1 dns1
  • setprop net.dns2 dns2
  • Browser shall work now
How to have USB LAN work automatically:
Write a NETLINK socket program to listen all NETLINK socket event, if eth0 interface is UP, run dhcpcd on eth0 and set net.dns1, net.dns2 with dhcp.eth0.dns1 and dhcp.eth0.dns2. If eth0 interface is DOWN, reset those properties.

5 comments:

kristal said...

please give me more detail. I am very need this tutorial. thanks

Mr Basel said...

Exactly what I am looking for but not enough detail for a NOOB like me :-)

Stacey said...
This comment has been removed by the author.
Jasmine Carrel said...

I can't speak I entirely have the same opinion with a few points of yours, but you utterly have an exclusive outlook. Anyhow, I am fond of the words used in these lines…
online generic pharmacy

Rajan Sowri said...

Thank you very much for the information. I have been looking everywhere for this solution. At last I have been able to do it very nicely.