As the title says I am trying to get my handbrake to recognize as a joystick so I can use it.

Running Arch.

This is the device in question. https://www.amazon.com/dp/B07SPVY2WL

It shows up with lsusb as the following. Bus 001 Device 006: ID 1021:1888 ZSC ODDOR-HANDBRAKE

Device info from cat /sys/kernel/debug/usb/devices T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=04 Dev#= 6 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs= 1 P: Vendor=1021 ProdID=1888 Rev= 1.14 S: Manufacturer=ZSC S: Product=ODDOR-HANDBRAKE C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=01 Prot=05 Driver=(none) E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=10ms E: Ad=01(O) Atr=03(Int.) MxPS= 64 Ivl=10ms

I found this bit of information but it’s related to openSUSE and is quite old but I’m hoping it might help. https://www.spinics.net/lists//linux-input/msg88778.html

It doesn’t show up in /dev/input/…

Any ideas on how I could get this thing recognized so I can use it?

Update 1:

I got connected with someone at the Simracing space on matrix per the advice from @lemonuri@lemmy.ml and they helped me to get it working. Here is what we did.

Create the file 99-handbrake.rules in /etc/udev/rules.d and add the two following lines to it.

SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="1021", ENV{ID_MODEL_ID}=="1888", RUN+="/bin/sh -c 'echo 1021 1888 > /sys/bus/usb/drivers/usbhid/new_id'"

SUBSYSTEM=="input", ATTRS{idVendor}=="1021", ATTRS{idProduct}=="1888", ENV{ID_INPUT_JOYSTICK}="1"

This forces the device to usbhid as a joystick whenever it is plugged in and recognized.

Run the following command to reload the device rules if you don’t want to reboot. Otherwise you can omit the command and reboot.

sudo udevadm control --reload

It now shows up and is working.

So the device was registering a button at the end of the pull and showing up as an Xbox controller while not recognizing the axis being moved so it was all or nothing.

I installed protopedal and following advice created a dummy device which remapped the inputs so that it registers the analog input only which worked.

protopedal --name "handbrake" -b JOYSTICK -a THROTTLE -s 0:THROTTLE -a Y --no-auto-buttons --no-auto-axes /dev/input/by-id/usb-ZSC_ODDOR-HANDBRAKE-event-joystick

Update 2:

All credit goes to JacKeTUs for his work on helping me out. He is making/made the driver for this. It may go into AUR for Arch users, so if anyone ends up looking for support for this handbrake you can find the source at the below link.

https://github.com/JacKeTUs/hid-oddor-handbrake

This will install the driver (currently it needs to be loaded after running sudo make) and the udev rule. It eliminates the need for protopedal but does require launch options to be set.

SDL_JOYSTICK_WHEEL_DEVICES=0x1021/0x1888 %command%

Update 3:

Latest push eliminates the need for steam launch option and removes the button from the device.