Re: Multiple g_zero gadgets

2017-11-13 Thread Krzysztof Opasiak
On 11/13/2017 10:53 AM, Krzysztof Opasiak wrote: On 11/09/2017 12:15 PM, Felipe Balbi wrote: Hi, Hinko Kocevar writes: The way dummy was written, it can only instantiate one gadget. You either need a real USB peripheral controller, or you need to patch dummy to instantiate more than on

Re: Multiple g_zero gadgets

2017-11-13 Thread Krzysztof Opasiak
On 11/09/2017 12:15 PM, Felipe Balbi wrote: Hi, Hinko Kocevar writes: The way dummy was written, it can only instantiate one gadget. You either need a real USB peripheral controller, or you need to patch dummy to instantiate more than one gadget. -- balbi By dummy - are you referring to

Re: Multiple g_zero gadgets

2017-11-10 Thread Alan Stern
On Fri, 10 Nov 2017, Hinko Kocevar wrote: > By the way, if I try to do a control out transfer to the g_zero gadget > I get 'Pipe error' (using libusb-1.0). Is this expected? No, it is not expected (assuming your transfer has USB_TYPE_VENDOR and bRequest = 0x5b and wValue = wIndex = 0). Alan Ster

Re: Multiple g_zero gadgets

2017-11-10 Thread Hinko Kocevar
By the way, if I try to do a control out transfer to the g_zero gadget I get 'Pipe error' (using libusb-1.0). Is this expected? On Thu, Nov 9, 2017 at 4:24 PM, Alan Stern wrote: > On Thu, 9 Nov 2017, Felipe Balbi wrote: > >> >> Hi, >> >> Hinko Kocevar writes: >> >> The way dummy was written, it

Re: Multiple g_zero gadgets

2017-11-09 Thread Felipe Balbi
Hi, Alan Stern writes: >> Hinko Kocevar writes: >> >> The way dummy was written, it can only instantiate one gadget. You >> >> either need a real USB peripheral controller, or you need to patch dummy >> >> to instantiate more than one gadget. >> >> >> >> -- >> >> balbi >> > >> > By dummy - are

Re: Multiple g_zero gadgets

2017-11-09 Thread Alan Stern
On Thu, 9 Nov 2017, Felipe Balbi wrote: > > Hi, > > Hinko Kocevar writes: > >> The way dummy was written, it can only instantiate one gadget. You > >> either need a real USB peripheral controller, or you need to patch dummy > >> to instantiate more than one gadget. > >> > >> -- > >> balbi > > >

Re: Multiple g_zero gadgets

2017-11-09 Thread Hinko Kocevar
Thanks for explaining! I've resorted to creating a dummy_hcd2.c and zero2.c from corresponding existing sources, tweaked source and Makefiles a bit, compiled and loaded four modules. As a result I get two dummy buses and two zero gadgets, one on each bus.. perfect! Now to see if is usable.. -hink

Re: Multiple g_zero gadgets

2017-11-09 Thread Felipe Balbi
Hi, Hinko Kocevar writes: >> The way dummy was written, it can only instantiate one gadget. You >> either need a real USB peripheral controller, or you need to patch dummy >> to instantiate more than one gadget. >> >> -- >> balbi > > By dummy - are you referring to g_zero of dummy_hcd? Okay, we

Re: Multiple g_zero gadgets

2017-11-09 Thread Hinko Kocevar
Hi Felipe, > > The way dummy was written, it can only instantiate one gadget. You > either need a real USB peripheral controller, or you need to patch dummy > to instantiate more than one gadget. > > -- > balbi By dummy - are you referring to g_zero of dummy_hcd? /hinko -- .. the more I see th

Re: Multiple g_zero gadgets

2017-11-09 Thread Felipe Balbi
Hi, Hinko Kocevar writes: > I'm using g_zero and dummy_hcd to test my userspace software dealing > with USB device I currently do not have. > Works great! > But for single g_zero instance ... is it possible to have two g_zero > devices seen in the system? > > Here is what I get: > > # Testing wi

Multiple g_zero gadgets

2017-11-09 Thread Hinko Kocevar
Hi, I'm using g_zero and dummy_hcd to test my userspace software dealing with USB device I currently do not have. Works great! But for single g_zero instance ... is it possible to have two g_zero devices seen in the system? Here is what I get: # Testing with dummy USB device Get kernel sources