Giter Club home page Giter Club logo

Comments (19)

cgutman avatar cgutman commented on May 28, 2024 3

Then you should be fine. It's the current xpad.c queued for 4.10-rc2 plus that init change. I'll prepare a patch for upstream.

from xpad.

powersurge360 avatar powersurge360 commented on May 28, 2024

Additional info from dmesg

[21816.892128] input: Generic X-Box pad as /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/input/input37
[21816.892247] xpad 2-1:1.0: xpad_prepare_next_out_packet - found pending output packet 0
[22472.601581] usb 2-1: USB disconnect, device number 19
[22472.601645] xpad 2-1:1.0: xpad_irq_in - urb shutting down with status: -108

from xpad.

powersurge360 avatar powersurge360 commented on May 28, 2024

Been debugging this a little on my own, although I'm way over my head. I turned on verbose debugging and it looks like it's sending the following two lines over and over again:

[23378.120220] xpad-dbg: 00000000: 02 20 21 1c 08 fc 25 3e 92 23 00 00 6f 0e 65 01 01 00 01 00 09 00 47 00 01 00 01 00 01 00 01 00
[23378.120223] xpad-dbg: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Is this an attempt at a handshake?

from xpad.

dantob avatar dantob commented on May 28, 2024

[21816.892128] input: Generic X-Box pad
If you've added the id before this, it doesnt seem to have worked correctly. Packets starting with 02 supposedly indicate 'waiting for connection' but xpad doesn't do anything with them.

Try this, or compare it to what you have. It's just adding the id for your controller. https://github.com/dantob/xpad/commit/0098e8af630614843451cc12d20cdc75f62cd3b0

from xpad.

powersurge360 avatar powersurge360 commented on May 28, 2024

Yea I had added it correctly but in the info I had posted, I had already begun the debugging process and was trying to follow the detection code for generic pads. Neither path bore fruit, however, and both recognize the controller but does not accept inputs.

To be more add some detail, I tried adding my line both with Xbox one and Xbox 360 types manually specified (and verified the string was present in jstest) and additionally reverted those changes and found no discernible difference between the three.

from xpad.

dantob avatar dantob commented on May 28, 2024

Try this commit https://github.com/dantob/xpad/commit/fd9d3d906e74ef8a480ce5aa3ecfda2247b20993 and make sure the device is being sent the initialize packet; 05 20 00 01 00

[208961.704936] usb 1-6: new full-speed USB device number 26 using xhci_hcd
[208961.837074] input: Microsoft X-Box One pad (Firmware 2015) as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/input/input79
[208961.837321] xpad 1-6:1.0: xpad_prepare_next_out_packet - found pending output packet 0
[208961.839044] xpad-send: 00000000: 05 20 00 01 00 0f 00 00 00 00 ff 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[208961.851003] xpad-recv: 00000000: 03 20 07 04 8b 01 00 00 00 00 9e 05 07 01 f0 fc 1f fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[208961.851004] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[208961.855035] xpad-recv: 00000000: 20 00 43 0e 00 00 00 00 00 00 8c 05 5b 00 f0 fc 57 fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[208961.855036] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

from xpad.

powersurge360 avatar powersurge360 commented on May 28, 2024

Sorry for the delay on this, I spent the last few days half dead with a sinus infection! I just pulled down your fork and recompiled and this is the relevant dmesg output:

