Nintendont icon indicating copy to clipboard operation
Nintendont copied to clipboard

Stadia Controller Support (18D1_9400.ini) - How To Enable Rumble?

Open PhilRoll opened this issue 2 years ago • 8 comments

Hi, I would like to share my "18D1_9400.ini" config of my Google Stadia controller: Stadia Controller rev. A (Vendor: 18D1 Product: 9400) -> Stadia_Controller_ini_config.zip

Is it possible to add it on the list of supported controllers?

Anyway, the real problem is: how do you configure these parameters to enable vibration? Rumble= RumbleType= RumbleDataLen= RumbleDataOn= RumbleDataOff= RumbleTransferLen= RumbleTransfers=

PhilRoll avatar Feb 11 '23 00:02 PhilRoll

I currently look into a similar problem. After rummaging through the code, which is unfortunately undocumented, I can tell the following:

  • similar to the input report you already configured, there is usually also an output report
  • according to this descriptor, you might be able to use RumbleDataOn=0x05,0xFF,0xFF,0xFF,0xFF and RumbleDataOff=0x05,0x00,0x00,0x00,0x00
  • Both Len attributes should be 5, which is the length of the byte string above
  • Rumble=1
  • RumbleType is either 0 or 1, just try both

good luck!

maz3max avatar May 27 '23 00:05 maz3max

I just had success with setting up rumble for my own little controller implementation: https://github.com/maz3max/xbox-controller-central/blob/main/controller.ini Note that the rumble data is different because my controller uses a different format.

maz3max avatar May 27 '23 17:05 maz3max

I just had success with setting up rumble for my own little controller implementation: https://github.com/maz3max/xbox-controller-central/blob/main/controller.ini Note that the rumble data is different because my controller uses a different format.

is there any tool people culd use to get the rumble values for hid controllers? thinking about dualshock 4/5 and so on, fix94 never explained how to get those values at all.

carnage702 avatar May 27 '23 19:05 carnage702

@carnage702 I use hidrdd to decode the USB HID descriptor. In the case of the Stadia controller, I found a decoded version somewhere online. The first byte is just a fixed ID number, followed by two (most probably little-endian) 16-bit unsigned integers for controlling two rumble motors. If the tool gives you C structs for the input and output reports, look at the output report. Then you can infer which bytes to send.

Having said that, there is lots of custom code for supporting PS3 controllers. I don't know whether it's easy to support the newer generation controllers just using the config file. I just glanced over some reverse engineering pages for the DS4 controller, and it might be possible, but much more involved to get that one working. It might be best to capture some output reports and just use those.

maz3max avatar May 28 '23 16:05 maz3max

@carnage702 Maybe this can lead you to the right direction.

maz3max avatar May 28 '23 16:05 maz3max

i tried this and it works!! however, the vibration is very low, sometimes so slow that you can feel the motor turning.

the commands I added are: Rumble=1 RumbleType=1 RumbleDataLen=05 RumbleDataOn=0x05,0xFF,0xFF,0xFF,0xFF RumbleDataOff=0x05,0x00,0x00,0x00,0x00 RumbleTransferLen=05 RumbleTransfers=1

PhilRoll avatar May 29 '23 07:05 PhilRoll

Updated "18D1_9400.ini" config of Google Stadia controller: (added vibration)

Stadia Controller rev. A (Vendor: 18D1 Product: 9400) Stadia_Controller_ini_config.zip

PhilRoll avatar May 29 '23 07:05 PhilRoll

Has anybody figured out these parameters but for Sony DualSense? I have tried to but I can't figure it out.

Asais10 avatar Nov 07 '23 08:11 Asais10