Author Topic: Rndis usb ethernet gadget problem on 64 bit Vista and up systems  (Read 18495 times)

joyrider (OP)

  • *
  • Posts: 220
    • Willems Soft
Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« on: February 11, 2010, 07:04:25 pm »
Hey guys, it seems the rndis gadget drivers in the kernel are messed up somehow, apparantly it is known and patches exist but couldn't get it to work even when applying the patches. For example i copy'ed over the gadget drivers from the newer kernel from ingenics (available on qi-hardware) which contained most of the patches already so rndis was a no go wich means no usbnet which means no debugging on my system.

So i spended the whole night trying to get this to work without any luck at all. Until i read a bit about Ethernet Gadget (cdc ecm) which does work on the kernel we uses. I made myselve a custom kernel and disabled rndis support and only let cdc ecm work. Then i had a damn hard time finding a working + free driver which wasn't using rndis. Eventually i had to settle for this demo driver  http://www.thesycon.com/eng/usb_cdcecm.shtml which lets you use any cdc ecm compatible device for up to 4 hours after which you have to reboot the system (not forcingly) to use the driver again and it WORKED on my 64 bit vista pc . They even support windows 7. So for all developpers on windows try those. If someone knows some free cdc ecm driver or one that is affordable (not like the 3000 euro runtime license from thesycon) please let me know.

The only thing i do not know is if rndis had to be disabled in the kernel or not for it to work (i did it on purpose) but will test it out later with a kernel where rndis is enabled and edit my post.

I hope this helps some of the dingux devs on windows (64 bit) Vista / Seven machines.

borus

  • *
  • Posts: 54
Re: Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« Reply #1 on: February 21, 2010, 06:34:25 pm »
My dingux still finds RNDIS driver and rejects inf file of of cdc/ecm driver. Do I need a custom kernel or am I doing something wrong ?

joyrider (OP)

  • *
  • Posts: 220
    • Willems Soft
Re: Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« Reply #2 on: February 21, 2010, 07:18:49 pm »
needs a custom kernel (didn't know that at the time), where rndis is disabled and only cdc ethernet is enabled. (a few small source changes like Defines you need to unset / set)

borus

  • *
  • Posts: 54
Re: Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« Reply #3 on: February 22, 2010, 02:12:41 pm »
joyrider,
If you have such a kernel with shutdown feature in it - can you please post it or mail it to borus at mail dot ru ?
I tried to download kernel sources, but it seems I have to install SVN tools for that, configure them etc.
I think it's too much if I don't plan to work on kernel in the future.
So if you don't mind - please share.

joyrider (OP)

  • *
  • Posts: 220
    • Willems Soft
Re: Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« Reply #4 on: February 22, 2010, 06:12:56 pm »
well i do have a kernel, but it contains to much test code (for the nand for example) and shutdown isn't working on it (since i just used booboo's kernel / sources and played with them). i can look up the changes i did on my other pc though. But i actually don't use this driver anymore it's too much a pain to use it only for four hours and cygwin is death slow etc so i installed ubuntu on my main pc as well and you don't need no special drivers or something to make it work. If you can't install a linux distro using vmware player should work also (you only have to let the usb device be used in vmware, using the menu's, windows doesn't need actual working drivers for this to work). If you really do need it i can check on my other pc sometime for the changes i did, but using vmware is probably a better choise (might be even faster then cygwin, although i never tested that).

borus

  • *
  • Posts: 54
Re: Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« Reply #5 on: February 22, 2010, 07:41:15 pm »
I can use both andLinux and Cygwin, but I doubt I can access USB ports directly from there.
Maybe you are right and vmware is a better choice.
The main reason for not using RNDIS USB Ethernet driver (linux.inf) is it works only once - right after installing driver. Then very soon it freezes all networking on my WinXP, and I have to power off the system after that (I even can't shutdown properly).

borus

  • *
  • Posts: 54
Re: Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« Reply #6 on: February 24, 2010, 09:29:31 pm »
Well, I decided to fetch and compile dingux kernel. I use "andLinux", and I had to overcome some config issues (e.g. neither "make menuconfig", "make gconfig" or "make xconfig" worked, and I didn't want to use naked "make config"), but let's leave my personal  system problems aside.

First of all, I fetched the Boukichi's version of kernel:

svn checkout http://dingux-code.googlecode.com/svn/linux-2.6.24.3-dingux/trunk/ dingux-code-read-only

(it took some time)

Then I ran "make a320_defconfig" and "make menuconfig" from dingux-code-read-only dir (the kernel's source root), and set my LCD driver to 9331 using procedure described in README.A320.

After that I went in the kernel menu to
Device Drivers->USB Support->USB Gadget Support
and
1) disabled "RNDIS Support (EXPERIMENTAL)"
2) entered "USB Gadget Drivers" and picked "Ethernet Gadget (with CDC Ethernet support)"

Then I compiled the kernel with "make zImage" and voila - now I have a kernel with CDC/ECM support and without RNDIS.
So I copied it to the root of my SD card.

Then I downloaded driver you mentioned, but it wasn't enough. In order to use it I had to modify one line in file
<path>\Thesycon\CdcEcm\V1.8.0_Demo\idisk\x86\cdcecm_demo.inf

The line
%S_DeviceDesc%=_Install,USB\VID_VVVV&PID_PPPP
should be replaced with:
%S_DeviceDesc%=_Install,USB\VID_0525&PID_A4A1

Now I connect my Dingoo to PC, install the driver using the inf file above, and voila - the connection works, it's rock stable
Of course, for file transfer don't forget to use FileZilla (at IP 10.1.0.2) and nothing else - it's the only known working FTP client.

As for driver that works only 4 hours and requires PC restart after - I think it's not that critical. My development sessions are much shorter, and I don't mind to reboot sometimes to restart the driver.

Joyrider, thank you a lot for this idea !!
I think we should let booboo know about your findings.

P.S. After researching the net and booboo's blog I see that RNDIS driver is indeed broken, and various workarounds didn't help, or at least didn't help to everybody. This makes CDC/ECM a great replacement and I am really happy. Thank you again !
« Last Edit: February 24, 2010, 09:34:33 pm by borus »

SiENcE

  • **
  • Posts: 653
    • Crank Gaming (Dingux Apps)
Re: Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« Reply #7 on: February 25, 2010, 10:26:18 am »
Can you make the Kernel for the two known LCD's and post them here :) ? I really need this for my development. Thx.

borus

  • *
  • Posts: 54
Kernel with CDC/ECM Ethernet support
« Reply #8 on: February 26, 2010, 06:40:31 pm »
SiENcE,

here you are:

http://rapidshare.com/files/356265309/zImage-9325
http://rapidshare.com/files/356266878/zImage-9331

I remind you that they are made from Boukichi's Dingux branch, and may contain some other features (e.g. shutdown is supported)

Please pay attention to the fact you have to patch cdcecm_demo.inf, otherwise Windows won't recognize the device.

Good luck !

Ezequiel

  • Guest
Re: Kernel with CDC/ECM Ethernet support
« Reply #9 on: February 26, 2010, 07:56:40 pm »
SiENcE,

here you are:

http://rapidshare.com/files/356265309/zImage-9325
http://rapidshare.com/files/356266878/zImage-9331

I remind you that they are made from Boukichi's Dingux branch, and may contain some other features (e.g. shutdown is supported)

Please pay attention to the fact you have to patch cdcecm_demo.inf, otherwise Windows won't recognize the device.

Good luck !

Please, you can provide a mirror?
thanks

borus

  • *
  • Posts: 54
Re: Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« Reply #10 on: February 27, 2010, 07:07:23 am »
Please, you can provide a mirror?
thanks

What kind of mirror do you want ?

Pingouin

  • *
  • Posts: 260
Re: Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« Reply #11 on: February 27, 2010, 12:31:23 pm »
Great work borus and joyrider!  :o

SiENcE

  • **
  • Posts: 653
    • Crank Gaming (Dingux Apps)
Re: Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« Reply #12 on: February 27, 2010, 01:13:35 pm »
@borus: thanks a lot. i try it.

Ezequiel

  • Guest
Re: Rndis usb ethernet gadget problem on 64 bit Vista and up systems
« Reply #13 on: February 27, 2010, 06:08:23 pm »
Please, you can provide a mirror?
thanks

What kind of mirror do you want ?

Any server not being the rapidshare, it does not work in my region, thank you and sorry for the inconvenience


 

Post a new topic