Controller support request: Steam Controller
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.
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.
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 🤔
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.
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 .
Oh, cool. That link will surely be useful once I've figured out the BLE pairing.
any updates on this one?
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.
Nice one, thank you for the update 👍
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?
Here is the log from nRF Connect Log_2020-12-07_12_47_10.txt
@Kliffcom cheers. Nice, looks like it uses a standard HID profile.
@Kliffcom cheers. Nice, looks like it uses a standard HID profile.
Do you need any more logs for this controller?
@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.
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 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.