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

[Bug Report]: Dualshock 3 pairing issues #609

Closed 90luke90 closed 1 year ago

90luke90 commented 1 year ago

Switch Firmware Version

16.0.0

Atmosphère Version

1.5.2 (Latest)

Mission Control Version

0.9.1 (Latest)

Boot Method

Hekate

Issue Description

The console reboots when connecting a dualshock 3 via usb controller in the Controllers->Change Grip/Order screen: Panic occured while running Atmosphere Title ID: 010000000000bd00 Error: Std::abort (0xFFE)

Error Report

report_06833caea.log its not a "log", its a "bin" file

Additional Context

sys-con is not installed

ndeadly commented 1 year ago

Thanks for the report. It appears to be an error from within the Bluetooth module (weird, I thought it would be USB) but I can't find any references to the error code. I will need to dig deeper.

What exactly were you doing to trigger this? Does it happen consistently or was it a once off? I never saw any fatal errors in my testing on 14.0.0.

90luke90 commented 1 year ago

It happens every time I connect the controller via USB when I am in the "Grip/Order Change" screen. The console immediately shuts down and displays the error.

If I leave the controller plugged in, the console does not start and shows the same error as when I plugged it in.

If I connect the controller and then go to the Change Handle/Order screen, no error occurs, but the pairing process does not work. If I disconnect and reconnect in this screen, I get the error already described here. I updated to 16.0.1, same behavior.

ndeadly commented 1 year ago

Ok, I found the error code in the 16.0.0 btdrv version. Must be something new that was added after 14.0.0. Unfortunately I haven't looked at this version in any detail yet so I don't have anything labelled to know which part(s) of the code this can be triggered from. I'll try to look into it over the weekend.

ndeadly commented 1 year ago

In the meantime you could try running this build and post the log (sdmc:/mc-mitm.log) it creates after triggering the crash. Might help me pinpoint which call is responsible for the error.

MissionControl-0.9.1-debug-logging-05bbc5b.zip

ndeadly commented 1 year ago

It's beginning to look a bit like this error code might indicate a full pairing database. Do you have many controllers and/or Bluetooth audio devices paired with the console. Show me the output of this homebrew app https://github.com/ndeadly/MissionControl/files/7227157/btdb-1300.zip

90luke90 commented 1 year ago

I will provide more data later. Thanks for superfast troubleshooting!

90luke90 commented 1 year ago

Ive got 10 Paired BT devices in BTDB. Ive deleted the list, same behavior.

Here is the log with some attempts to pair the controller: mc-mitm.log

ndeadly commented 1 year ago

I've been able to reproduce the issue myself, and on 14.0.0 too (error code has just been changed). It definitely seems to be related to the database being full (10 is the max number of controllers allowed). As I remember, the usual system behaviour is to remove the least recently used pairing to make room for another, and I had assumed this would be taken care of for me. It seems this is not the case however. I think maybe that logic is handled at a higher level by the `btm``module or even the controller applet. I've been trying to programatically remove stale pairings myself, but so far still getting the error. I'll need some more time to dig deeper.

ndeadly commented 1 year ago

Ok, this allows me to pair the controller crash free with a full pairing database. Let me know if it fixes your issue.

MissionControl-0.9.1-ds3-db-full-fix-735ca4b.zip

StivenStriker commented 1 year ago

Ok, this allows me to pair the controller crash free with a full pairing database. Let me know if it fixes your issue.

MissionControl-0.9.1-ds3-db-full-fix-735ca4b.zip

I had the same problem. This fix helped. Thank you.

ndeadly commented 1 year ago

I merged the fix into the latest release https://github.com/ndeadly/MissionControl/releases/tag/v0.9.2

Please be aware that the above build was likely missing a call included in the final release, which could cause the system to crash when you reboot. @StivenStriker if you experience this issue let me know and I'll help you fix it.