如何為藍牙遊戲手把建立udev規則? (Lic Pro 控制器)

如何為藍牙遊戲手把建立udev規則? (Lic Pro 控制器)

我正在嘗試讓經過許可的 Pro 控制器與 Steam 配合使用,但它似乎缺乏正確的udev規則。

bluetoothctl提供以下資訊:

Device 00:0B:E4:7E:64:7E (public)
    Name: Lic Pro Controller
    Alias: Lic Pro Controller
    Class: 0x00002508
    Icon: input-gaming
    Paired: yes
    Trusted: yes
    Blocked: no
    Connected: yes
    LegacyPairing: no
    UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
    UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
    UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
    Modalias: usb:v0000p0000d0001
    RSSI: -35

因此,根據最新的情況,99-steam-controller-perms.rules我嘗試在同一文件中添加這樣的規則:

KERNEL=="hidraw*", SUBSYSTEM=="input", ATTRS{name}=="Lic Pro Controller", MODE="0666", TAG+="uaccess", ENV{ID_INPUT_JOYSTICK}="1"

evtest給我看這個:

Available devices:
/dev/input/event16: Lic Pro Controller
Select the device event number [0-16]: 16
Input driver version is 1.0.1
Input device ID: bus 0x5 vendor 0x0 product 0x0 version 0x1
Input device name: "Lic Pro Controller"
Supported events:
[events and test output omitted but functional]

運行時udevadm info --query=all --path=(udevadm info --query=path --name=/dev/input/event16)顯示:

P: //devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/bluetooth/hci0/hci0:2/0005:0000:0000.0002/input/input21/event16
N: input/event16
L: 0
E: DEVPATH=//devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/bluetooth/hci0/hci0:2/0005:0000:0000.0002/input/input21/event16
E: DEVNAME=/dev/input/event16
E: MAJOR=13
E: MINOR=80
E: SUBSYSTEM=input
E: USEC_INITIALIZED=356433443
E: ID_INPUT=1
E: ID_INPUT_JOYSTICK=1
E: ID_BUS=bluetooth
E: ID_INPUT_JOYSTICK_INTEGRATION=external
E: ID_PATH=pci-0000:00:14.0-usb-0:5:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_5_1_0
E: ID_FOR_SEAT=input-pci-0000_00_14_0-usb-0_5_1_0
E: LIBINPUT_DEVICE_GROUP=5/0/0:58:00:e3:af:f3:d4
E: TAGS=:seat:uaccess:

不幸的是,Steam 仍然無法識別控制器,並syslog在連接控制器時顯示以下資訊:

Mar 15 11:12:29 e5 systemd[2268]: Started Bluetooth OBEX service.
Mar 15 11:13:10 e5 bluetoothd[803]: Can't get HIDP connection info
Mar 15 11:13:10 e5 kernel: [  355.858048] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Mar 15 11:13:10 e5 kernel: [  355.858059] Bluetooth: HIDP socket layer initialized
Mar 15 11:13:11 e5 kernel: [  356.178027] hid-generic 0005:0000:0000.0002: unknown main item tag 0x0
Mar 15 11:13:11 e5 kernel: [  356.178291] input: Lic Pro Controller as /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/bluetooth/hci0/hci0:2/0005:0000:0000.0002/input/input21
Mar 15 11:13:11 e5 kernel: [  356.178842] hid-generic 0005:0000:0000.0002: input,hidraw1: BLUETOOTH HID v0.01 Gamepad [Lic Pro Controller] on 58:00:e3:af:f3:d4
Mar 15 11:13:11 e5 wpa_supplicant[826]: wlp2s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-48 noise=-54 txrate=1000
Mar 15 11:13:11 e5 systemd-udevd[4331]: Process '/usr/bin/jscal-restore /dev/input/js0' failed with exit code 1.
Mar 15 11:13:11 e5 /usr/lib/gdm3/gdm-x-session[2291]: (II) config/udev: Adding input device Lic Pro Controller (/dev/input/js0)
Mar 15 11:13:11 e5 /usr/lib/gdm3/gdm-x-session[2291]: (II) No input driver specified, ignoring this device.
Mar 15 11:13:11 e5 /usr/lib/gdm3/gdm-x-session[2291]: (II) This device may have been added with another device file.

我是規則新手udev,所以我不知道可能接受的選項和參數。關於如何實現這項工作有什麼想法嗎?

我想也許讓遊戲手把控制螢幕上的指針可能是一個好的開始。

相關內容