Re: ConfigFS, FunctionFS, and MS XInput

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

 



Thanks for your feedback! I think I'm beginning to better understand what's going on. When I originally got the X360-emulated device working on the loopback interface, I left out several class descriptors and an interface with no endpoints (but has a vendor-specific descriptor following it). Reason being, whenever I attempted to add those descriptors (either by pushing the bytes manually or creating a descriptor-like struct and pushing that (effectively the same thing)) to endpoint 0, I would get: OSError 22: Invalid Argument.

Here's the 4 class & vendor descriptors in question:

1: [17,33,0,1,1,37,129,20,0,0,0,0,19,2,8,0,0,]
2: [27,33,0,1,1,1,131,64,1,4,32,22,133,0,0,0,0,0,0,22,5,0,0,0,0,0,0,]
3: [9,33,0,1,1,34,134,7,0,]
4: [6,65,0,1,1,3]

They're all after an interface descriptor and before their endpoint descriptors.

So, that's my current roadblock. I don't know how to send those. Can you/someone help describe to me how (or where I can find out how) I can do so? (Sending class/vendor descriptors and interfaces with no endpoints.) Is that something I can do with FunctionFS?

Mean time. I'm going to be looking over the generic XInput device again, but I may end up running into the same problem there.


On 4/17/2018 8:56 AM, Krzysztof Opasiak wrote:


On 04/17/2018 04:03 AM, Daniel Hefti wrote:
Hey guys,

I've been banging my head against the wall for a couple of days trying to get a Raspberry Pi 0W to talk to Windows (8.1/10) as an XInput game controller using ConfigFS and FunctionFS, having little success.  I've tried to build both a generic XInput device and one that attempts to emulate an X360 controller.  The X360 controller seems to get "further", in that Windows says it recognizes the device and the drivers are working.  Whatever that means.  The generic version just shows up as an unrecognized device (with the name I've given it). Neither are getting or able to send any data from/to their respective endpoints.  The X360 version, I tested locally via loopback/dummy UDC, and the xboxdrv driver can detect and read controller state messages/reports I send it, so at least that much works.  Not sure what I could possibly be missing.

I can say I've successfully created HID USB game controller devices. Those are accessible from Windows, but, unfortunately, many Windows games don't support HID particularly well, and I'm trying to avoid someone having to use something like XOutput as a workaround to get this device to work.

I do have Wireshark with USBPCap installed, so I can at least capture some of the data, which I did, but  it wasn't really leading me anywhere, possibly due to my lack of knowledge in this particular subject.  Unfortunately, I didn't save my pcap results.  I'll likely end up doing it again once I've given my head some time to heal.

Any insights?  References?  Something you think could help guide me in the right direction?  There's plenty of documentation and example implementations out there for HID devices, but not so much for XInput devices and functionfs in general, so any help would be greatly appreciated!

Did you check that you provided all drivers that a physical device does?
Maybe windows requires correct OS descriptors for that device?
That's just some guesses...

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