Re: help with dummy_hcd and g_zero

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

 



Alan Stern <stern@...> writes:



> 
> Questions like this should always be posted to the linux-usb mailing 
> list.
> 
> On Thu, 27 Dec 2012, Dan Clapp wrote:
> 
> > Hello Alan,
> > 
> > First, let me start by thanking you for supplying you code.  I 
> > appreciate it.  I think this is the way we would like to go to test our 
> > system before we actually get hardware made.
> > 
> > I am getting desperate!  I have been trying to use your "dummy_hcd.ko" 
> > and g_zero.ko module to try and run usb test and eventually get to write 
> > my own usb device driver.
> > 
> > However, I keep freezing up my system when I install the g_zero device 
> > driver.
> > 
> > I was wondering if can either point me in the correct direction, and or 
> > give me a couple of hints as to what i am doing wrong:
> > 
> > Here is what I am doing:
> > 
> > Running on Fedora 14 virtual machine.
> 
> Fedora 14 is about two years old now, and it isn't supported any more
> (no more software updates, bug fixes, or security fixes).  Shouldn't
> you use something more up-to-date?
> 

As you suggested, to make things more up to date, I have switched to Fedora 17,
kernel 3.6.10-2.

I have now successfully loaded the kernel modules

udc-core
dummy_hcd
g_zero

I am using libusb to read and try and do a IN/OUT transfer from the host side.

I am successfully reading the enumeration, and can see the endpoint
configuration for the g_zero driver.  But I am getting errors when I try and do
a bulk endpoint write and/or read.

In troubleshooting, I noticed the following error code output when I load the
gadget g_zero module (output from dmesg):

[5104.4532] dummy_udc dummy_udc: enabled ep-a (ep1in-bulk) maxpacket 512 stream
disabled
[5104.4532] dummy_udc dummy_udc: enabled ep-b (ep2out-builk) maxpacket 512
stream disabled
[5104.4532] gadget: source/sink enabled, alt intf 0
[5104.4824] dummy_dc dummy_udc: setup--> -22

Is this error -22 an issue, and if so, what could cause it?

I can read the enumeration with libusb calls:

Number of possible configurations: 2  Device Class: 255  VendorID: 1317 
ProductID: 42144
Interfaces: 1 ||| Number of alternate settings: 2 | Interface Number: 0 |
 Number of endpoints: 2 | Descriptor Type: 5 | EP Address: 129 |
 Descriptor Type: 5 | EP Address: 2 | Interface Number: 0 |
 Number of endpoints: 4 | Descriptor Type: 5 | EP Address: 129 |
 Descriptor Type: 5 | EP Address: 2 | Descriptor Type: 5 |
 EP Address: 131 | Descriptor Type: 5 | EP Address: 4 | 

When I write to EP 2 I get an error is dmesg

[ 9421.189601]  gadget: bad OUT byte, buf[0] = 97

where I am sending four bytes "abcd", so I am getting an error on the first byte.

thanks for any help.

Dan

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




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