-
I was wondering if you guys had any resources on learning about the structure of the input report and how I would control it for force feedback. Im implementing support for a Fanatec steering wheel via WebHID and was looking for some resources! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hmm.. There is my poor-mans-testing-script https://github.com/gotzl/hid-fanatecff-tools/blob/master/tools/hid-fanatecff-test.py That said, shouldn't the API allow you to read out the report? Then sending cmds should be very much similar to what's in the C code ... And this 'minimal' example pretty much worked also straight away: https://github.com/WICG/webhid/blob/main/EXPLAINER.md#example (had to add a In any case, the FFB stuff you'll have to do yourself, there is no access from the WebHID to linux FFB API. So, you've to basically implement what's in the hid-fanatec C code ... |
Beta Was this translation helpful? Give feedback.
-
@gotzl So I've done some research and I've managed to get the HID report descriptor for the device: 0x05, 0x01, // Usage Page (Generic Desktop Ctrls) // 296 bytes So ive managed to get the HID report descriptor of the device that defines the output to the device over HID but unsure on how this would colerate to the commands any advice? |
Beta Was this translation helpful? Give feedback.
-
I've actually just solved by using Wireshark with your demo I was able to construct the code to do it: Would be really nice if you could compile a list of commands and maintain it for me but will mark this as answered! Just want to say thanks so much for helping you've saved me a bunch of time! |
Beta Was this translation helpful? Give feedback.
I've actually just solved by using Wireshark with your demo I was able to construct the code to do it:
device.sendReport(0x01, new Uint8Array([1, 8, 128]))
In your case, your CMD_BASE is actually just the HID report Id
Would be really nice if you could compile a list of commands and maintain it for me but will mark this as answered! Just want to say thanks so much for helping you've saved me a bunch of time!