[18728.003522] xpad-send: 00000000: 05 20 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[18729.211640] xpad-recv: 00000000: 02 20 01 1c 08 fc 25 3e 92 23 00 00 6f 0e 65 01 01 00 01 00 09 00 47 00 01 00 01 00 01 00 01 00
[18729.211644] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[18729.803643] xpad-recv: 00000000: 02 20 02 1c 08 fc 25 3e 92 23 00 00 6f 0e 65 01 01 00 01 00 09 00 47 00 01 00 01 00 01 00 01 00
[18729.803647] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[18730.391633] xpad-recv: 00000000: 02 20 03 1c 08 fc 25 3e 92 23 00 00 6f 0e 65 01 01 00 01 00 09 00 47 00 01 00 01 00 01 00 01 00
[18730.391637] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[18730.979653] xpad-recv: 00000000: 02 20 04 1c 08 fc 25 3e 92 23 00 00 6f 0e 65 01 01 00 01 00 09 00 47 00 01 00 01 00 01 00 01 00
[18730.979662] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[18731.567622] xpad-recv: 00000000: 02 20 05 1c 08 fc 25 3e 92 23 00 00 6f 0e 65 01 01 00 01 00 09 00 47 00 01 00 01 00 01 00 01 00
[18731.567625] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[18732.155619] xpad-recv: 00000000: 02 20 06 1c 08 fc 25 3e 92 23 00 00 6f 0e 65 01 01 00 01 00 09 00 47 00 01 00 01 00 01 00 01 00
[18732.155623] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[18732.743513] xpad-recv: 00000000: 02 20 07 1c 08 fc 25 3e 92 23 00 00 6f 0e 65 01 01 00 01 00 09 00 47 00 01 00 01 00 01 00 01 00
[18732.743516] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[18733.331608] xpad-recv: 00000000: 02 20 08 1c 08 fc 25 3e 92 23 00 00 6f 0e 65 01 01 00 01 00 09 00 47 00 01 00 01 00 01 00 01 00
[18733.331612] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[18733.919609] xpad-recv: 00000000: 02 20 09 1c 08 fc 25 3e 92 23 00 00 6f 0e 65 01 01 00 01 00 09 00 47 00 01 00 01 00 01 00 01 00
[18733.919613] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[18734.511603] xpad-recv: 00000000: 02 20 0a 1c 08 fc 25 3e 92 23 00 00 6f 0e 65 01 01 00 01 00 09 00 47 00 01 00 01 00 01 00 01 00
[18734.511607] xpad-recv: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Still no change in the behavior though. The controller is recognized but inputs are ignored:
image

from xpad.

powersurge360 avatar powersurge360 commented on May 28, 2024

After the initial send line, it just repeats the other two lines over and over ad infinitum.

from xpad.

cgutman avatar cgutman commented on May 28, 2024

@powersurge360 Can you give this xpad.c a shot? http://pastebin.com/raw/dAFC3R5q

Apologies in advance for not pushing this up to GitHub properly yet. I've added a second init packet that the macOS Xbox Driver project 360Controller uses.

Edit: Changed the link to v2 to remove a WARN_ON_ONCE that was a bit to aggressive.

from xpad.

powersurge360 avatar powersurge360 commented on May 28, 2024

This corrected the issue for me! Woot woot. Is there anything I ought to turn off for this particular file? Is it in debug mode or in any other way unstable that I should be concerned about?

from xpad.

cgutman avatar cgutman commented on May 28, 2024

Are you using the v2 link or did you get the original (before I edited it)? Do you see anything nasty in dmesg?

from xpad.

powersurge360 avatar powersurge360 commented on May 28, 2024

I used first one and then the other. I don't notice anything awry in dmesg for either file.

from xpad.

powersurge360 avatar powersurge360 commented on May 28, 2024

Thanks for debugging my hardware you two! I was so heartbroken that my nice new controller wasn't working A+ open sourcing :)

from xpad.

paroj avatar paroj commented on May 28, 2024

hmm.. we already had that packet once in #20 - go figure..

from xpad.

cgutman avatar cgutman commented on May 28, 2024

@powersurge360 Can you confirm that your pads still work with this xpad.c? http://pastebin.com/raw/Re8xby26

from xpad.

paroj avatar paroj commented on May 28, 2024

@cgutman could you please in future provide test code via a fork of this repo where one can see the diff?
Right now we are teaching people to compile kernel modules from pastebin, which is not a good thing..

from xpad.

cgutman avatar cgutman commented on May 28, 2024

@paroj I agree I was being a bit lazy. I've setup a fork with the code - https://github.com/cgutman/xpad/tree/3rdparty

from xpad.

cgutman avatar cgutman commented on May 28, 2024

@powersurge360 If you're still willing to test, can you confirm that the issue remains fixed on my "for_upstream" branch? https://github.com/cgutman/xpad

If that works, may I add a "Tested-By: Firstname Lastname Email address" from you for my submission upstream?

from xpad.

 avatar commented on May 28, 2024

My device only works with "powera" branch and neither "3rdparty" nor "for_upstream".
lsusb-v.txt

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.