AX88179 for N900/Maemo & Nexus7/Android 4.2

Recently I purchased 1 Gbps / USB 3.0 ethernet-to-usb adapter (InfoZone U790). I planned to use it with both my N900 and Nexus 7 devices. Unfortunately neither of them supported it right out of the box. On axis website I downloaded driver source code (http://www.asix.com.tw/FrootAttach/driver/AX88179_178A_LINUX_DRIVER_v1.3.0_SOURCE.tar.bz2) and compiled it for both platforms. You can follow instructions below to get it working for your device.

Nokia N900/Maemo:

1) Install latest 2.6.28.10-power51 kernel, for this you can follow instructions http://maemo.org/packages/package_instance/view/fremantle_extras-devel_free_armel/kernel-power-flasher/2.6.28-10power51/

2) Install USB host mode enabler (aka H-E-N) utility. More information on this is here: http://wiki.maemo.org/N900_Hardware_USB_Host#Installation

3) Since 2.6.28-10 is relatively old kernel version. I had to modify axis driver source code to compile and run it against this kernel version. You can grab it here: https://sites.google.com/site/vtsozik/linux/ax88179-n900-meego/ax88179.tar.bz2?attredirects=0&d=1 bunzip2 it on your N900 device then run sudo gainroot, switch into unzipped folder and run make and then make install. You will need to install gainroot, gcc, binutils, bunzip2 and the corresponding kernel-headers packages to accomplish this. Please don't forget to 'cd /lib/modules' and 'ln -s 2.6.28.10-power51 current' - create current link to the target kernel version if you setup multiple boot.

If you don't want to build kernel module yourself you can grab pre-built https://sites.google.com/site/vtsozik/linux/ax88179-n900-meego/ax88179_178a.ko?attredirects=0&d=1 You will need to copy it to '/lib/modules/2.6.28.10-power51/' directory and then run '/sbin/depmod -a' as root under this directory.

4) As a final step you need to install udhcp package. Once done plug ethernet to usb adapter via micro usb host adapter cable to the phone. Launch H-E-N, select 'High Speed hostmode', then 'VBUS Boost on' and finally select 'Enumerate' once adapter green LED becomes solid. Then launch terminal, switch to root, and run '/sbin/udhcp -i eth0' or just 'udhcp' if you have path variable setup correctly and no wifi networks are present (you need to disconnect from wifi before bringing up wired interface).

Nexus 7/Android 4.2:

1) Unlock boot-loader and root your Nexus 7 (http://bernaerts.dyndns.org/android/246-ubuntu-root-nexus-7-tablet)

2) You can either download bootimg (based on JOP40D) that I pre-built on my machine (https://sites.google.com/site/vtsozik/linux/ax88179-n900-meego/newboot.img?attredirects=0&d=1)

or download kernel source code (http://source.android.com/source/building-kernels.html), Android SDK as you will need it anyway (http://developer.android.com/sdk/index.html). Then deploy source file extracted from driver source code to 'drivers/net/usb/ax88179_178a.c' and header file to include/linux/usb/asix.h also deploy attached KConfig (https://sites.google.com/site/vtsozik/linux/ax88179-n900-meego/Kconfig?attredirects=0&d=1) and Makefile (https://sites.google.com/site/vtsozik/linux/ax88179-n900-meego/Makefile?attredirects=0&d=1) to 'drivers/net/usb'. Cross compile new kernel image:

export ARCH=arm

export SUBARCH=arm

export CROSS_COMPILE=arm-eabi-

make tegra3_android_defconfig

make

Assemble newboot.img, more on this here http://forum.xda-developers.com/showthread.php?t=443994

4) using fastboot utility provided with Android SDK re-flash device with new kernel ('fastboot flash boot newboot.img') and reboot Nexus 7 into normal mode. Adapter is going to work right away since android kernel is not modular and all device drivers are pre-loaded into memory at the start-up.