Android OS Forum banner

Driver Compilation for USB-Ethernet Adapter

11K views 46 replies 11 participants last post by  nevertells 
#1 · (Edited by Moderator)
I need a favor from some kind soul. I need to compile a driver in the tenderloin kernel branch, but, unfortunately, I don't have access to a computer right now, nor will I for quite some time. Specifically, I need the one below:

https://github.com/CyanogenMod/hp-kernel-tenderloin/blob/gingerbread/drivers/net/usb/mcs7830.c

At least, that's the one I need assuming that is the kernel that eyeballer is using for the nightlies he graciously compiles, which I believe it is. Can anyone confirm?

I'd really appreciate it if someone could compile that and post it here. Thanks.

P.S. Just in case anyone is curious, it's for a USB-Ethernet adapter. Some guys in some ASUS forums have confirmed it working on the Transformer w/ ICS ( http://forum.xda-developers.com/showthread.php?t=1224660&page=3 ).
 
#2 ·
Many thanks to jcsullins for compiling that driver for me. I wanted to give an update. In short, it works and I can connect to the internet using a wired connection through a USB-Adapter.

ICS on CM9 recognized the adapter as eth0 and once I ran dhcpd and assigned a DNS server, I had no problems connecting to the internet. So feel free to add a driver for your own adapter if you have one.

So to review:
-copy driver (to /system/lib/modules)
-insert module ("insmod /system/lib/modules/*yourdriver*.ko")
-get an IP address (manually, or "/system/bin/dhcpd eth0")
-add DNS (setprop net.dns1 *yourDNSserver*)

A couple caveats, I've noticed.
1) It doesn't play nice with wifi. I sort of expected this, but bringing up wlan0 and eth0 at the same time crashes the tablet.
2) Not all apps recognize the internet connection. This is a bit frustrating since most do
 
#6 ·
Many thanks to jcsullins for compiling that driver for me. I wanted to give an update. In short, it works and I can connect to the internet using a wired connection through a USB-Adapter.

ICS on CM9 recognized the adapter as eth0 and once I ran dhcpd and assigned a DNS server, I had no problems connecting to the internet. So feel free to add a driver for your own adapter if you have one.

So to review:
-copy driver (to /system/lib/modules)
-insert module ("insmod /system/lib/modules/*yourdriver*.ko")
-get an IP address (manually, or "/system/bin/dhcpd eth0")
-add DNS (setprop net.dns1 *yourDNSserver*)

A couple caveats, I've noticed.
1) It doesn't play nice with wifi. I sort of expected this, but bringing up wlan0 and eth0 at the same time crashes the tablet.
2) Not all apps recognize the internet connection. This is a bit frustrating since most do
can you post the .ko driver plz? thx
 
#4 ·
i have tried to connect a usb to ethernet adapter to my touchpad.. the adapter led's on and blinking and it is blinking at the router endpoint also.. so it seems that it is kind of working but i can't figure out how to enable it on the touchpad..

i have tried potissimus's commands:

[background=rgb(245, 245, 245)]-get an IP address (manually, or "/system/bin/dhcpd eth0") [/background]
[background=rgb(245, 245, 245)]-add DNS (setprop net.dns1 *yourDNSserver*)[/background]

[background=rgb(245, 245, 245)]in terminal emulator bt system/bin/dhcpd not found[/background]
[background=rgb(245, 245, 245)]any help needed plz.. thx in advance[/background]
 
#16 ·


I can't speak for yeahman45, but I can certainly assure you I've PM'd jcsullins. I think that probably occurred to most of us who've been pleading for the OP to post the file he received!!

Stupid question for a guy who uses IRC once a decade--whereabouts exactly would we look for him? I don't doubt he's too busy to respond to every PM he gets.

I read elsewhere that the cyanogenmod for the asus transformer contains a driver compatible with Asix AX88772. That chipset is what this cheapo adapter uses. I have half a mind to buy one just to see, but it would help immensely if someone could confirm that jcsullins cm9 or cm10 for the touchpad also has support for this chipset baked in...
 
#22 ·
From enthusiasm to madness...

OK, finally got my OTG cable and USB ethernet. Let's do this!

Tried to follow these instructions:

