this isn't GIMX specific, but since you guys are the experts on the Playstation USB HID traffic, can you help me make sense of the USB HID protocol used by a third party game controller for the PS3? My goal is to add support for this gamepad to Linux.
First of all, thanks a lot for serialusb, which helped me where the Linux input mailing list could not.
The "BigBen Interactive Kid-friendly Wired Controller" PS3OFMINIPAD SONY gamepad identifies as 146b:0902. It's fairly cheap and quite nice. It is an "offical licensed product" and it works out of the box on my PS3 - the BigBen gamepad has four LEDs which light up accordingly and there are force feedback effects in games.
But I don't want to use it with the PS3, it was bought for Retropie running on Linux. While the Sony Dualshock 3 Sixaxis controller is fully supported under Linux, the BigBen gamepad isn't. And when a cheap gamepad doesn't work properly, the obvious thing we do isn't to replace the gamepad, but buy sniffer hardware to get it fixed.
Here's what I found out so far and where I'm stuck:
The BigBen gamepad inputs work, all buttons and axes are properly handled by Linux's hid-generic driver.
The BigBen gamepad LEDs and force feedback effects do not work. While Linux's hid driver has force feedback and LED support for many devices, it doesn't discover these features for this gamepad.
The USB HID descriptor for the gamepad contains an output section. As a beginner to USB, I cannot make much sense of it. The descriptor mentions an output report, but I can't make much sense out of these entries:
- Usage, data= [ 0x21 0x26 ] 9761
- Usage, data= [ 0x2c ] 44
- Usage, data= [ 0x2d ] 45
- Usage, data= [ 0x2e ] 46
- Usage, data= [ 0x2f ] 47
I looked in the USB HID spec, but these values do not make sense to me, but as a novice, I may obviously be missing things here. Can you explain to me that they mean?
Thanks to serialusb, it was possible to capture actual HID traffice between the PS3 and the gamepad and I have now found working HID commands that seem to be this:
- 01 08 01 00 00 00 00 00
The third byte of the message is setting the LEDs. 1 = LED1, 2 = LED2, 4 = LED3, 8 = LED4.
The meaning of the second byte (08) is unclear to me. - 02 08 00 5a 96 00 00 00
The fourth byte (5a) is the strength of the vibration effect, the fifth byte (96) the timespan/length of the effect.
The third byte (00) seems to be the type of effect, but I'm not sure yet.
The meaning of the second byte (08) is unclear to me.
Can you help me understand the output reports captured with serialusb, based on the USB descriptor of the gamepad? I don't understand the descriptor yet, but want to.
Have you seen other 3rd party Playstation gamepads that use this protocol? If the Usage data values mentioned above aren't specific to this one gamepad, it might be helpful to add generic support for them in Linux's hid driver.
Is there a particular PS3 game I can use to test force feedback effects? The one I tried (Battlefield 3) seems to send very few different effects to the gamepad, but I'd like to capture more effects to make sense of the protocol.
Thank you!