Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steam Controller not detected over bluetooth #642

Open
nickjwhite opened this issue Jun 28, 2021 · 13 comments
Open

Steam Controller not detected over bluetooth #642

nickjwhite opened this issue Jun 28, 2021 · 13 comments

Comments

@nickjwhite
Copy link

I've been using sc-controller for a few years with the official sc dongle, and it's worked like a charm. I recently switched to Bluetooth mode for the first time, and sc-controller no longer picks up the controller at all. Steam detects it fine, though, so I know the bluetooth connection is made successfully.

I'm using the 0.4.8 AppImage on Debian Buster, with the udev rules installed. The controller is in the basic mouse/kb mode when connected to bluetooth, but no registered controller shows up on sc-controller. Nothing except for the generic initialization messages show up when I run daemon debug.

I'm a bit stuck as to how to debug this further. Any suggestions?

@stacyharper
Copy link

I lost my dongle so I must use bluetooth mode. It looks like sc-controller doesnt detect my controller or it just does not trigger any input. My SC mouse seems to works in sway (moving and right/left clicking). I dunno how both could conflict

@nickjwhite
Copy link
Author

nickjwhite commented Aug 31, 2021

I lost my dongle so I must use bluetooth mode. It looks like sc-controller doesnt detect my controller or it just does not trigger any input. My SC mouse seems to works in sway (moving and right/left clicking).

Same here. The basic mouse functionality is the steam controller in so-called "Lizard Mode", which is the default before something like Steam or sc-controller picks it up, as it just presents itself as a mouse & keyboard to the operating system.

Hopefully someone more knowledgeable can weigh in on what might be the cause of sc-controller failing to recognise it in bluetooth mode for us.

In the meantime I have just been using the controller wired, which does work fine for me.

@LuisCondeVela
Copy link

Have the same issue, only works on wired or with the dongle, SC Controller does not recognize the controller at all on Bluetooth mode.

@Ryochan7
Copy link
Contributor

Ryochan7 commented May 2, 2022

I solved this problem recently in the Python 3 fork. The key problem was updates to BlueZ changing how sending feature reports work; the latest BlueZ version that I had tested that worked with the old code was 5.61 IIRC. The only change needed was to set a feature report ID of 3 for the first byte. A one line change.

Ryochan7@321e6de

@nickjwhite
Copy link
Author

nickjwhite commented May 9, 2022

Thanks @Ryochan7, excellent detective work! I just created a pull request with that fix, #669 so hopefully it can be incorporated into the next release.

@kozec
Copy link
Owner

kozec commented May 9, 2022

I've merged PR, but I'll have to get new enought bluez and test whether this change doesn't break compatibility with older. Any idea which specific version caused the issue?

@nickjwhite
Copy link
Author

I've merged PR, but I'll have to get new enought bluez and test whether this change doesn't break compatibility with older. Any idea which specific version caused the issue?

Thanks @kozec, I'm not exactly sure, but FWIW I'm on 5.64, where it definitely fails without the fix, and @Ryochan7 said above that 5.61 was the latest version he tested where the old code worked, so that implies it was either 5.62, 5.63 or 5.64 that introduced the issue.

@Ryochan7
Copy link
Contributor

Ryochan7 commented May 9, 2022

Not sure what change happened in between BlueZ 5.61 and 5.64 that caused this particular breakage. Ended up just testing some variables in some example hidraw test C code and finally got a feature report through successfully.

There were behavior changes in BlueZ that even broke Steam Controller BLE support in Steam for a while with version 5.56. Maybe the stack now more actively checks for known feature reports listed in the HID report descriptor.

ValveSoftware/steam-for-linux#7697

Without adding report ID 3 as the first byte of the feature report, BlueZ 5.64 will cause the sendFeatureReport call to error out with an Input/output error. BlueZ 5.61 and 5.60 were tested with the feature report change and the change worked fine in those versions as well. Also, although some people might not like it, solving this problem was the key that allowed feature reports to successfully get sent to a BT connected Steam Controller on my Windows test mapper. Many of the recent BLE changes were first tested on Windows.

@Ryochan7
Copy link
Contributor

Ryochan7 commented May 30, 2022

Although the change has already been committed to this repo, I will confirm that the source code for VSCView ExtendInput also uses feature report ID 3 for its BLE reader. That was the only other Windows app (besides Steam Input) I found that could read from a BT connected Steam Controller. It seems like the old behavior in SC Controller was wrong but luckily it worked for as long as it did.

https://github.com/Nielk1/VSCView
https://github.com/Nielk1/ExtendInput/blob/e3895fa2cc5340c19c35f4eceead7ce5219971c4/ExtendInput/ExtendInput/Controller/SteamController.cs#L647

@pattontim
Copy link
Contributor

I am observing similar behaviour when using the SD prerelease and a steam controller over Bluetooth. Maybe related to the version shipping with OS Holo?

@pattontim
Copy link
Contributor

On the SD, BT mode exhibits this exact same behaviour when both Steam is closed or running and also when I undid the BT change. This leads me to believe its unrelated to the fix above.

@nickjwhite
Copy link
Author

@pattontim I'm not sure I understand what behavior you're seeing on the Steam Deck (presuming that's what "SD" means here). FWIW, I have successfully connected my Steam Controller to a Steam Deck using Steam on multiple occasions (as expected), but haven't tried sc-controller on a Steam Deck.

@pattontim
Copy link
Contributor

pattontim commented Oct 27, 2022

Steam OS Holo returns caps for the BT address, here's my hotfix. End of day now so will try to push tomorrow, device_monitor.py:

if node_addr == addr:
     return node
			try:
				# SteamOS 3 "Holo" return caps
				if node_addr.lower() == addr.lower():
					return node
			# is none
			except AttributeError:
				pass

This makes BT devices work on Holo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants