Re: device descriptor not sent correctly

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

 



On Fri, 20 Nov 2009, Ivan Braginski wrote:

> On Fri, Nov 20, 2009 Greg KH wrote:
> > [...]
> > > I'm trying to use an evaluation board as USB gadget, but when I
> > > connect it to a host, the host says "unknown device" and VID and PID
> > > are both 0000. So the device descriptor is empty or not sent properly.
> > 
> > Not necessarily, I've seen vid and pid set to 0000 in some devices.
> 
> How so? For example, in the drivers g-serial and g-zero, the VID is set to 0x0525. Why is it set to 0000 later? What can I do to avoid this?
> 
> > [...]
> > > Can you point me out, which function does listen to the host, or which
> > > function actually sends the device descriptor? It does not have to be
> > > in pxa27x-udc, I would also appreciate, if you can show this in any
> > > other driver, because I only want to see, what such code looks like.
> > 
> > The USB core handles all of this for you on the host side.  On the
> > gadget side, it is in the "type" of device that you have specified to be
> > built for your device.  What type did you set?
> 
> Sorry, you mean the type of the device driver? Then, it is g-serial as CDC-ACM, but also others like g-zero as normal type. (The drivers are compiled as modules and modprobed with no parameter.)

In g_zero, the device descriptor is sent by composite_setup() in 
composite.c.  In g_file_storage, the device descriptor is sent by 
standard_set_req() in file_storage.c.

Alan Stern

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