All Projects → atar-axis → Xpadneo

atar-axis / Xpadneo

Licence: gpl-3.0
Advanced Linux Driver for Xbox One Wireless Controller (shipped with Xbox One S)

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Xpadneo

gamepad.js
A simple HTML5 Gamepad handler that provides keyboard-like events for Gamepad sticks and buttons.
Stars: ✭ 21 (-97.37%)
Mutual labels:  xbox, gamepad
Hidguardian
Windows kernel-mode driver for controlling access to various input devices.
Stars: ✭ 138 (-82.69%)
Mutual labels:  gamepad, hid
Ucr
Universal Control Remapper [Alpha]
Stars: ✭ 399 (-49.94%)
Mutual labels:  hid
Gainput
Cross-platform C++ input library supporting gamepads, keyboard, mouse, touch
Stars: ✭ 636 (-20.2%)
Mutual labels:  gamepad
Hidviz
A tool for in-depth analysis of USB HID devices communication
Stars: ✭ 505 (-36.64%)
Mutual labels:  hid
Gimx
The GIMX software.
Stars: ✭ 421 (-47.18%)
Mutual labels:  xbox
Uwp Experiences
Universal Windows Platform (UWP) samples and showcases
Stars: ✭ 547 (-31.37%)
Mutual labels:  xbox
Mac Precision Touchpad
Windows Precision Touchpad Driver Implementation for Apple MacBook / Magic Trackpad
Stars: ✭ 5,107 (+540.78%)
Mutual labels:  hid
Directxtk12
The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
Stars: ✭ 765 (-4.02%)
Mutual labels:  xbox
Inputmanager
Custom InputManager for Unity
Stars: ✭ 479 (-39.9%)
Mutual labels:  gamepad
Unswitch
🕹 A tiny event handler for Switch controllers!
Stars: ✭ 574 (-27.98%)
Mutual labels:  gamepad
Qlcplus
Q Light Controller Plus
Stars: ✭ 467 (-41.41%)
Mutual labels:  hid
Xpad
Linux Kernel Driver for the Xbox/ Xbox 360/ Xbox One Controllers
Stars: ✭ 446 (-44.04%)
Mutual labels:  xbox
Gopher360
Gopher360 is a free zero-config app that instantly turns your Xbox 360, Xbox One, or even DualShock controller into a mouse and keyboard. Just download, run, and relax.
Stars: ✭ 566 (-28.98%)
Mutual labels:  xbox
Esp32 mouse keyboard
ESP32 implementation for HID over GATT Keyboard and Mouse (Bluetooth Low Energy). Including serial API for external modules (similar to Adafruit EZKey HID)
Stars: ✭ 420 (-47.3%)
Mutual labels:  hid
Wifiduck
Wireless keystroke injection attack platform
Stars: ✭ 723 (-9.28%)
Mutual labels:  hid
Headsetcontrol
Sidetone and Battery status for Logitech G930, G533, G633, G933 SteelSeries Arctis 7/PRO 2019 and Corsair VOID (Pro) in Linux and MacOSX
Stars: ✭ 392 (-50.82%)
Mutual labels:  hid
Hidapi
A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac and Windows.
Stars: ✭ 465 (-41.66%)
Mutual labels:  hid
Xqemu
Open-source emulator to play original Xbox games on Windows, macOS, and Linux
Stars: ✭ 518 (-35.01%)
Mutual labels:  xbox
Inventory Hunter
⚡️ Get notified as soon as your next CPU, GPU, or game console is in stock
Stars: ✭ 778 (-2.38%)
Mutual labels:  xbox

ko-fi

If you want to support me or accelerate the development of a special feature, consider a small donation ❤️ Just leave a message if your donation is for a specific use (like a new hardware or a specific function).

Build Status Codacy Badge Average time to resolve an issue Packaging status Discord

Advanced Linux Driver for Xbox One Wireless Gamepad

