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.5k stars 138 forks source link

Generic PS3 controller pairing but not fully connecting #615

Open marionicolas opened 1 year ago

marionicolas commented 1 year ago

Switch Firmware Version

16.0.1

Atmosphère Version

1.5.1

Mission Control Version

0.9.1 (Latest)

Boot Method

Hekate

Issue Description

Done pairing via USB, a new controller is added to config folder, after that, when connecting via BT, controller seems to connect because it flashes the 4 lights but slowly and continuously for ever until I turn the console off.

Attach the log here:

======================== LOG STARTED ======================== 0.9.1-debug-logging-05bbc5b Wed Apr 19 11:58:06 CEST 2023 [ts: 9079ms t: MainThread p: 42/42] Environment Info: HOS version: 16.0.1 AMS version: 1.5.1 MC version: 0.9.1-debug-logging-05bbc5b [ts: 9956ms t: mc::EventThread p: 37/37] Bluetooth BLE Event: Client Registration 00 00 00 00 04 01 00 00 [ts: 9971ms t: mc::EventThread p: 37/37] Bluetooth BLE Event: Client Registration 00 00 00 00 05 01 00 00 [ts: 9983ms t: mc::EventThread p: 37/37] Bluetooth BLE Event: Client Registration 00 00 00 00 06 01 00 00 [ts: 9995ms t: mc::EventThread p: 37/37] Bluetooth BLE Event: Client Registration 00 00 00 00 07 01 00 00 [ts: 10007ms t: mc::EventThread p: 37/37] Bluetooth BLE Event: Scan Filter 00 00 00 00 03 00 00 00 [ts: 18628ms t: mc::EventThread p: 37/37] Bluetooth BLE Event: Scan Filter 00 00 00 00 00 00 00 00 [ts: 18657ms t: mc::EventThread p: 37/37] Bluetooth BLE Event: Scan Filter 00 00 00 00 00 00 00 00 [ts: 32105ms t: mc::EventThread p: 37/37] Bluetooth Core Event: PendingConnections 01 00 00 00 00 00 00 00 [ts: 32674ms t: mc::EventThread p: 37/37] Bluetooth Core Event: InquiryStatus 01 00 00 00 ff ff ff ff [ts: 32693ms t: mc::EventThread p: 37/37] Bluetooth Core Event: PendingConnections 01 00 00 00 00 00 00 00 [ts: 36967ms t: mc::EventThread p: 37/37] Bluetooth HID Event: Connection 01 00 00 00 05 21 8e 4f 63 25 09 00 [ts: 36984ms t: mc::EventThread p: 37/37] Attaching controller handler 05 21 8e 4f 63 25 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 00 05 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 4c 05 68 02 08 00 80 00 e4 da 76 00 00 00 00 90 fc da 76 00 00 00 6c 3f e3 da 76 00 00 00 00 00 00 00 00 00 00 00 60 4c da c2 08 00 00 00 00 00 00 00 00 00 00 00 50 48 da c2 08 00 00 00 28 45 da c2 08 00 00 00 50 48 da c2 08 00 00 00 68 93 fc da 76 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 01 a4 38 cc a4 a4 0f 4e 69 6e 74 65 6e 64 6f 20 53 77 69 74 63 68 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 50 4c 41 59 53 54 41 54 49 4f 4e 28 52 29 33 20 43 6f 6e 74 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 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 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 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 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 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 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 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 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

[ts: 37259ms t: mc::EventThread p: 37/37] Bluetooth Core Event: Tsi 05 21 8e 4f 63 25 01 0a [ts: 37315ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 38021ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 38770ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 39491ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 40225ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 40960ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 41665ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 42400ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 42925ms t: mc::EventThread p: 37/37] Bluetooth Core Event: InquiryStatus 00 00 00 00 00 00 00 00 [ts: 42944ms t: mc::EventThread p: 37/37] Bluetooth Core Event: InquiryStatus 01 00 00 00 ff ff ff ff [ts: 43121ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 43841ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 44560ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 45280ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 45985ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 46664ms t: mc::EventThread p: 37/37] Bluetooth Core Event: Tsi 05 21 8e 4f 63 25 01 ff [ts: 46735ms t: mc::BtdrvMitmThread p: 17/17] -> HID Command Request: 0x02 02 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 00 00 00 00 00 00 00 00 [ts: 47110ms t: mc::EventThread p: 37/37] Bluetooth Core Event: Tsi 05 21 8e 4f 63 25 01 01 [ts: 47259ms t: mc::EventThread p: 37/37] Bluetooth Core Event: InquiryStatus 00 00 00 00 00 00 00 00 [ts: 55164ms t: mc::EventThread p: 37/37] Bluetooth BLE Event: Scan Filter 00 00 00 00 01 00 00 00 [ts: 55181ms t: mc::EventThread p: 37/37] Bluetooth BLE Event: Scan Filter 00 00 00 00 02 00 00 00 [ts: 60573ms t: mc::EventThread p: 37/37] Bluetooth Core Event: PendingConnections 01 00 00 00 00 00 00 00 [ts: 70604ms t: mc::EventThread p: 37/37] Bluetooth HID Event: Connection 00 00 00 00 05 21 8e 4f 63 25 09 00 [ts: 72920ms t: mc::EventThread p: 37/37] Bluetooth BLE Event: Client Registration 00 00 00 00 04 00 00 00

mc-mitm.log

Error Report

No crash or error observed

Additional Context

No response

ndeadly commented 1 year ago

Do you have any additional info about the controller? Is it a third-party version with a brand or anything, or a counterfeit version pretending to be the real thing?

It looks as if the controller is actually connecting to the console via Bluetooth, but I guess isn't accepting the commands to set the LEDs or enable the sending of inputs.

I was told that some clone controllers use data reports instead of set feature reports for this info. Here's a build I made that changes the output report type (note it will probably break support for official controllers). Try it out and let me know if it makes any difference.

MissionControl-0.9.1-ds3-clone-fix-3601afd.zip

marionicolas commented 1 year ago

Its a third party not pretending, even when the model name is the same than the original, the ps button says p3 haha

20230424_115822

With ds3 clone fix build it doesnt seem to conect .. keeps flashing fast for a while and then turns off.

ndeadly commented 1 year ago

I would still consider this a counterfeit, they're just not trying very hard...

With ds3 clone fix build it doesnt seem to conect .. keeps flashing fast for a while and then turns off.

Ok, try this one MissionControl-0.9.1-ds3-clone-fix-bc751ce.zip

marionicolas commented 1 year ago

Oh!! this one made out to connect on the change grip/order screen, and keeps connected, even when the controller keeps flashing the 4 lights slowly, i see it on the screen connected but, as soon as I leave the change grip/order screen it looses the link and after 10 seconds of flashing it turns off. If I let the change grip/order screen opened for a long time, the controller keeps connected and working...

I really dont want to waste your time on this cos you cant be launching builds for every clon out there right?

ndeadly commented 1 year ago

If the controller shows up on the screen, I think that means it has started sending input data. This would indicate the first payload to enable the controller has worked.

If I let the change grip/order screen opened for a long time, the controller keeps connected and working...

Are you saying the button inputs are working while on this screen?

I really dont want to waste your time on this cos you cant be launching builds for every clon out there right?

I figured if there were some simple solutions to make some clone controllers work, then why not? But in general, yeah, I'm not going to spend too much time on making clone controllers compatible. It's just too much trouble when I don't have the physical controller myself to debug, and can't really log anything useful for diagnosing the problem. Besides, anything that requires that level of debugging will likely need binary patches applied to the bluetooth module. Maintaining patches across firmware versions for this kind of thing doesn't sound like something I want to get myself into.

marionicolas commented 1 year ago

Are you saying the button inputs are working while on this screen?

Yes! While in that screen, any button or stick I do, it "pops" the control tile so it is working. The bad is that ass soon as I left that screen, it disconnects (keeps flasshing 4 lights slow, but inputs are not reflected on the UI anymore), and after a couple of seconds it turns off.

I figured if there were some simple solutions to make some clone controllers work, then why not? But in general, yeah, I'm not going to spend too much time on making clone controllers compatible. It's just too much trouble when I don't have the physical controller myself to debug, and can't really log anything useful for diagnosing the problem. Shure, thats what I meant, this is the first time y open a bug on some repo I consume, y generally prefer not to take peoples time if can be avoided.

Is the ds3-clone-fix-bc751ce success a thing that is worth to keep working on? or is just a patch very dificult to intergrate/maintain?

Again thanx a lot for your time, this module is one of the greatest things i like on my console.

ndeadly commented 1 year ago

@marionicolas it's a pretty trivial fix, the problem is I currently have no way to determine whether a controller is a clone or not. I can't include it in a release without being able to differentiate as it will break official controller support. I've seen that some controllers misspell the controller name and other things like that, but it's very controller dependant.

Yes! While in that screen, any button or stick I do, it "pops" the control tile so it is working. The bad is that ass soon as I left that screen, it disconnects (keeps flasshing 4 lights slow, but inputs are not reflected on the UI anymore), and after a couple of seconds it turns off.

Someone else reported that they tried that build and although the LEDs remained flashing, the controller stayed connected and continued to work. Very likely it's not the same clone as yours, but goes to show there's all sorts of behaviour coming from these things.

marionicolas commented 1 year ago

The thing that I cant figure out is that these clones work with the ps3 pretty fine right? My clon is working with Arduino on Esp32 too. It is like there where something else they are not telling us in the "comm protocol" hahaha

ndeadly commented 1 year ago

I think a lot of the behaviour comes from the differences between the different bluetooth stacks in use. Maybe the one of the PS3 is more relaxed when it comes to handling certain things. There may also be some gaps in the public knowledge of how the official controller works.

If someone were to capture the bluetooth traffic between one of these controllers and the console (or maybe another platform where it works without issue) I might be able to draw some further conclusions.

ndeadly commented 1 year ago

Here's an updated version of the above build that incorporates the fixes from the 0.9.2 release for anyone wanting to test this

MissionControl-0.9.2-ds3-clone-fix-2338e91.zip

ndeadly commented 1 year ago

@marionicolas try this version. Apparently a change I added stopped another persons controller from getting disconnected outside of the Change Grip/Order screen.

MissionControl-0.9.2-ds3-clone-fix-6cf686c.zip

flaviano333 commented 1 year ago

Can you update to the new firmware? Thank you!!!