jackun / USBqemu-wheel

PCSX2 usb plugin for wheels and increasingly more stuff
The Unlicense
116 stars 21 forks source link

Buzz Buzzers LEDs not working/detected #46

Closed joao-pm-santos96 closed 1 year ago

joao-pm-santos96 commented 3 years ago

Hello all,

Thank you so much for this package, it is very very helpful!

Everything works fine, except for a little detail, the Buzz Controller LEDs: they do not work or are not detected. I can play and use them as expected, but the LED do not light up and they should. I know they are all good because I can test them on my PlayStation2.

Also, when using python3's evdev package, the LED's are not listed in the device capabilities....

Is this a known issue or something specific of my machine (Ubuntu 20.04)? Would a udev rule fix it?

Thank you!

jackun commented 3 years ago

Buzzer is only emulated, not actually passed through as is. In theory it could be detected if HID device is buzzer and just pass on reports to it? or just add another "usb pass-through" device to the plugin (which probably should be added at one point).

joao-pm-santos96 commented 3 years ago

Can you please guide me to how that should be done? Then I could test it by myself and, eventually, pull request it...

jackun commented 3 years ago

Dunno of the top of my head, evdev maybe doesn't allow to send data, idk, maybe needs hidraw handle instead, check https://github.com/jackun/USBqemu-wheel/blob/789671d7900d66207cff29189ae2577bd3b79a05/src/usb-pad/evdev/evdev.cpp#L30

vid/pid are USB vendor/product IDs.

Probably enough to just send HID reports from TokenOut to HIDRAW?

E: actually reports are sent to there so passing it to hidraw might be enough https://github.com/jackun/USBqemu-wheel/blob/849904abce0273ffc692a947703bfa0aef852c84/src/usb-pad/usb-pad.cpp#L238

jackun commented 3 years ago

Oh, actually do it like Logitech FF passthrough probably. So send data from SET_REPORT to s->pad->TokenOut(..) maybe.

https://github.com/jackun/USBqemu-wheel/blob/789671d7900d66207cff29189ae2577bd3b79a05/src/usb-pad/evdev/evdev.cpp#L439

Open hidraw handle, set mUseRawFF etc and just skip the FFB related data checks :P