RE: Probelm simulating usb-ethernet controller in gadget/ether.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Mandeep,

Can you post your device's descriptors, for device, interface, endpoint,
etc? That will help resolve the endpoint issue you have.

If you developed the device side, you should be able to trace in the
device side to see whether the SetConfiguration() etc setup packets have
come into the device. Print is always informational.

Thanks,
Julie.

> -----Original Message-----
> From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Mandeep Sandhu
> Sent: Friday, January 16, 2009 6:05 AM
> To: linux-usb
> Subject: Probelm simulating usb-ethernet controller in gadget/ether.c
> 
> Hi All,
> 
> I'm trying to simulate a USB-Ethernet controller device in s/w.
> 
> For this I plan to use the ethernet gadget driver present in the linux
> kernel. Currently I don't have any debug board with a USB device
> controller,
> so I though I'd use my N810. The N810 has a OTG controller which can
act
> as
> both Master & slave.
> 
> I've recompiled the kernel though, to make it behave only as a slave
(i.e
> I've disabled the OTG config in the kernel and enabled only periheral
> mode).
> This is to keep things simple and not have OTG functionality interfere
in
> any way.
> 
> Now the host machine, to which I'll connect my USB device (N810), runs
a
> proprietary OS and we do not have access to it's source code and/or
any
> other means to access it's internals. I know that it supports CDC-ECM
> driver for a particular chip. The spec-sheet of the chip mentions the
> following 4 endpoints setup by it:
> 
> * EP0 - Control
> * EP1 - Interrupt
> * EP2 - BULK IN
> * EP3 - BULK OUT
> 
> The spec also say that the chip supports only 1 interface and 1
> configuration.
> 
> I enabled all debugs in the ethernet driver (gadget/ether.c). On
inserting
> the ether module I can bring up the USB network interface (usb0). I
see
> the following log in 'dmesg':
> 
> usb0: using musb_hdrc, OUT ep1out IN ep1in STATUS ep2in
> usb0: RNDIS ready
> 
> On connecting the device to the Host, I get the following:
> 
> musb_hdrc periph: enabled ep2in for int IN, dma, maxpacket 16
> musb_hdrc periph: enabled ep1in for bulk IN, dma, maxpacket 512
> musb_hdrc periph: enabled ep1out for bulk OUT, dma, maxpacket 512
> usb0: high speed config #2: 100 mA, Ethernet Gadget, using RNDIS
> 
> 
> 1. How can I ascertain that the enumeration has happened properly?
> 2. From the above log, does it match the endpoint config as shown by
>   the spec-sheet? I'm confused because EP1 should be interrupt, but
>   log's showing it as BULK!...or this doesn't matter.
> 
> Actually I'm expecting DHCP packets to come over this interface
because
> the HOST gets it's IP address dynamically. But snooping usb0 interface
> does not show anything! :(
> 
> This most likely means the enumeration has failed. But I can't figure
out
> why & where.
> 
> Any pointers on this would be helpfull.
> 
> Thanks,
> -mandeep
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb"
in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux