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 <kai@kaishome.de>
  • Loading branch information
kakra committed Mar 6, 2022
1 parent 044d9ab commit 4fd620c
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
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
@@ -1,5 +1,5 @@
# Rebind driver to xpadneo
ACTION=="bind", SUBSYSTEM=="hid", DRIVER!="xpadneo", KERNEL=="0005:045E:*", KERNEL=="*:02FD.*|*:02E0.*|*:0B05.*|*:0B13.*", ATTR{driver/unbind}="%k", ATTR{[drivers/hid:xpadneo]bind}="%k"
ACTION=="bind", SUBSYSTEM=="hid", DRIVER!="xpadneo", KERNEL=="0005:045E:*", KERNEL=="*:02FD.*|*:02E0.*|*:0B05.*|*:0B13.*|*:0B20.*", ATTR{driver/unbind}="%k", ATTR{[drivers/hid:xpadneo]bind}="%k"

# Tag xpadneo devices for access in the user session
ACTION=="add|change", DRIVERS=="xpadneo", SUBSYSTEM=="input", TAG+="uaccess"
6 changes: 6 additions & 0 deletions hid-xpadneo/src/hid-xpadneo.c
Expand Up @@ -1159,6 +1159,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 @@ -1174,6 +1177,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 @@ -1253,6 +1257,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 4fd620c

Please sign in to comment.