0

OK, so xpad.c now has XBOXONE controller support. I purchase a PowerA Spectra XBOXONE controller. All it seems to do is connect and disconnect. So thats when I noticed xpad wasn't recognizing the controller and decided to edit xpad.c and recompile.

Linux CtrlZ 3.18.7-sabayon #1 SMP Mon Feb 16 14:29:37 UTC 2015 x86_64 AMD A10-7850K Radeon R7, 12 Compute Cores 4C+8G AuthenticAMD GNU/Linux


Example

[ 660.061511] usb 3-2: new full-speed USB device number 39 using xhci_hcd
[ 660.205548] usb 3-2: New USB device found, idVendor=24c6, idProduct=542a
[ 660.205551] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 660.205554] usb 3-2: Product: Controller
[ 660.205555] usb 3-2: Manufacturer: Microsoft
[ 660.205557] usb 3-2: SerialNumber: 0000F2292EF239AD
[ 675.295032] usb 3-2: USB disconnect, device number 39
[ 675.541979] usb 3-2: new full-speed USB device number 40 using xhci_hcd
[ 675.686018] usb 3-2: New USB device found, idVendor=24c6, idProduct=542a
[ 675.686022] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 675.686024] usb 3-2: Product: Controller
[ 675.686025] usb 3-2: Manufacturer: Microsoft
[ 675.686027] usb 3-2: SerialNumber: 0000F2292EF239AD


Using the information above I was able to patch xpad.c to include the following lines 207 and 311.


EXAMPLE

206: { 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 },
207: { 0x24c6, 0x542a, "PowerA Spectra", 0, XTYPE_XBOXONE },
310: XPAD_XBOX360_VENDOR(0x24c6), /* PowerA Controllers /
311: XPAD_XBOXONE_VENDOR(0x24c6), /
PowerA Controllers */


Did it work? No, but I did get closer the goal. Any skillful kernel devs out there wanna help me out? I'm a big n00b when it comes to drivers editing. Basic programming I know, but this is a whole other level. I'm willing to learn tho.

#Current Output

[ 1217.579190] usb 3-2: new full-speed USB device number 75 using xhci_hcd
[ 1217.721294] usb 3-2: New USB device found, idVendor=24c6, idProduct=542a
[ 1217.721298] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1217.721300] usb 3-2: Product: Controller
[ 1217.721302] usb 3-2: Manufacturer: Microsoft
[ 1217.721303] usb 3-2: SerialNumber: 0000F2292EF239AD
[ 1217.723396] input: PowerA Spectra as /devices/pci0000:00/0000:00:10.1/usb3/3-2/3-2:1.0/input/input93
[ 1232.812766] usb 3-2: USB disconnect, device number 75
[ 1233.060659] usb 3-2: new full-speed USB device number 76 using xhci_hcd
[ 1233.203764] usb 3-2: New USB device found, idVendor=24c6, idProduct=542a
[ 1233.203768] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1233.203771] usb 3-2: Product: Controller
[ 1233.203772] usb 3-2: Manufacturer: Microsoft
[ 1233.203774] usb 3-2: SerialNumber: 0000F2292EF239AD
[ 1233.205895] input: PowerA Spectra as /devices/pci0000:00/0000:00:10.1/usb3/3-2/3-2:1.0/input/input94


It appears its not making handshake of some sort? Maybe trying to speak to the controller like its a 360 controller instead of a one controller?

1
  • The patch didn't fix the issue, although, it seems to have helped somewhat. Its not failing as quickly now, but its still cycling through disconnecting and reconnecting. Its possible the patch requires 3.19 kernel. Patch didn't fix my issue with 3.18. But this did help me realize the issue is being worked on currently and is bigger than my meager knowledge on the topic can resolve. I'll keep an eye on it and see if I can learn something :)
    – user238508
    Mar 14, 2015 at 5:46

1 Answer 1

0

I upgraded my kernel to 3.19 the other day for the xpad controller support, to also find that my PowerA Spectra controller did not work. After some investigating with the driver, I found like you say the driver was not performing a valid handshake. This was not the only problem that I had however, as unlike the official Xbone controller which had the in/out endpoints swapped, the PowerA did not (like on the 360).

To get to the point, I have managed to get my controller working. The patch should work fine, apart from the endpoints for the official controller, as I have not written any code to detect it. I wasnt sure if i should add exception for PowerA controller, or for official one, but will probably end up sorting this out soon if I submit an upstream patch. In order to fix handshake, I needed to implement a packet queue also, but was lucky in the fact that someone else had done it in a kernel patch that has not been accepted yet. I have included their code in my patch.

The patch file (based on 3.19, but don't think it has changed since 3.18) can be found here. Hopefully you can make some use of it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .