• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps USB networking problem (kernel module development)

Baggus

Lurker
Hi,

Over the past few days I've tried getting my USB Ethernet cable to work with my Tab 2 10.1 running stock ICS 4.0.4
And now I got it up to the point where my PC and my Tab can ping eachother, but that's about it. Get ready for a long and technical read ;)

Now I know Samsung has neglected to include drivers for commonly used USB to Ethernet cables, so I built my own modules to load into the stock kernel (3.0.8-1060237):
drivers/net/mii.ko - Generic Media Independent Interface device support
drivers/net/usb/usbnet.ko - support for usb network
drivers/net/usb/mcs7830.ko - driver for this specific ethernet cable (moschip 7830 based)

Driver depends on support for USB network, USB network depends on support for media independent interface.

So loading these into the kernel using insmod works. After I plug in the cable the kernel tells me:
Code:
[ 3754.987335] MOSCHIP usb-ethernet driver 1-1:1.0: eth0: register 'MOSCHIP usb-ethernet driver' at usb-musb-hdrc-1, MOSCHIP 7830/7832/7730 usb-NET adapter, 00:60:6e:42:32:8f
And even netcfg agrees eth0 exists:
Code:
root@android:/ # netcfg
lo       UP                                   127.0.0.1/8   0x00000049 00:00:00:00:00:00
ifb0     DOWN                                   0.0.0.0/0   0x00000082 26:d8:ae:9d:18:30
ifb1     DOWN                                   0.0.0.0/0   0x00000082 3e:2c:67:48:bd:92
sit0     DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00
ip6tnl0  DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00
eth0     DOWN                                   0.0.0.0/0   0x00001002 00:60:6e:42:32:8f
wlan0    UP                              130.161.censored/26  0x00001043 1c:66:aa:50:39:ee
root@android:/ #
So for testing I put the device on a simple switch with just my PC.
I gave my PC 192.168.1.253 and the tablet 192.168.1.200 (both netmask 255.255.255.0).
Code:
root@android:/ # ifconfig eth0 192.168.1.200 netmask 255.255.255.0
And there was much rejoicing:
Code:
Windows:
Reply from 192.168.1.200: bytes=32 time<1ms TTL=64
Android:
64 bytes from 192.168.1.253: seq=32 ttl=128 time=0.733 ms

Now here is the problem: Half the apps trip over this new eth0 network interface.

For instance:
"kWS - android web server" works great, immediately recognizes eth0 and uses it without any problems.
Android Browser crashes the network driver.
SSHDroid starts up thinking it is an ipv6 interface and crashes the network driver on any incoming connections.
And pretty much most apps think there is no connection.

Also when I turn off WiFi (regardless if it is connected to a network or not), eth0 is killed too.

Couple of questions:
What am I missing to make Android treat this as a good, normal network interface?
How can I make the modules load when the tablet boots?
How can set the IP adres so I don't have to use ifconfig eth0 192...etc every time I connect the device?
How can I add the eth0 to the settings GUI of Android?
Can installing a different kernel or something like CyanogenMod fix the problem alltogether?

Many thanks in advance for any answers!

If anyone is interested in the modules I compiled please reply, but note they only work on rooted tablets that have stock ICS kernel version 3.0.8-1060237 because of what Linux calls "version magic".

Kind Regards,
 
Hi,
I would like to try your kernel modules on rooted GoClever Tab R75 with ICS 4.0.4. Could you please upload them somewhere (preffrably as a post attachment).
If you have a link to compile instruction you have used, could you share it?
Thanks
 
sorry but i can only compile it for that exact version of android for that exact tablet, so i wont be able to help you

besides, i got the driver loaded, but it is still very unstable, i wouldnt recommend it
 
Back
Top Bottom