Alright, followup.
First, the GF + SCG arrived today. This is my first cam-based stick and I am simply blown away. Sure, I want to switch out cams and springs, and certainly the Gladiator NXT is no slouch either (it's feels like my CH flightstick after generous application of Nyogel 767A, only better), but the GF base is just a step above.. so I'll likely be swapping out that base for a GF base, but still using it as the HID controller for a SEM button panel arrangement (I'll just run it with no grip and then I'll still have the axis, 3 buttons, and 2 encoder wheels because.. MOAR buttons.
Anyway, hooked up the GF + SCG and function tested it, and what I was vaguely remembering was not the ability to set the VID or PID, but rather the ability to set the serial number and profile ID. Here's the default dump from `lspci -v`:
Code: Select all
Bus 001 Device 012: ID 231d:0127
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x231d
idProduct 0x0127
bcdDevice 20.59
iManufacturer 1 © Alex Oz 2012-2020
iProduct 2 VKBsim Space Gunfighter L
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0022
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 313
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Device Status: 0x0001
Self Powered
and here is the same dump after setting the SN to 0042 and the Profile ID to 1
Code: Select all
Bus 001 Device 013: ID 231d:0127
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x231d
idProduct 0x0127
bcdDevice 20.59
iManufacturer 1 © Alex Oz 2012-2020
iProduct 2 VKBsim Space Gunfighter L
iSerial 3 0042
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0022
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 313
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Device Status: 0x0001
Self Powered
The diff is as follows:
Code: Select all
1c1
< Bus 001 Device 012: ID 231d:0127
---
> Bus 001 Device 013: ID 231d:0127
15c15
< iSerial 0
---
> iSerial 3 0042
I assume the USB enumeration change is a result of writing the config (bus disconnect and reconnect), but the fact that the serial number is indeed different suggests to me that you can set different serial numbers for your left and right sticks, and then a udev rule should work.
Testing this, I set the serial to 0001 (for my right handed stick base, I figure 0000 is uninitialized, 0001 is right, 0002 is left, 0003 is button panels), and this works for that setup. Note that I will have a GF right and GNX left, so I could do it on VID:PID, but I wanted to test the theory.
Code: Select all
ATTRS{idVendor}=="231d", ATTRS{idProduct}=="0127", ATTRS{serial}=="0001", SYMLINK+="input/jsright"
Now, all that said and done, it works, but isn't really useful. `jstest-gtk` only shows up js0, and it doesn't seem like unless you are explicitly telling the software what to use, it will work. Digging in to this slightly (after trying to have udev set the device entry by the NAME keyword replacing SYMLINK), it would appear that one cannot do this. See
https://askubuntu.com/questions/920098/udev-rules-name-variable-not-working and the sources they cite there.
So, coming back around:
1. Even if everything is identical, they should both be seen and, absent any other controllers, the first one plugged in will be `/dev/input/js0` and the second will be `/dev/input/js1`.
2. You can set the serial number, but I'm not sure that, given the above, there is any point to doing so.
3. My dreams of `/dev/input/jsright` instead of `/dev/input/js0` do not appear to be possible.
4. Even if 3 was, you just know that it would break something silly, like, say, every SDL game or DOSBox or something like that.
I think that about covers it.