xpadneo Logo

Quote from @atar-arix (Florian Dollinger), creator of the initial driver:

This is the first driver for the Xbox One Wireless Gamepad (which is shipped with the Xbox One S). I wrote it for a student project at fortiss GmbH and it is fully functional but does only support the connection via Bluetooth as yet - more will follow.

Many thanks to Kai Krakow who sponsored me a Xbox One Wireless Controller 🎮 (including Wireless Adapter) and a pack of mouthwatering guarana cacao ☕️

Other Projects

  • xow is a driver for the Xbox One S controllers, too, and supports the native dongles packaged with the controller. Kudos to @medusalix for working together on finding some work-arounds for controller firmware bugs.
  • xpad supports this and many other controllers in USB mode.
  • MissionControl aims to support the controller on Nintendo Switch via Bluetooth.

These other projects may not support some of the advanced features of xpadneo.

Breaking Changes

Kernel 4.18 or newer required

As of xpadneo v0.10, we require kernel 4.18 or later to utilize HID_QUIRK_INPUT_PER_APP which splits the gamepad into multiple sub-devices to fix problems and incompatibilities at several layers.

SDL 2.0.12 Breakage

As of SDL 2.0.12, SDL introduced a new HIDAPI which can read HID devices in raw mode, bypassing the drivers. Due to the way SDL works, and because xpadneo exposes hidraw devices as user-readable, SDL may see wrong button mappings because it may make wrong assumptions about the protocol mode of Xbox and compatible controllers. If you see wrong button mappings / missing buttons in SDL applications, you may need to turn off this behavior by setting an environment variable in your profile: SDL_JOYSTICK_HIDAPI=0

Advantages of this driver

  • Supports Bluetooth
  • Supports all Force Feedback/Rumble effects through Linux ff-memless effect emulation
  • Supports Trigger Force Feedback in every game by applying a pressure-dependent effect intensity to the current rumble effect (not even supported in Windows)
  • Supports disabling FF
  • Supports multiple Gamepads at the same time (not even supported in Windows)
  • Offers a consistent mapping, even if the Gamepad was paired to Windows/Xbox before, and independent of software layers (SDL2, Stadia via Chrome Gamepad API, etc)
  • Working Select, Start, Mode buttons
  • Correct Axis Range (signed, important for e.g. RPCS3)
  • Supports Battery Level Indication (including the Play 'n Charge Kit) Battery Level Indication
  • Easy Installation
  • Agile Support and Development
  • Supports customization through profiles (work in progress)
  • Optional high-precision mode for Wine/Proton users
  • Share button support on supported controllers

Xbox One S Wireless controller

This is the initial controller supported from the first version of xpadneo. All features are fully supported. This controller uses emulated profile switching support (see below).

Xbox Elite Series 2 Wireless controller

Basic support for the Xbox Elite Series 2 Wireless controller is present, covering all the features of the driver. The following features are missing:

  • The four paddles at the bottom are currently not supported.
  • Upload of profile mappings and sensitivity curves is currently not supported.

This controller uses native profile switching support (see below).

Xbox Series X|S Wireless controller

Full support for the Xbox Series X|S controller is present including the share button. This is currently mapped to keyboard event KEY_RECORD and may not work at all for any purpose. Thus, this implementation details may change during one of the next updates. This controller uses emulated profile switching support (see below).

This controller uses BLE (Bluetooth low energy) and can only be supported if your Bluetooth dongle also supports BLE.

8BitDo controllers

This driver supports the Nintendo layout of those controllers to exposes them correctly as button A, B, X, and Y as labelled on the device. This is swapped compared to the original Xbox controller layout. However, this feature is not enabled by default. If you want to use this feature, you have to add a quirk flag to the module options:

# /etc/modprobe.conf
options hid_xpadneo quirks=E4:17:D8:xx:xx:xx:32

where you replace xx:xx:xx with the values from your controller MAC (as shown in dmesg). The value 32 enables Nintendo layout. If you'll want to add other quirk flags, simply add the values, e.g. 32 + 7 (default quirks for 8BitDo) = 39. After changing this, reload the driver or reboot.

This controller uses emulated profile switching support (see below).

Breaking change: Users of previous versions of the driver may want to remove their custom SDL mappings. Full support has been added for these controllers and broken mapping of previously versions no longer needs to be applied. See also: SDL.

Profile switching

The driver supports switching between different profiles, either through emulation or by using the hardware switch that comes with some models. This switching can be done at any time even while in a game. The API for customizing each profile does not exist yet.

Native profile switching support

The driver support native profile switching for

  • Profile support. All four profiles behave the same way currently, and there is no support for configuring them.

Emulated profile switching support

The driver emulates profile switching for controllers without a hardware profile switch by pressing buttons A, B, X, or Y while holding down the Xbox logo button. However, the following caveats apply:

  • Profiles currently behave all the same, and there is no support for configuring them.
  • Full support will be available once the Xbox Elite Series 2 controller is fully supported.

Getting started

Prerequisites

Make sure you have installed dkms, linux headers and a bluetooth implementation (e.g. bluez) and their dependencies.

  • On Arch and Arch-based distros (like Antergos), try sudo pacman -S dkms linux-headers bluez bluez-utils
  • On Debian based systems (like Ubuntu) you can install those packages by running sudo apt-get install dkms linux-headers-`uname -r`
  • On Fedora, it is sudo dnf install dkms make bluez bluez-tools kernel-devel-`uname -r` kernel-headers-`uname -r`
  • On Manjaro try sudo pacman -S dkms linux-latest-headers bluez bluez-utils
  • On OSMC you will have to run the following commands sudo apt-get install dkms rbp2-headers-`uname -r` sudo ln -s "/usr/src/rbp2-headers-`uname -r`" "/lib/modules/`uname -r`/build" (as a workaround)
  • On Raspbian, it is sudo apt-get install dkms raspberrypi-kernel-headers If you recently updated your firmware using rpi-update the above package may not yet include the header files for your kernel. Please follow the steps described here in this case.
  • On generic distributions, it doesn't need DKMS but requires a configured kernel source tree, then: cd hid-xpadneo && make modules && sudo make modules_install

Please feel free to add other Distributions as well!

Installation

  • Download the Repository to your local machine git clone https://github.com/atar-axis/xpadneo.git
  • cd xpadneo
  • If using DKMS, run sudo ./install.sh
  • If not using DKMS, follow steps above (generic distribution)
  • Done!

Connection

  • sudo bluetoothctl
  • [bluetooth]# scan on
  • wait until all available devices are listed (otherwise it may be hard to identify which one is the gamepad)
  • push the connect button on upper side of the gamepad, and hold it down until the light starts flashing fast
  • wait for the gamepad to show up in bluetoothctl, remember the address (e.g. C8:3F:26:XX:XX:XX)
  • [bluetooth]# pair <MAC>
  • [bluetooth]# trust <MAC>
  • [bluetooth]# connect <MAC>
  • The <MAC> parameter is optional if the command line already shows the controller name

You know that everything works fine when you feel the gamepad rumble ;)

Configuration

  • If using DKMS: Use sudo ./configure.sh to configure the driver as you wish. The script will guide you through the available options.

Update

In order to update xpadneo, do the following

  • Update your cloned repo: git pull
  • If using DKMS: Run sudo ./update.sh
  • otherwise follow the steps above (generic distribution)

Uninstallation

  • If using DKMS: Run sudo ./uninstall.sh to remove all installed versions of hid-xpadneo
  • otherwise follow the steps above (generic distribution)

Further information

For further information please visit the GitHub Page https://atar-axis.github.io/xpadneo/ which is generated automatically from the content of the /docs folder.

You will find there e.g. the following sections

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].