Victrid / libnxctrl

Python Library Emulating Nintendo Switch Controllers
GNU General Public License v3.0
5 stars 0 forks source link

Rapid connection/disconnection cycle when attempting to pair with Switch #11

Open bittoh opened 2 years ago

bittoh commented 2 years ago

I have attempted to use libnxctrl (through the Splatplost application) on three different computers running linux (raspberry pi 4+, samsung galaxy book 360, and a dell inspiron 15 3000).

On all three machines, I get the same problem: when it comes time to pair the Switch to the computer via bluetooth, the initial connection is successful, but the Switch only remains paired for a fraction of a second, and then it disconnects. Then it attempts to reconnect, and after reconnecting successfully, it immediately disconnects. It continues to cycle through this loop of rapid connection/disconnection until the Switch is removed as a bluetooth device. No amount of reconfiguration within linux bluetooth settings or bluez itself seems to help.

I believe this to be a programming error because I also tested the program on different OSes: one raspbian, one Ubuntu, and one Arch Linux (the included splatplost USB image) and was met consistently with the same result. Unless there is something strange going on with my specific Switch (I doubt it, though), I have no reason to believe it could be a problem with anything other than libnxctrl.

If you know of any ways to circumvent the issue, please let me know.

DetectiveNaoya commented 2 years ago

I've also struggled with even after testing it with 3 different pcs (and two different switches one OLED other being the launch model)

SailingMonkey commented 2 years ago

I am also experiencing the same exact issue, if I go to Bluetooth devices I see "Nintendo Switch". But it keeps switching back and forth bewteen "Connected" and "Disconnected". The controller never shows up on my actual switch tho, I tried bare metal as well as a VM and nothing. I tried for kicks downgrading libnxctrl to 0.1.6 and had the same issue. My guess is we are either derping on a step that it isn't obvious, or the code needs updating.

Truthslayur commented 2 years ago

Also having this issue, 2 computers and 2 different switch consoles. Not sure if it's because we're using splatoon 3 and this was originally made for splatoon 2?

SailingMonkey commented 2 years ago

So after some fidling the following fixed it for me, @bittoh and @DetectiveNaoya. Go to /etc/bluetooth/input.conf and uncomment UserspaceHID=true, restart the bluetooth service or reboot your system and that should do the trick! If that also works for you guys then maybe @Victrid should add that to the readme.

Victrid commented 2 years ago

@SailingMonkey Which linux distro are you using? I wonder if it is a distro specific problem, as I have no /etc/bluetooth/input.conf file on my distro.

I saw this file from Gentoo's Wiki page.

DetectiveNaoya commented 2 years ago

@SailingMonkey are you using the flashable image? I don't see it on my end.

SailingMonkey commented 2 years ago

@Victrid and @DetectiveNaoya, I'm using a fresh install of Ubuntu in an Oracle VirtualBox and I got that solution from this thread: https://askubuntu.com/a/1386116

geronimo757 commented 1 year ago

Hello, your program looks fantastic.

I'm frustrated because I can't get it to work

I have the same problem and I used the disk linux image you provide, it connects / disconnects constantly.

I also tried with a bluetooth dongle, same problem as described before.

Is this due to the latest version of the switch firmware?

Thank you for your work, I hope to be able to enjoy it soon, :-)

geronimo757 commented 1 year ago

I saw that you offered a version for windows splatplost.win11.x86-64.build.exe

When I connect to switch. If I choose the splatplost option

I have

Error when pairing

SerialException could not open port '': FileNotFoundError(2, 'The specified path was not found.'None, 3)

ANd if I choose remote and enter the switch IP address as http://192.XXX.X.XX:8080 I have this:

Error when pairing ConnectionRefusedError [WinError 10061] No connection could be established because the target computer expressly refused it

I have windows 10 with a bluetooth card, an updated switch OLED with the last firmware installed. Am I missing something for this to work? thanks.

zaventh commented 1 year ago

I had this issue when the switch was in the dock. Removing it from the dock immediately resolved this issue for me.