ndeadly / MissionControl

Use controllers from other consoles natively on your Nintendo Switch via Bluetooth. No dongles or other external hardware neccessary.
GNU General Public License v2.0
2.55k stars 139 forks source link

Request - Xbox Series X | S Wireless Controller #135

Open ArmandoRJr opened 3 years ago

ArmandoRJr commented 3 years ago

The form factor of the SX|S controller is definitely nice and would love to see it added eventually. It is unfortunately using BLE, which I imagine is still a WIP for this app, but still wanted to leave an issue here on GitHub in case that's ever solved.

The current bluetooth implementation is also...weird. It's not detected as a standard Xbox Wireless Controller but rather has a name with some numbers at the end (most likely the serial number for the controller, haven't checked). It also shows up as a "6 axis 16 button gamepad with hat switch", which is obviously not concurrent with any other Xbox (One S/X) Wireless Controller. Unsure if that will be fixed with a firmware update but in the meanwhile it's worth mentioning.

image image

ndeadly commented 3 years ago

Thanks for the info. Are you able to find the VID/PID for the controller? That's a shame about BLE, you're right I don't have it working yet. Hopefully I can figure it out in the near future so all the controllers using it can be added. It would definitely be nice to be able to use the next-gen console controllers.

Yeah, that's probably the serial number I guess. It might just be a matter of needing an updated Windows driver to add proper support for the controller. I wouldn't be too concerned just now seeing as the console is still yet to officially release.

kakra commented 3 years ago

It's currently being added here, too, along with documentation: https://github.com/atar-axis/xpadneo/pull/255

@ndeadly You should find the PID/VID there.

ndeadly commented 3 years ago

@kakra oh awesome, I didn't realise you guys had started working on it already. Thanks, I'll keep an eye on it.

ndeadly commented 3 years ago

Making a bit of progress with BLE, I'm now able to get my BLE keyboard and mouse connected and receiving input reports on the console (still a lot of work to be done, before anyone gets too excited).

@ArmandoRJr maybe you could help me gather some additional info on the controller. There's a mobile app called nRF Connect by Nordic Semiconductor that can connect to BLE devices and enumerate and read all their advertised services and characteristics. If you could use this app to grab a debug log of everything the controller exposes and post it here that would be very useful.

koenhappy commented 3 years ago

Hi I got the Series controller also and here's what I got from nRF Connect @ndeadly

Feel free to message me if you need any info regarding the controller! Log 2020-12-04 12_24_39.txt

ndeadly commented 3 years ago

@koenhappy thanks! ArmandoRJr already sent me theirs via discord, but it never hurts to have more than one to see if there are any variations between individual controllers or firmware versions.

Don't need anything else for now, mostly just wanted to know whether it was safe to assume the controller was conforming to the standard HID profile. Looks like the answer is yes. If anything else comes up I'll let you know. It's looking like BLE support will be more work than getting regular Bluetooth working, as the only controller handling code in the OS seems to be for the Pokeball Plus, which uses its own proprietary protocol as far as I can tell.

CaiMiao commented 3 years ago

any update news on this? thank you for your work! i can help test too whenever you need any help.

ndeadly commented 3 years ago

@CaiMiao nothing much that would concern the end user. I've been mostly reverse engineering and trying to figure out how best to handle the BLE devices as there is no code in HOS for managing them.

naldo29 commented 3 years ago

The form factor of the SX|S controller is definitely nice and would love to see it added eventually. It is unfortunately using BLE, which I imagine is still a WIP for this app, but still wanted to leave an issue here on GitHub in case that's ever solved.

The current bluetooth implementation is also...weird. It's not detected as a standard Xbox Wireless Controller but rather has a name with some numbers at the end (most likely the serial number for the controller, haven't checked). It also shows up as a "6 axis 16 button gamepad with hat switch", which is obviously not concurrent with any other Xbox (One S/X) Wireless Controller. Unsure if that will be fixed with a firmware update but in the meanwhile it's worth mentioning.

image image

As a user of the new controller, it would be great if it supported it lol

DragarX commented 3 years ago

x Controller now registers as Bluetooth LE XINPUT controller in windows. Hopefully LE support will come soon with the new bluetooth features in fw12+

ndeadly commented 3 years ago

LE support has been present since firmware 5.0.0. The problem is that the btm and hid services don't have any code for handling devices besides the pokeball plus. Other devices can be connected, but there is no way to have them "integrate" with the system as they operate differently to classic bluetooth devices. They can't be paired at the Change Grip/Order screen, don't show up as connected controllers and there is nothing waiting to process the input packets they send.

For classic bluetooth controllers, all I have to do is fake a few things to make the console think they're switch pro controllers and the OS handles the rest. LE controllers on the other hand will likely require some dirty hacks to make the console think they're connected using bluetooth classic. An alternative might be to connect them up to the virtual gamepad API that sys-con uses, but this means no motion controls, rumble or anything else that requires sending data to the controller.

DragarX commented 3 years ago

So not impossible, but will require a lot of work and may be missing features? Sounds like a worthwhile wait, but I'm sure you've got other work to do first, so I'll patiently use my shiny new controller with a usb cable. :)

ndeadly commented 3 years ago

So not impossible, but will require a lot of work and may be missing features? Sounds like a worthwhile wait, but I'm sure you've got other work to do first, so I'll patiently use my shiny new controller with a usb cable. :)

