简体   繁体   English

如何在 GadgetFS 中指定 HID 报告

[英]How to specify the HID Report in GadgetFS

I am using GadgetFS to spoof a Nintendo Pro Controller through usb using these descriptors .我正在使用 GadgetFS 使用这些描述符来欺骗 Nintendo Pro Controller 到 usb。 However, I am not sure how to send the HID Report to the Switch.但是,我不确定如何将 HID 报告发送到交换机。 I know you can do it in ConfigFS, but I haven't been able to find endpoint support in ConfigFS, so I decided to use GadgetFS.我知道你可以在 ConfigFS 中做到这一点,但是我无法在 ConfigFS 中找到端点支持,所以我决定使用 GadgetFS。

I have looked into varios resources like this and this .我已经研究过类似thisthis的各种资源。 It seems like I should be able to send the HID Report descriptor through GadgetFS, but I can't find a way.似乎我应该能够通过 GadgetFS 发送 HID 报告描述符,但我找不到方法。 It doesn't seem like USB_REQ_GET_REPORT is defined in any API.似乎USB_REQ_GET_REPORT没有在任何 API 中定义。

My code can be foundhere which depends on the library found here .我的代码可以在这里找到,这取决于在这里找到的库。 Finally, do I really need the HID Report descriptor anyway?最后,我真的需要 HID 报告描述符吗?

I think I have figured it out.我想我已经想通了。 When a device is an HID device, the bRequest value changes to some HID constants.当设备是 HID 设备时, bRequest值会更改为某些 HID 常量。 Some of these HID specific constants can be found here .可以在此处找到其中一些 HID 特定常量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM