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.
Two HID joysticks from one device
Re: Two HID joysticks from one device
Yeah, Grendel fixed his post to clear up the confusion. I'd like to see how you make out.Oh, and I looked on Ralph's site but couldn't see where he did it that way.
Re: Two HID joysticks from one device
Well I think the short answer is that Linux users are boned.
Re: Two HID joysticks from one device
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
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
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
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.
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
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!