Forums » Software Development »
ethernet over USB don't work
Added by yilin wang over 11 years ago
Hi,
I'm using MityARM-1808 with my own carrier board.
It has a hi-speed USB 2.0 to ethernet controller(smsc7500) connected with USB0 on mityarm-1808.
I connected the smsc7500 to my PC.
I selected the smsc75xx drivers in menuconfig and it printed "usbcore: registered new interface driver smsc75xx" when boot the kernel.
and I also build the USB gadgets as modules followed this link: http://processors.wiki.ti.com/index.php/UsbConfigDevRNDIS.
but when I login the system and insmod g_ether.ko,it printed
"
gadget: using random self ethernet address
gadget: using random host ethernet address
usb0: MAC 66:5c:9b:d2:cc:59
usb0: HOST MAC 0e:86:be:5e:fa:de
gadget: Ethernet Gadget, version: Memorial Day 2008
gadget: g_ether ready
musb-hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usb 2-1: new full-speed USB device number 2 using musb-hdrc
usb 2-1: new high-speed USB device number 3 using musb-hdrc
usb 2-1: device descriptor read/64, error -110
usb 2-1: device descriptor read/64, error -110
usb 2-1: new high-speed USB device number 4 using musb-hdrc
usb 2-1: device not accepting address 4, error -110
usb 2-1: new high-speed USB device number 5 using musb-hdrc
usb 2-1: device not accepting address 5, error -110
hub 2-0:1.0: unable to enumerate USB device on port 1
"
I do ifconfig -a ,i can see the usb0 without ipaddress.but can't see if do a ifconig without -a.
and I do ifconfig usb0 xx.xx.xx.xx to set usb0 ipaddress,it prints "usb0 is not ready"
but when i do ifconfig again ,i can see usb0 with ipaddress i set,no RX and TX packets.
the smsc7500 don't work,and there is no new connection appears on my PC.
Was hardware problem ?or something wrong with config of my kernel and drivers?
Appreciate any help.
-wang
Replies (6)
RE: ethernet over USB don't work - Added by David Rice over 11 years ago
I think you are using the wrong approach to do this. The RNDIS driver (g_ether.ko) is to allow IP over USB and is a USB peripheral (not host) driver. It sets the USB port on the ARM to look like a remote Ethernet adapter to a PC that is connected via USB cable. This allows you to plug in the ARM USB OTG or peripheral port to a PC and have the PC "see" a new Ethernet adapter. There is no actual Ethernet controller chip involved -- it is USB to USB only.
You have selected the driver for the smsc7500 in menuconfig, so that should enable the support you need. Did you enable it to be compiled into the kernel [*] or as a module [M]? If you selected [*] in menuconfig, you don't need to load a .ko file. If you selected [M], you'll need to find the correct kernel module to load. In this case, the correct module is probably smsc75xx.ko. If you selected [M] you will also need to do a "make modules" to compile associated kernel modules in order to build the .ko file.
Dave
RE: ethernet over USB don't work - Added by yilin wang over 11 years ago
Sorry for late reply. Thanks for your help at first.
I have removed the RNDIS driver.
What I use is a USB2.0 ethernet adapter with smsc7500. And the adapter is full size USB port. It connects to usb0 on mityarm1808.
I connected ID pin to GND to make usb0 work in host mode.
I also selected the driver for smsc7500 and enabled it to be compiled into the kernel[*].I could see the message "usbcore: registered new interface driver smsc75xx" when boot the kernel. I think that indicate the driver is ready to work.
But now my problem is : the DRVVBUS did not be high and that cause VBUS can't be 5V.
Should I modify the driver to make the DRVVBUS be high? or anything other wrong?
-wang
RE: ethernet over USB don't work - Added by yilin wang over 11 years ago
Sorry for late reply. Thanks for your help at first.
I have removed the RNDIS driver.
What I use is a USB2.0 ethernet adapter with smsc7500. And the adapter is full size USB port. It connects to usb0 on mityarm1808.
I connected ID pin to GND to make usb0 work in host mode.
I also selected the driver for smsc7500 and enabled it to be compiled into the kernel[*].I could see the message "usbcore: registered new interface driver smsc75xx" when boot the kernel. I think that indicate the driver is ready to work.
But now my problem is : the DRVVBUS did not be high and that cause VBUS can't be 5V.
Should I modify the driver to make the DRVVBUS be high? or anything other wrong?
-wang
RE: ethernet over USB don't work - Added by Michael Williamson over 11 years ago
If you want to force HOST mode, then you will need to rebuild the kernel and change the call from:
mityomapl138_usb_init(MUSB_OTG);
to
mityomapl138_usb_init(MUSB_HOST);
This will force host mode in the driver. I think when you do this the DRVVBUS pin should be driven.
-Mike
RE: ethernet over USB don't work - Added by yilin wang over 11 years ago
How to do this change ?
I could find the call "mityomapl138_usb_init(MUSB_OTG)" in which file ?
An odd thing is that when I changed nothing but some drivers option in menuconfig, rebuilt the kernel, the DRVVBUS pin was not driven.
But the kernel I built before those change in menuconfig, the DRVVBUS was driven.
In above two conditions,the USB0id pin was grounded.
-wang
RE: ethernet over USB don't work - Added by yilin wang over 11 years ago
My problem is solved now.
Thanks a lot.