Code Monkey home page Code Monkey logo

Comments (15)

Schroedingers-Cat avatar Schroedingers-Cat commented on June 8, 2024 1

Yes, I'm using an Xbox One Elite version of the controller.
This is from dmesg:

[ 4477.543744] usb 1-1.2: new full-speed USB device number 11 using ehci-pci
[ 4477.639219] usb 1-1.2: New USB device found, idVendor=045e, idProduct=02e3
[ 4477.639223] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4477.639226] usb 1-1.2: Product: Controller
[ 4477.639227] usb 1-1.2: Manufacturer: Microsoft
[ 4477.639229] usb 1-1.2: SerialNumber: 7EED85BA111B
[ 4477.639817] input: Microsoft X-Box One Elite pad as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input21
[ 4477.640672] xpad 1-1.2:1.0: xpad_prepare_next_out_packet - found pending output packet 0
[ 4477.652840] xpad 1-1.2:1.0: xpad_irq_in - nonzero urb status received: -75
[ 4477.665890] xpad 1-1.2:1.0: xpad_irq_in - urb shutting down with status: -2
[ 4477.699830] xpad 1-1.2:1.0: xpad_prepare_next_out_packet - found pending output packet 0
[ 4477.733892] xpad 1-1.2:1.0: xpad_irq_in - urb shutting down with status: -2
[ 4478.667857] xpad 1-1.2:1.0: xpad_prepare_next_out_packet - found pending output packet 0
[ 4478.680900] xpad 1-1.2:1.0: xpad_irq_in - nonzero urb status received: -75
[ 4478.689935] xpad 1-1.2:1.0: xpad_irq_in - urb shutting down with status: -2

With jstest, I get the following output:

$ jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Microsoft X-Box One Elite pad) has 8 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y)
and 11 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR).
Testing ... (interrupt to exit)
Axes:  0:     0  1:     0  2:-32767  3:     0  4:     0  5:-32767  6:     0  7:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off 

However, moving an axis or pressing a button doesn't change any of the values.

from xpad.

btegs avatar btegs commented on June 8, 2024

So... do we have an update on this? By you not supporting the Xbox One Elite controller, it is keeping it out of the Linux kernel as they tend to use this version instead of the more up to date SteamOS one. Please merge this code in as it is almost 3 months late.

from xpad.

Schroedingers-Cat avatar Schroedingers-Cat commented on June 8, 2024

So what is the status of this one?

from xpad.

dantob avatar dantob commented on June 8, 2024

Looks like it should work; minus the back paddles; if you just add the ID. Give it a try.

patch -Np1 -i add-xbox-one-elite-id.txt
add-xbox-one-elite-id.txt

from xpad.

dantob avatar dantob commented on June 8, 2024

I'll assume were still talking about the Xbox One Elite controller. The patch is based on what steamos is using, whether the device is actually working with steamos idk. Patch just adds the usb ID. The rest of the code just appears to allow the paddles to be mapped separately from ABXY and not necessary to get the device to work. Possibly more of the steamos initialization packets are needed.

You should hopefully see something in dmesg
input: Microsoft X-Box One pad (Firmware 2015) as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/input/input48

Try the jstest tool that comes from this repository https://sourceforge.net/projects/linuxconsole/
jstest /dev/input/js0 (for first joystick device)

Should see output something like this, press the buttons and make sure they respond correctly.
Driver version is 2.1.0. Joystick (Microsoft X-Box One pad (Firmware 2015)) has 8 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y) and 11 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR). Testing ... (interrupt to exit) Axes: 0: 2009 1: 1031 2:-32767 3: 266 4: 0 5:-32767 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off

from xpad.

paroj avatar paroj commented on June 8, 2024

just adding the id is not enough. The steamos patch also increases the packet size and adds a 3 packet init sequence. (I will remove the clrf discussion as it is not relevant here)

from xpad.

dantob avatar dantob commented on June 8, 2024

The steamos patch also increases the packet size

nonzero urb status received: -75
EOVERFLOW, looks like it is needed.

and adds a 3 packet init sequence

The other two init packets look the same as those initially used (and deemed unnecessary) for the xbox one controller. It's possible the windows driver just tries all init packets for all device types and doesn't filter by ID.

from xpad.

paroj avatar paroj commented on June 8, 2024

so in theory 744b785 should do it? could somebody with the elite controller test current master?

The other two init packets look the same as those initially used (and deemed unnecessary) for the xbox one controller.

nice catch btw

from xpad.

dantob avatar dantob commented on June 8, 2024

https://franticrain.github.io/sniffs/XboxOneSniff.html has some good info. It appears to show the packets are (odly) 33 bytes long?

from xpad.

Schroedingers-Cat avatar Schroedingers-Cat commented on June 8, 2024

I just tried the latest master and it works! jstes, steam and games react to input from the controller! Thank you for your work!

Some games however treat the controller as a "nonstandard" controller, i guess because they do not know that the Xbox One Elite controller basically works the same as the Xbox 360 controller.
I just checked and realized they have one tiny difference. On the Xbox360, the D Pad is reported as both, as button (11-14) and axis (6 and 7), while the Xbox One Elite only sends the D Pad as Axis (6 and 7). Do you think it would be possible to allow a special mode where the Xbox One Elite controller is reported to be an Xbox 360 controller? And in that mode, the Elite controller would also report its D Pad axes as buttons, just to be safe?

from xpad.

paroj avatar paroj commented on June 8, 2024

On the Xbox360, the D Pad is reported as both, as button (11-14) and axis (6 and 7), while the Xbox One Elite only sends the D Pad as Axis (6 and 7).

this is only the case for the wireless controller see 8be1d4a

from xpad.

Schroedingers-Cat avatar Schroedingers-Cat commented on June 8, 2024

Thanks for the info!
But what about an option to trick the games into thinking that the Xbox One Elite Controller is a Xbox 360 controller? Again, several games just look if it is an xbox 360 controller and if it's not they treat it as an unknown gamepad where you have the map the controls manually (for instance Fez).

from xpad.

paroj avatar paroj commented on June 8, 2024

The kernel driver is the wrong place to handle such quirks. See the discussion in #21. Maybe Fez can be "fixed" by adding the elite controller to the SDL2 database.

from xpad.

dantob avatar dantob commented on June 8, 2024

@Schroedingers-Cat Do the elite paddles work at all, do they map to they same buttons as ABXY?

from xpad.

Schroedingers-Cat avatar Schroedingers-Cat commented on June 8, 2024

The elite paddles are mapped as buttons 0-3, from paddle 1-4.

However, I don't use the configuration app for the elite controller as I don't want to use a Microsoft account. So maybe the mapping configured with that app is saved into a memory on the controller.

from xpad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.