Yeah, pretty much. In addition, LE will likely require it's own homebrew app for pairing, might be necessary to pair every time the controller gets disconnected etc. I've already done some work towards it but a bunch more research is required. The console is prone to crashing when controllers do unexpected things, so there are many issues that need to be addressed before anything is release-ready.

dimabbox commented 3 years ago

Hey! How's the progress going on BLE Xbox series x/s? Appreciate your work!

ndeadly commented 3 years ago

Not much has changed since the last time this was asked. I haven't had so much time in the past months and most of that has been spent trying to figure out all the things that broke with the release of 12.0.0 firmware. Pairing of Wii/WiiU controllers is still broken to date. I will resume work on BLE after the final 0.5.0 release.

Please try to remember that this isn't a Q&A section. I don't mind answering questions like this, but it's better suited to the discussions section to leave issues for technical discussion.

n0ah119 commented 2 years ago

Thank you for your great job! I want to contribute the developing for series X/S controller. I intend to learn homebrew development. God bless

kakra commented 2 years ago

Not much has changed since the last time this was asked

This probably needs some attention soon as MS started to roll-out the BLE firmware upgrade for the older models on Xbox consoles, Windows will probably follow soon. With the new firmware (version 5.11 and later), the controllers switch from classic Bluetooth to BLE.

Or at least people should not update their controllers if they intent to continue using them with MC.

ndeadly commented 2 years ago

@n0ah119 thank you, and while I appreciate your willingness to contribute, this is more of a reverse engineering problem than a pure development problem. Unless you already have skills in that area there's probably not a lot you can do to help out. Adding support for the Series X/S controllers is the easy part. The bulk of the problem is understanding the internal workings of the bluetooth and related modules and how we can trick the console to accept LE controllers when it's only looking for regular bluetooth connections.

Not much has changed since the last time this was asked

This probably needs some attention soon as MS started to roll-out the BLE firmware upgrade for the older models on Xbox consoles, Windows will probably follow soon. With the new firmware (version 5.11 and later), the controllers switch from classic Bluetooth to BLE.

Or at least people should not update their controllers if they intent to continue using them with MC.

I've been keeping an eye on this and making an attempt to warn people not to update in my release notes. It's definitely bumped the priority of LE support upwards a little bit for me.

impeeza commented 2 years ago

I don't think is so easy, as far I know Nintendo hasn't implemented BLE stack so it will be need writing from scratch and THAT IS A HUGE TASK (even impossible) and a lot of effort for a very little reward and only for support a controller. While big N doesn't implemented it think is a futile task

ndeadly commented 2 years ago

@impeeza BLE support is all there in the bluetooth stack and even exposed by Nintendo via IPC. I have written a PoC to prove it can be done. The issue is in interfacing with the rest of the system. We can implement all sorts of things ourselves no problem, but at some point that all has to be hooked up to the existing frameworks for the LE devices to actually be accepted as controllers and inputs read by games. This is the core problem. I can probably do it without so much trouble if I use the virtual gamepad API that sys-con uses, but then we lose the ability to support things like motion control and rumble. There are still undocumented things that need to be understood first in any case for it to work well enough to be released. With this working it would allow many controllers to be supported, not just the Series X/S controllers, so I would disagree and say this is well worth working on, it's just there's a lot more uncertainty than some other tasks so I haven't been prioritising it.

impeeza commented 2 years ago

Cool, that's great, but I pity you is a lot of work, I wish I could help. regards.

ndeadly commented 2 years ago

I think we're past halfway to supporting it at least. Haven't looked at my code in a while though. Hope N didn't break anything in the 12.x.x/13.x.x updates to the bluetooth module...

n0ah119 commented 2 years ago

Thank you for patiants explaining. Now I understand what is the Core problem. I don't have reverse engineering experience.

wangjian410 commented 1 year ago

When will the Xbox Series X | S Wireless Controller be available? please...

ndeadly commented 1 year ago

When it's complete.

DzungHT commented 1 year ago

I can probably do it without so much trouble if I use the virtual gamepad API that sys-con uses, but then we lose the ability to support things like motion control and rumble.

@ndeadly Appreciate your work!

I'm a big fan of the Xbox controller series X. I know it's very hard to complete this request now. So if possible, at least please let MC can connect the Xbox controller series X via Bluetooth (without rumble/motion control) while we find a better solution.

ndeadly commented 1 year ago

@DzungHT you can check out the experimental Bluetooth LE build in the #testing channel of my discord server if you are impatient. There is partial support for Xbox controllers running LE firmwares.

I will not be releasing anything official until I believe both the stability and the source code are of an acceptable standard.

NotArialdy commented 1 year ago

@ndeadly so that means I can use a non-official version if I go to your Discord in the #testing channel? I really don't care about rumble or motion control, I just want to be able to use my Series X controller.

Fan of your job btw!

ndeadly commented 1 year ago

@NotArialdy yes, though I make no guarantees of stability currently and will not be providing support for any issues encountered

NotArialdy commented 1 year ago

@ndeadly would you please share your Discord server?

ndeadly commented 1 year ago

https://discord.gg/gegfNZ5Ucz

For the record, it's linked on the main project page and in all the recent release pages too.