So to review:
-copy driver (to /system/lib/modules)
-insert module ("insmod /system/lib/modules/*yourdriver*.ko")
-get an IP address (manually, or "/system/bin/dhcpd eth0")
-add DNS (setprop net.dns1 *yourDNSserver*)

Had to troubleshoot why my Touchpad wasn't being seen as a USB mass storage device. Done--I'm feeling like a boss.
Windows Explorer didn't see the main system--just the "SD Card". What ever--not big deal. I copied the driver over to the SD Card. Downloaded Astro File Manager to copy the file to /system/lib/modules. Nope. Denied.

No problem! Dropped to terminal and enabled super user. Astro is still a no go. No worries!! I'm a big boy--I'll do this in terminal! Taught myself enough command line jargon to navigate to the file, and copy it to the intended directory. NOPE. Directory is read only.

OK, so I navigate there and try to chmod the directory with u+w. "Bad mode". Research that to learn I have to use the numbers. So I try that (775) and now it tells me it is a read-only file system.

sigh

It might not seem like it, but I'm trying. I really am.

Can someone tell me how to get past step one of this process? Please? What on earth am I doing wrong?

I recently had to do some wizardry on my phone to get openvpn to co-operate, and I suspect that would work here but I don't understand the commands, and fear I'd end up screwing something up.

This was the command:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

I'm guessing I need to unmount the system so I can work on it and copy the file into that directory? Is that the case? Would the command line be the same, or different?

Anyone else get this to work now that the driver has been posted publicly?

Thanks!!!!
 
#23 ·
To help those who come after me:

Grab ES File Explorer. It includes a Root Explorer that lets you mount the file system as writable. The "copy to" command claimed to work but did not copy the file. Copy the driver, then manually navigate to /system/lib/modules and paste. Voila.

-insert module ("insmod /system/lib/modules/*yourdriver*.ko")
this appeared to work

-get an IP address (manually, or "/system/bin/dhcpd eth0")
this took me a long time to figure out. as far as I can tell, the only "directions" noobs like me have to follow contain typos. the command should read dhcpcd eth0
HOWEVER, what I get instead is eth0: interface not found or invalid

a little help here? Does the mcs7830.ko driver work with the Asix AX88772 chipset?
 
#25 ·
To help those who come after me:

Grab ES File Explorer. It includes a Root Explorer that lets you mount the file system as writable. The "copy to" command claimed to work but did not copy the file. Copy the driver, then manually navigate to /system/lib/modules and paste. Voila.

this appeared to work

this took me a long time to figure out. as far as I can tell, the only "directions" noobs like me have to follow contain typos. the command should read dhcpcd eth0
HOWEVER, what I get instead is eth0: interface not found or invalid

a little help here? Does the mcs7830.ko driver work with the Asix AX88772 chipset?
Or you could have just downloaded Rom Toolbox Lite and used it's root browser without have to mount anything r/w. It just does it.
 
#28 · (Edited by Moderator)
Specifically, you can get a "USB OTG adapter cable with USB Power" on eBay for about $6. I ordered mine from a company called "Applecable" out of Hong Kong or Shenzhen China (something like that). You can see some pictures of all my otg items/setup here...

http://forum.xda-developers.com/showthread.php?p=33077536
[Tips and Tricks] OTG (USB Host Support) - Requires kernel support

http://www.ebay.com/itm/Micro-USB-Host-OTG-Cable-USB-power-Samsung-S2-i9100-S3-i9300-i9220-i9250-/160996044168?pt=PDA_Accessories&hash=item257c1cad88
Micro USB Host OTG Cable with USB power

Sent from my "Up all night, Sleep all day" EVO3D!
 
#29 ·
Specifically, you can get a "USB OTG adapter cable with USB Power" on eBay for about $6. I ordered mine from a company called "Applecable" out of Hong Kong or Shenzhen China (something like that). You can see some pictures of all my otg items/setup here...
Thanks so much for this. Indeed I missed all discussion that came prior--I'm pretty new to this. That said, should I be attempting this on CM9 (what I managed to install some time ago, and then pay no attention to, or should I focus on moving to CM10, as it appears that is now available thanks to jcsullins.

Specifically for OTG USB ethernet use. What version of CM are you two using?
 
#31 · (Edited by Moderator)
I've used that OTG Cable setup with both CM9 Nightly & CM10 preview. I typically stay on the latest CM9 Nightly for the solid adobe flash support.

