2011-06-14 08:14:33     Error in g_zero? (Gadget usb)

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-06-14 08:14:33     Error in g_zero? (Gadget usb)

Morten Kvistgaard (DENMARK)

Message: 101253   


Hello there,


We're trying to implement some device side usb on BF526 ezbrd. We can make the g_serial work. But the MS Windows driver for that one has some serious faults. So we're trying to use libusb/winusb for the job instead.


We can make the g_zero (sink) work with winusb. (In a very boring unresponsive way.) But the loopback config in g_zero seems to be broken?


Here's the output:




root:/> modprobe g_zero loopdefault=1


zero gadget: Gadget Zero, version: Cinco de Mayo 2008


zero gadget: zero ready


root:/> zero gadget: high speed config #2: loopback


zero gadget: can't loop ep6out to ep5in: -22






I doubt it's supposed to say "can't loop ... " ? (And it's not sending back any output.)




We're using the 2010R2 uclinux, uboot etc.




Is there a trick or something to make the loopback work?






Does anyone have some good advice in regard to libusb/winusb and uclinux? Despite the whole ease-of-use and near defacto status in micro.c dev. it seems to frighteningly difficult to make it work with uclinux.





2011-06-14 08:19:40     Re: Error in g_zero? (Gadget usb)

Morten Kvistgaard (DENMARK)

Message: 101254   


Edit: It's the 2010R1-RC5 uclinux ofc.




2011-06-15 10:45:56     Re: Error in g_zero? (Gadget usb)

Morten Kvistgaard (DENMARK)

Message: 101288   


Meh, never mind. I've found something better than the g_zero loopback.


The g_serial has a "generic" mode which will remove all the fancy stuff. (Pure transfers back and forth)


You can load it with the following command:


modprobe g_serial use_acm=no




Unlike the ACM mode, the generic mode is very easy to communicate with through libs such as winusb.




2011-06-17 02:14:09     Re: Error in g_zero? (Gadget usb)

Mike Frysinger (UNITED STATES)

Message: 101335   


ive opened a tracker item for the loopback mode: