Page 2 of 2

Re: Two HID joysticks from one device

Posted: Tue Apr 20, 2010 10:29 pm
by mojo
Okay, so just for clarity, using two endpoints works and I should try implementing it?

Oh, and I looked on Ralph's site but couldn't see where he did it that way.

-- EDIT --

I tried it and could not get it to work. To further complicate things even if it can be made to work then I need to be able to switch on the fly, which means dynamic configuration descriptors which do not appear to be supported in the driver as it references the descriptor by name rather than querying it.

Re: Two HID joysticks from one device

Posted: Wed Apr 21, 2010 12:37 am
by ulao
Oh, and I looked on Ralph's site but couldn't see where he did it that way.
Yeah, Grendel fixed his post to clear up the confusion. I'd like to see how you make out.

Re: Two HID joysticks from one device

Posted: Fri Apr 23, 2010 7:40 pm
by mojo
Well I think the short answer is that Linux users are boned.

Re: Two HID joysticks from one device

Posted: Sun Apr 25, 2010 7:54 am
by Grendel
When I said interface, I ment interface as described in USB 2.0 chapter 9.6.5. You need to add a 2nd interface descriptor to the configuration descriptor, followed by another HID descriptor and a endpoint descriptor for EP3. A 2nd report descriptor needs to be connected to that interface as well. I'm sure there's more that needs to be taken care of, hence I said "needs some research".. ;)

Re: Two HID joysticks from one device

Posted: Sun Apr 25, 2010 12:32 pm
by mojo
I did understand what you were getting at and attempted to implement it. I must have done something wrong I suppose. It's not an elegant solution either way and presents further problems for me because my device (Retro Adapter) re-configures itself on the fly by disconnecting, changing the USB config, device and HID descriptors and then re-connecting. From the look of it V-USB needs EP3 support compiled in so I would have to make some further changes to deal with that.

Re: Two HID joysticks from one device

Posted: Sun Jun 06, 2010 4:29 pm
by Kash
Get this problem solved. The only thing you have to do - specify "HID_QUIRK_MULTI_INPUT" for your device in drivers/hid/hidusb/hid-quirks.c

Code: Select all

{ USB_VENDOR_ID_KASH, USB_DEVICE_ID_KASH_JOY, HID_QUIRK_MULTI_INPUT },

USB_VENDOR_ID_KASH and USB_DEVICE_ID_KASH_JOY defined in drivers/hid/hid-ids.h. rebuild, reboot and you have two input interfaces.
Good luck.

Re: Two HID joysticks from one device

Posted: Sun Jun 06, 2010 6:15 pm
by mojo
Kash, I guess you are referring to the Linux HID driver. I will pass the info on to my Linux guy and report back if it works. Thanks for the hint!