MissionControl icon indicating copy to clipboard operation
MissionControl copied to clipboard

Controller support request: Steam Controller

Open aveao opened this issue 5 years ago • 15 comments

The steam controller is quite an impressive and comfortable controller, and while it's sadly EOL, IMO it would be a lot more useful (to me at least) if it was supported by a project like this. I'm willing to do the necessary tests, research etc to help implement this, if requested.

The controller only supports a proprietary protocol and requires a dongle by default, but it gains BLE support with a software update that can be installed on a computer: https://support.steampowered.com/kb_article.php?ref=7728-QESJ-4420

The default configuration isn't great (it acts as a keyboard and mouse iirc), but perhaps it would be possible to map it to more useful controls.

aveao avatar Aug 27 '20 09:08 aveao

I've had a few requests for the Steam Controller now. I'm quite open to adding support, just don't own one.

Oh, it's BLE? I haven't figured out how to make BLE connections yet as I don't own a controller that uses BLE known to work with the switch. I think the pokeball plus might? If someone with a working BLE controller who is able to use Ilia could log the bluetooth + btm (+ maybe hid) IPC during pairing that would be of great assistance. Would also help me with keyboard/mouse support.

The rest is probably just a matter of adding a handler to map the controls.

ndeadly avatar Aug 27 '20 09:08 ndeadly

We started some time ago with @roblabla some work on reversing the firmware of the steam controller, can't remember if we started looking at the BLE firmware or not 🤔

marysaka avatar Aug 27 '20 11:08 marysaka

If you've got any interesting findings let me know. However, I'm more interested in how HOS handles the BLE side of things. There seems to be a lot more options for setting up a BLE connection and I have no idea how any of it works. Btm is pretty quick to reject connections if things don't look right. I've tried treating it in a similar manner to a regular bluetooth connection, but I never receive any BLE events. Easiest way to figure it out is to just observe the IPC traffic between the sysmodules.

ndeadly avatar Aug 27 '20 12:08 ndeadly

Steam Controller supports two modes of wireless comms: Either Enhanced Shockburst (a proprietary, rather simple communication protocol by Nordic Semi) or BLE. In both cases, it ends up exposing multiple HID devices. (keyboard, mouse, controller).

I have a very incomplete RE of the nRF51 firmware, but I never went very far with it because it's a bit of a mess, and fairly unlikely to do anything interesting. I assume it's exposing a mostly standard HID-over-bluetooth (though it'd be a good idea to check).

However, what I have that's a lot more interesting is a fairly complete documentation of the custom protocol that stands on top of HID to send commands to the controller (e.g. to take it from keyboard/mouse mode to controller mode, or change its poweron/poweroff jingles, etc...). You can find it at https://github.com/greggersaurus/OpenSteamController/blob/d5ce08f894fb529e1d5a5cab649aebcacbc88034/ReverseEngineering/valve_protocol.md .

roblabla avatar Aug 27 '20 12:08 roblabla

Oh, cool. That link will surely be useful once I've figured out the BLE pairing.

ndeadly avatar Aug 27 '20 14:08 ndeadly

any updates on this one?

OrionGrant avatar Nov 17 '20 21:11 OrionGrant

Can't begin any work on the controller until BLE connections work. I only just started giving that a serious look over this past weekend since it's been made known that the Xbox Series X controller uses BLE. Currently I'm as far as being able to see advertisements from nearby devices. Still a lot of work to be done.

ndeadly avatar Nov 17 '20 21:11 ndeadly

Nice one, thank you for the update 👍

OrionGrant avatar Nov 17 '20 21:11 OrionGrant

Finally making a bit of progress with BLE. Would someone with the controller be able to install nRF Connect by Nordic Semiconductor on their phone and get me a debug log showing the exposed services and characteristics of the controller?

ndeadly avatar Dec 01 '20 17:12 ndeadly

Here is the log from nRF Connect Log_2020-12-07_12_47_10.txt

Kliffcom avatar Dec 08 '20 20:12 Kliffcom

@Kliffcom cheers. Nice, looks like it uses a standard HID profile.

ndeadly avatar Dec 08 '20 20:12 ndeadly

@Kliffcom cheers. Nice, looks like it uses a standard HID profile.

Do you need any more logs for this controller?

OrionGrant avatar Dec 17 '20 11:12 OrionGrant

@OrionGrant no, should be fine for now. I've confirmed all I wanted to. It's mostly a matter of solving the rest of the problems relating to BLE support now.

ndeadly avatar Dec 17 '20 11:12 ndeadly

It looks like the idea of supporting this hasn't had any movement in a while. I picked up 4 of these controllers when they were being discontinued. From my experience with trying to get them to work on anything other than Steam, it looks like it might be difficult to get them to be of any use on the Switch. They seem to have a couple of HID profiles, and the default is mouse and keyboard, no analog controller behavior. But that mode can be switched by using the Steam software, only, or by connecting it via a USB cable. The proprietary dongle doesn't even work right without Steam.

That said, if you still want to try tackling this thing. I will send you one of my 4 controllers. The difficulty of using them in anything other than Steam has made them "not very valuable" to me.

t3nk3y avatar Aug 17 '21 03:08 t3nk3y

@t3nk3y the main issue hindering progress for now is the lack of support for HID over Bluetooth LE within the OS, not the controller itself. Unfortunately I've been preoccupied with solving other issues recently and haven't had a chance to get back into working on the LE problem. I hope to get back to it soon though, after I've finished with one or two things I'm currently working on.

Once I get to the point of working on supporting the controller itself though, your generous offer would be much appreciated if there are any issues encountered that can't be solved remotely with someone who owns one.

ndeadly avatar Aug 17 '21 08:08 ndeadly