The OTG cable from the "other" seller should work, all of them come from china anyway.

If interested, read through that [Tips and Tricks] OTG (USB Host Support) thread for various ways to make homemade OTG cables to isolate power from the TP/OTG device. In post 2 you will see some USB OTG schematics (look at #2 & #3) . All OTG adapters/cables will require pins 4&5 shorted together to signal the phone/tablet that a device is being plugged in for OTG use (sometimes the purchased OTG cables don't work b/c this "jumper" is missing/defective).

Here's some updated AppleCable Ebay Store links:
USB 2.0 3 Port Hub with data Sync Charger cable (not OTG, but a cheap hub that works. can be modified for OTG)
Micro USB Host OTG Cable w/micro USB power
Left Angled Micro USB Host OTG Cable w/USB power
Right Angled Micro USB Host OTG Cable w/USB power

Please bear in mind that I have not had a need to attempt to use OTG with a USB ethernet adapter, but I can verify OTG in general works.

You should also be advised that AndroidLover discovered that you can't directly plug any device into the Powered OTG adapter that asks for more than 100ma from the TP's USB Controller. Keyboards, mice, some thumbdrives, etc will work, but if you want a harddrive, etc, then you will need to plug in a powered hub (as linked above) which will allow it to work. I don't know why it's limited to 100ma since the TP doesn't supply power anyway (default in the kernel I suspect) but the hub reports 100ma to the TP, then the hub will accept up to 500ma devices since it can be powered separately.

Hope that helps you out.
 
#34 · (Edited by Moderator)
Vnge, post a picture of your setup.
For the parts you mentioned it should be, TP > OTG adapter > Hub (powered by wall wart barrel plug) > USB device (ie mouse, USB Ethernet, etc). Verify that at least a mouse or KB works, if so you need to work out the kernel/driver/module issues mentioned in the OP which is beyond my current skill set.

I don't recommend those USB "y" adapters because if it gets plugged into a typical usb charger with an OTG adapter it will kill data communication because most chargers have the "data" pins shorted together to enable "fast charge". The OTG adapters with the 'power' pigtail are usually isolated from the power source to prevent this from happening.

Sent from my "Up all night, sleep all day" HP CM9 Touchpad
 
#36 · (Edited by Moderator)
Did you manage to get the USB to Etherent link to work ?

I've got an 'ASIX AX88772A USB2.0 to Fast Ethernet Adapter' which works perfectly on my Nexus 7 ( plugged directly into my OTG cable) but on my Touchpad I too get the eth0 interface not valid using the driver posted earlier in this topic by JCSullins. I suspect that I need the correct driver for my device and I think I have found the source code for it on the ASIX website. I've spent the last couple of hours trying to figure out how to compile the code but I'm not much wiser than when I started.

Here's the link to the source code http://www.asix.com....tail&PItemID=97

UPDATE

I found a compiled driver ont the XDA forums for the Touchpad and for JB 4.1.2 ( which I'm running) and it works like a charm but needs power to the adapter.
Found it here http://forum.xda-dev...d.php?t=2004304 post number 4
 
#40 ·
OK, so it works, but if the touchpad goes to sleep then the connection is lost and I have to enter the /system/lib/dhcpcd eth0 command again to get it to connect. This is not wife-friendly!

As well, if the usb is unplugged and then plugged back in I need to enter the command for it to see the internet again.

Is there a way around this? A way to make it always look for an ethernet connection upon waking, or when in host mode? Thanks.
 
#43 · (Edited by Moderator)
*sigh* a little bit of knowledge is a dangerous thing...

OK, so I've updated my Touchpad with

moboot_038-tenderloin

recovery-clockwork-datamedia-6.0.3.6-20130926-tenderloin

cm-10.2-20130928-UNOFFICIAL-tenderloin

gapps-jb-20130813-signed

I sorted out a nasty boot loop, got everything running and thought I'd install the ethernet driver, but after I copy the driver to /system/lib/modules successfully and try

insmod /system/lib/modules/asix.ko

I get

insmod: init_module '/system/lib/modules/asix.ko' failed (Exec format error)

Anyone care to shed some light on this one? This wasn't a problem previously at this step...
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top