o0Zz / sys-con

Nintendo Switch sysmodule that allows support for third-party controllers (XBox, PSX, PC, ...)
GNU General Public License v3.0
74 stars 6 forks source link

Xbox One S/X Home/Share Buttons Please! #14

Closed BoLThompson closed 5 months ago

BoLThompson commented 5 months ago

My Xbox One Series S/X Robot White controller connects just fine and works very well with the xboxone driver, however, the home key and share keys seem to be unusable. I expected the share key not to work, since that one didn't work with cathery's sys-con and this repo didn't mention adding support for it, but the home key is paramount. Alternatively, if there was a way to set hotkeys for the capture and home buttons like in Mission Control (Minus+dpad up or down), that would be almost as good.

o0Zz commented 5 months ago

Interesting issue, the home button is supposed to work with the "XBOX" center button, isn't it? There will be a similar feature in the next release where it will be possible to simulate the HOME button with +- at the same time (for controllers that don't have a home button). Did you have to add your [vid-pid] to make it work? If so, I'm interested in it ;).

BoLThompson commented 5 months ago

Yeah, the "XBOX" center button just doesn't do anything. And no, I didn't need to add a [vid-pid] section, the logs show it identify immediately as an xboxone controller. I guess it might also be worth mentioning that even though I only had the one controller plugged into my dock, the logs also show some other device perpetually attempting and failing to be recognized.

o0Zz commented 5 months ago

What version of sys-con do you use ?

BoLThompson commented 5 months ago

1.1.1, atmosphere 1.7.0 After deleting 690000000000000D, config/sys-con and sys-con.nro to reinstall, I'm now faced with a new issue that the controller is not registered at all. Config and log attached. sysconconfig.zip

o0Zz commented 5 months ago

Did you try to unplug and replug the controller ? What was your version before your issue ? v1.0.2 I assume (Because issues you report at the begining let me think you were on an old version).

BoLThompson commented 5 months ago

To be honest, I'm not positive which version I was using when the controller was recognized. I'm sorry that I didn't take the logs during that period. However, according to my download history, the only versions of sys-con I could possibly have used are 0.6.4 (which works consistently, but is old of course), 1.1.1 which I posted the logs for, or 1.1.0. I've tried unplugging the controller, holding the XBOX button until it turns off, and then replugging it. No change. I've now installed 1.1.0 and I'm getting the same behavior. Here's a capture. sysconconfig1.1.0.zip

o0Zz commented 5 months ago

Ok, thus the v1.1.0 has a known issue with XBOXOne controller, it has been fixed in v1.1.1. What I don't understand is why v1.1.1 don't detect any new USB. Did you try to unplug/replug the controller with the v1.1.1 ?

BoLThompson commented 5 months ago

Yes, I did. I've installed 1.1.1 and unplugged/replugged the controller a few more times to test. When the controller is connected over USB, or when the XBOX button is pressed while the controller is disconnected, the light on the XBOX button flashes softly. Holding the button for about 5 seconds turns off the controller. I've tried pressing the button to turn the controller on before connecting USB, and I've also tried turning the controller off before and after disconnecting USB. No luck. Here's the log. sysconconfig1.1.1.zip

texita commented 5 months ago

i have the same problem with my hori battle pad that you already know. Is a discovery mode problem maybe? i've to try. EDIT: just rolled back to sys-con 1.1.0 and hori battlepad works. (i've tried 1.1.1 with default config and 1.1.0 default config)

o0Zz commented 5 months ago

sys-con-1.1.1+7-ATMOSPHERE-1.7.0.zip Could you try this build to see if it change something ?

BoLThompson commented 5 months ago

If the controller is off when I plug it in, no dice. If I hit the XBOX button to turn it on first and then connect USB, it works immediately, with the home button also doing just fine but no capture key functionality. Didn't change the log level to 0 this time. Here's my logs. sysconconfig1.1.1+7.zip

texita commented 5 months ago

1.1.1+7 make my hori battlepad working again

o0Zz commented 5 months ago

Ok thank you both. For an obscure reason the switch do not send an event when your controllers are plugged and we have to poll the API. I changed this portion of code in v1.1.1 to make it cleanner (It's everytime better to wait for an event instead of polling), but I will have to think to something smarter here. I will fix it for the next version

BoLThompson commented 5 months ago

Than you very much. I'll continue playing with 1.1.1+7 for now and eagerly await the rumble update.

o0Zz commented 5 months ago

Can one of you test this version and make sure it still works with your controller? I will certainly release a v1.2.0 version based on this one. This version includes an important stabilisation of the USB stack, especially if the controller is already connected to the switch when the switch boot, OR when more than 1 controller is connected to the switch.

sys-con-1.1.1+15-ATMOSPHERE-1.7.x.zip

Thank you

texita commented 5 months ago

tested and working my hori battlepad

BoLThompson commented 5 months ago

Tested: as long as my controller is powered on and connected before the switch boots, it connects just fine and unplug/replug isn't necessary anymore. All other behavior appears to be the same as 1.1.1+7: home button works, capture button does not.

o0Zz commented 5 months ago

@BoLThompson Does this mean that if I try to plug the controller after booting the switch, it won't work (it won't be recognised)?

BoLThompson commented 5 months ago

The controller is recognized as long as it's already powered on when the switch first has access to it. If the switch is in sleep mode and the controller is connected over usb, I must first press the xbox button to turn the controller on and then wake the switch from sleep and it will be recognized. If the switch is already on and the usb cable is not connected, then I have to press the xbox button wake up the controller before I connect it over usb and it will be recognized. If at any point the switch is awake and the usb cable is connected but the controller's xbox button LED is not on, no connection will happen and its necessary to either put the switch to sleep and then press the xbox button then wake the switch, or disconnect the controller then press the xbox button then connect the controller.

o0Zz commented 5 months ago

Thank you for the deep explanation, I have a better understanding of your original issue. Sound's good