Skip to content

Commit

Permalink
xpadneo: Add support for XB1S BLE firmware update
Browse files Browse the repository at this point in the history
Microsoft added BLE support to existing controllers. This commit adds
support for binding xpadneo to controllers flashed with the new
firmware version which exposes the device under a new PID.

The new firmware needs the Share button quirk.

Affects: #314
Signed-off-by: Kai Krakow <[email protected]>
  • Loading branch information
kakra committed May 26, 2022
1 parent cec9dd9 commit 2cfba0e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions hid-xpadneo/etc-modprobe.d/xpadneo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ alias hid:b0005g*v0000045Ep000002E0 hid_xpadneo
alias hid:b0005g*v0000045Ep000002FD hid_xpadneo
alias hid:b0005g*v0000045Ep00000B05 hid_xpadneo
alias hid:b0005g*v0000045Ep00000B13 hid_xpadneo
alias hid:b0005g*v0000045Ep00000B20 hid_xpadneo
2 changes: 1 addition & 1 deletion hid-xpadneo/etc-udev-rules.d/60-xpadneo.rules
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ACTION=="add", KERNEL=="0005:045E:02FD.*|0005:045E:02E0.*|0005:045E:0B05.*|0005:045E:0B13.*", SUBSYSTEM=="hid", DRIVER!="xpadneo", ATTR{driver/unbind}="%k", ATTR{[drivers/hid:xpadneo]bind}="%k"
ACTION=="add", KERNEL=="0005:045E:02FD.*|0005:045E:02E0.*|0005:045E:0B05.*|0005:045E:0B13.*|0005:045E:0B20.*", SUBSYSTEM=="hid", DRIVER!="xpadneo", ATTR{driver/unbind}="%k", ATTR{[drivers/hid:xpadneo]bind}="%k"
ACTION=="add|change", DRIVERS=="xpadneo", SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="1", TAG+="uaccess", MODE="0664", ENV{LIBINPUT_IGNORE_DEVICE}="1"
6 changes: 6 additions & 0 deletions hid-xpadneo/src/hid-xpadneo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,9 @@ static int xpadneo_probe(struct hid_device *hdev, const struct hid_device_id *id
* 0xB12 Dongle, USB Windows and USB Linux mode
* 0xB13 wireless Linux mode (Android mode)
*
* Xbox Controller BLE mode:
* 0xB20 wireless BLE mode
*
* TODO: We should find a better way of doing this so SDL2 could
* still detect our driver as the correct model. Currently this
* maps all controllers to the same model.
Expand All @@ -1097,6 +1100,7 @@ static int xpadneo_probe(struct hid_device *hdev, const struct hid_device_id *id
break;
case 0x0B05:
case 0x0B13:
case 0x0B20:
hdev->product = 0x02E0;
hdev->version = 0x00000903;
break;
Expand Down Expand Up @@ -1188,6 +1192,8 @@ static const struct hid_device_id xpadneo_devices[] = {
/* XBOX ONE S / X */
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x02FD) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x02E0) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x0B20),
.driver_data = XPADNEO_QUIRK_SHARE_BUTTON },

/* XBOX ONE Elite Series 2 */
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x0B05),
Expand Down

0 comments on commit 2cfba0e

Please sign in to comment.