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.39k stars 137 forks source link

[Bug Report]: PS4 3rd party controller not connecting properly #681

Open ElAngelDeHyrule opened 10 months ago

ElAngelDeHyrule commented 10 months ago

Switch Firmware Version

16.0.2 (Latest)

Atmosphère Version

1.5.2 (Latest)

Mission Control Version

0.9.2 (Latest)

Boot Method

Hekate

Issue Description

I've had issues with my ps4 clone (only thing it identifies it is the BG-04 name) controller not pairing properly to the switch whenever I try to. The controller seems to pair up (the light stops blinking and acts like it's connected to something) but the switch doesn't seem to recognice it, it doesn't show that anything is paired. This behaviour only happens whenever i have mission control installed and the switch is in pairing mode, so I think it's doing something, but since it's a 3rd party controller it just doesn't want to work I've verified that mission control works connecting my wii controller to it Any advices on getting this working?

Error Report

No response

Additional Context

No response

ndeadly commented 10 months ago

I make no guarantees for 3rd party clone controllers. Sometimes they can behave unexpectedly. That said, the only scenarios I've seen to date with them is either they just work, or they don't work at all (not even seen by the console during discovery).

Make sure your controller battery isn't low, and try deleting the /config/MissionControl/controllers directory. If neither of those changes anything, you could try make a log of the pairing process with this build and post it here (log located at sdmc:/mc-mitm.log)

MissionControl-0.9.2-debug-logging-ff1ffb3.zip

ElAngelDeHyrule commented 10 months ago

Thx for the early answer. I tried charging it and deleting the controllers directory, but neither of those things seemed to work. Here's the log with that build, and again thanks. mc-mitm.log

ndeadly commented 10 months ago

It seems like it's trying to connect but something is failing during the secure pairing procedure. This sometimes happens with official controllers and can be resolved by resetting the controller by the pinhole button underneath, or sometimes just through repeated trying. Give that a try.

Actually, I just remembered I've also seen this on controllers like the Hori Onyx, where nothing seems to help. That reminds me I need to make some patches to the bluetooth module to exfiltrate some of the internal bluetooth stack event info to try and diagnose these issues better. Been a little busy with the Summer lately...

ElAngelDeHyrule commented 10 months ago

It seems that it's like the Hori Onix, I've been resetting like 40 times and still nothing, but no worries, i'll wait to whenever this gets fixed. Thx you so much for your help and for developing MissionControl :)

ndeadly commented 10 months ago

Found time today to add the extra logging I spoke about. Let's see if this is any more informative

MissionControl-0.9.2-debug-logging-ee2f3de.zip

ElAngelDeHyrule commented 10 months ago

Here's the latest log. mc-mitm.log

ndeadly commented 10 months ago

Here's the latest log. mc-mitm.log

Hmm ok that's strange. It seems like as far as the stack is concerned, the pairing has succeeded. It raises an authorisation complete event with success flag and a link key present. So somewhere else it seems the Nintendo layer is deciding to reject the connection. The challenge is figuring out where this occurs without any error codes to guide us.

A hacky workaround might be just to intercept this event and manually create a pairing entry in the database, but I'd prefer not to if I can help it.

ElAngelDeHyrule commented 10 months ago

No worries, it's better to find the root of these issues so they don't happen to other controllers, as i have some random clone controller and manually adding it would be a hassle to do with every controller. If any more testing is needed with this i'll try to help. Thx again.

ndeadly commented 10 months ago

@ElAngelDeHyrule I made another build that now logs some additional internal events. Maybe this will give a better idea at what point it's failing.

MissionControl-0.9.2-debug-logging-4e815ea.zip

ElAngelDeHyrule commented 10 months ago

Here's the new log. mc-mitm.log

elhasany92 commented 10 months ago

my ds4 3rd party model CUH-ZCT2E still canot conect with my switch v1 fw 16.0.3 ams 1.5.4 mission control 0.9.3

what i must to do

ndeadly commented 10 months ago

@elhasany92 If you've already read the pairing instructions, try resetting the controller (there's a little pinhole button underneath the controller).

If that doesn't work, please refer to the FAQ , particularly the question I installed Mission Control but it doesn't do anything. Help!. There you will find general troubleshooting instructions that should resolve most problems.

If nothing in the troubleshooting works, you can make a log with the build I posted above for @ElAngelDeHyrule and we'll see if your controller suffers from the same problem.

elhasany92 commented 10 months ago

I have followed these steps, for my ds 3 clone stick it can work, but for my ds 4 clone stick it is not detected at all. this is the log on my ns mc-mitm.log

ElAngelDeHyrule commented 10 months ago

Any news on this?

ndeadly commented 10 months ago

No, sorry, I got busy with other issues. From your log it seems that it's being authenticated successfully and failing somewhere when the console tried to open the hid connection with the controller. I don't really have time to go deeper into this at the moment, as extracting additional information will require individual patches, or running a debugger.

ElAngelDeHyrule commented 10 months ago

No worries, I was just wondering what caused this behaviour and if it got fixed on recent updates. I'll wait then.

ndeadly commented 10 months ago

Unless it was working on some previous version, the answer is likely "it's doing something non-compliant". These clone controllers are designed to work with a particular console. That often means doing the bare minimum to make it work with that. If the console is lenient or doesn't check for certain things they can get away with non implementing them properly/at all.

It would still be interesting to understand this class of issue in the context of the Switch though, and see if anything can be done about it. So I'll probably revisit this when post-release things die down a bit.

ElAngelDeHyrule commented 10 months ago

Great! I'll wait then, thanks for everything. Good luck with the latest release.

Zaki3011 commented 7 months ago

This is exactly the same as my case even though I have updated the latest from starting cfw and fw.

itchyd commented 6 months ago

PS4 Hori Onyx not working on the latest version of everything. It's a shame because it's a decent controller although I believe the battery life isn't so great.