# Driver Compilation for USB-Ethernet Adapter



## potissimus (Mar 17, 2012)

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 ).


----------



## potissimus (Mar 17, 2012)

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


----------



## steveatwell (Nov 20, 2012)

Can you send me a copy as well please?


----------



## yeahman45 (Oct 16, 2011)

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]


----------



## yeahman45 (Oct 16, 2011)

i have run netcfg and i don't see eth0

i am using that adapter found in this video btw : 



 (the android 4 in this video has "ethernet" in settings.. how come?)


----------



## yeahman45 (Oct 16, 2011)

potissimus said:


> 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.
> 
> ...


can you post the .ko driver plz? thx


----------



## yeahman45 (Oct 16, 2011)

can anyone post the .ko driver plz? thx


----------



## thecharlie88 (Jan 18, 2013)

need help me to.
I had find a mcs7830.ko compiled file in the web, but when i try to insert module it says " exec format error " where is the problem? i had copy the file into [background=rgb(247, 247, 247)]/system/lib/modules and had su permission...[/background]


----------



## yeahman45 (Oct 16, 2011)

where did you find the file?


----------



## yeahman45 (Oct 16, 2011)

* bump *


----------



## all4adriver (Feb 23, 2013)

I can't believe the thread is this long without a single link to the driver! Not all of us can complie code--including the OP!

OP--could you not put the driver up on some file locker site for us? Thanks!


----------



## all4adriver (Feb 23, 2013)

*bump*

Could some kind soul compile that driver and provide it here or via PM? I'll put it up for others to use!!! Thanks!


----------



## all4adriver (Feb 23, 2013)

*bump*

is there a USB ethernet adapter that will work on our touchpads _without _a driver?


----------



## yeahman45 (Oct 16, 2011)

* bump *


----------



## nevertells (Oct 29, 2011)

Not to rain on your parade yeahman45, but I think after three months, someone would have answered by now. Why don't you PM J.C. Sullins or look for him on IRC as he seems to be the source for this driver.


----------



## all4adriver (Feb 23, 2013)

nevertells said:


> Not to rain on your parade yeahman45, but I think after three months, someone would have answered by now. Why don't you PM J.C. Sullins or look for him on IRC as he seems to be the source for this driver.


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...


----------



## jcsullins (Sep 27, 2011)

http://goo.im/devs/jcsullins/cmtouchpad/misc/mcs7830.ko


----------



## all4adriver (Feb 23, 2013)

jcsullins said:


> http://goo.im/devs/j...misc/mcs7830.ko


Thank you. =)


----------



## nevertells (Oct 29, 2011)

all4adriver said:


> 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...


Well what do you know, he's not too busy after all.


----------



## Colchiro (Aug 26, 2011)

nevertells said:


> Well what do you know, he's not too busy after all.


... and those of you who enjoy his work should consider donating.


----------



## all4adriver (Feb 23, 2013)

Colchiro said:


> ... and those of you who enjoy his work should consider donating.


If I actually get this working, I very likely will. My Touchpad sits unused ATM, but if CM10 and wired ethernet give it new life that's certainly worth something to me.


----------



## all4adriver (Feb 23, 2013)

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!!!!


----------



## all4adriver (Feb 23, 2013)

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?


----------



## Vnge (Jul 1, 2012)

i am also getting the eth0: interface not found or invalid... any suggestions?


----------



## nevertells (Oct 29, 2011)

all4adriver said:


> 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.
> 
> ...


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.


----------



## all4adriver (Feb 23, 2013)

nevertells said:


> 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.


Awesome. Good to know.

Stupid question--should I be expecting the touchpad to power the USB ethernet adapter via the OTG cable, or do I _require _a "Y" cable to supply power? Is that why I'm getting:



> eth0: interface not found or invalid


----------



## nevertells (Oct 29, 2011)

all4adriver said:


> Awesome. Good to know.
> 
> Stupid question--should I be expecting the touchpad to power the USB ethernet adapter via the OTG cable, or do I _require _a "Y" cable to supply power? Is that why I'm getting:


You must have missed the months of discussion about this. The TouchPad USB port does not supply power, so your answer is yes, you are going to have to use a "Y" cable to supply power to your adapter. Will that fix the issue you are having, let us know.


----------



## Mpgrimm2 (Dec 6, 2012)

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!


----------



## all4adriver (Feb 23, 2013)

nevertells said:


> 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?


----------



## all4adriver (Feb 23, 2013)

Mpgrimm2 said:


> 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-dev....php?p=33077536
> [Tips and Tricks] OTG (USB Host Support) - Requires kernel support
> ...


Checked out your photos--makes things a lot clearer! I'm somewhat confused though as you reference pins being "not connected" and "shorted". Are you just describing the nature of the cable as you received it, or is that something _you_ did to the cable? And if so, do you have a link to instructions on how to do this?

Alternatively, are you sure the auction you've linked to would have the same pin configuration as what is needed? I noticed it is a different seller than the you bought from...

I followed one of the links in your .sig and had to laugh. Second paragraph and I was out at "disassemble your touchpad". I know when I'm out of my depth.


----------



## Mpgrimm2 (Dec 6, 2012)

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.


----------



## all4adriver (Feb 23, 2013)

Mpgrimm2 said:


> Hope that helps you out.


Immensely. Thanks for taking the time to help me out.


----------



## Vnge (Jul 1, 2012)

Heres what I have:

USB to ethernet: http://www.amazon.com/gp/product/B00666NDGA/ref=oh_details_o00_s00_i01?ie=UTF8&psc=1
F-F usb adapter because I have something else: http://www.amazon.com/gp/product/B000BSN4UY/ref=oh_details_o09_s00_i00?ie=UTF8&psc=1
OTG Cable: http://www.amazon.com/gp/product/B005FUNYSA/ref=oh_details_o00_s00_i00?ie=UTF8&psc=1
M-M-M y USB: http://www.amazon.com/gp/product/B002ZUV9IK/ref=oh_details_o01_s00_i00?ie=UTF8&psc=1
7 port powered USB hub to power everything: http://www.amazon.com/Plugable-Port-Speed-Power-Adapter/dp/B003Z4G3I6/ref=sr_1_8?ie=UTF8&qid=1366160437&sr=8-8&keywords=powered+usb+hub+7+port

i got the eth0: interface not valid

any suggestions?


----------



## Mpgrimm2 (Dec 6, 2012)

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


----------



## Vnge (Jul 1, 2012)

Ill post a picture later tonight when I get back to everything, but I had a keyboard and mouse work just fine on it, and it was a lot of fun. i will connect it up again tonight and see whats up


----------



## twosheds (Oct 2, 2011)

Vnge said:


> Ill post a picture later tonight when I get back to everything, but I had a keyboard and mouse work just fine on it, and it was a lot of fun. i will connect it up again tonight and see whats up


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


----------



## all4adriver (Feb 23, 2013)

twosheds said:


> 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.
> 
> ...


Thanks so much for this!!! Of course it appears my touchpad didn't charge while on the touchstone (first time I've noticed this) so I can't try this until it's re-charged, but I must say I'm pretty stoked!

edit - had time to fire it up before racing to work--Touchpad sees and initializes the driver. Ethernet lights up. Asks for address via DHCP and gets the one I've assigned it via MAC address, but no connection.

My router functions as the DNS for my household, yet trying to manually tell the touchpad to use my router--or even google's DNS for that matter--seems to end in failure.

For instance: _setprop net 8.8.8.8_ does not allow me to ping anything...


----------



## twosheds (Oct 2, 2011)

all4adriver said:


> For instance: _setprop net 8.8.8.8_ does not allow me to ping anything...


Sorry if I was a bit glib but I think I tested it after it had been connected via Wi-Fi without a reboot and it was using the DNS supplied when I used the Wi-Fi

So
I switched off Wi-Fi and rebooted
In Terminal

su
insmod /system/app/modules/asix.ko
dhcpcd eth0 
setprop net*.dns1* 8.8.8.8 (Thanks to Markluk on XDA)

And then it worked

HTH


----------



## all4adriver (Feb 23, 2013)

twosheds said:


> su
> insmod /system/app/modules/asix.ko
> dhcpcd eth0
> setprop net*.dns1* 8.8.8.8 (Thanks to Markluk on XDA)


Thanks for the clarification. It seeeeems to work, though all my google play store updates seem to be timing out, and speedtest.net seems to be down ATM, so proper testing will have to wait a bit...


----------



## all4adriver (Feb 23, 2013)

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.


----------



## yeahman45 (Oct 16, 2011)

none on the drivers work for me







how can i find what driver i need for my generic usb ethernet adapter?


----------



## nevertells (Oct 29, 2011)

all4adriver said:


> none on the drivers work for me
> 
> 
> 
> ...


Google


----------



## all4adriver (Feb 23, 2013)

*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...


----------



## all4adriver (Feb 23, 2013)

Attempting to trouble-shoot this myself isn't getting me very far. Is this something to do with my version of cyanogenmod requiring signed drivers? Is that even a thing with cyanogenmod? Is it possible to sign this driver?

I'm in way over my head and could use a hint or two as to what search results are actually applicable in this instance...

Thanks!


----------



## all4adriver (Feb 23, 2013)

bump for the desperate


----------



## all4adriver (Feb 23, 2013)

Apparently I'm a glutten for punishment. Dusted off the Touchpad and updated it, thinking NOW the ethernet is going to work.

Running CyanogenMod version 11-20141015-SNAPSHOT-jcsullins-tenderloin
Android version 4.4.4
Kernel version 3.0.101-cyanogenmod-gb58a574

Still no dice. Should this work? Does it need to be recompiled? Anywhere I can grab a working build? Thanks!


----------



## nevertells (Oct 29, 2011)

Bump


----------

