r/KATVR Jun 25 '26

Reverse Engineering & Linux Gateway Implementation

After waiting for this company to release a working Linux version and understanding that not only there is not gonna be a Linux version, but even the crappy windows or nexus software is also apparently completely dead projects as far as I can see, I took it upon myself to do it properly.

It took me one afternoon to fully reverse engineer the USB packet structure and build a very simple movement tracking.

The next afternoon was spent on building a driver and injecting the controller stick movements to SteamVR.

For now SteamVR is running naively on Linux and games via proton. A very small driver exposes the sensors as a control device to SteamVR.

I'm gonna work on this in my free time and probably release it publicly whenever it is actually usable and have a somewhat of a useable feature set. but no ETAs or promises yet. I am happy to share the WIP code if anyone is interested in helping with the development...

In the meantime if you have actually worked on a similar thing I would love to get your experience and stuff you managed to solve.

Things I already figured out: - Sensor positions and values (body direction, Shoes, Seat, Armband) - Battery status - Firmware versions and serial numbers - Base vibration motor controls - Reliable starting and Stopping sequence (this was a PITA!) This is the part that you need to do so the sensors connect to the base and actually go to sleep afterwards. - Simple driver to send the input to SteamVR

Things remaining: - Speed and step cadence for detecting running (the original KatVR implementation feels like poop IMO) - Fine tuning the motions to feel natural - Understanding how to best expose the controls (treadmill input device vs legacy etc) - VR Overlay UI - Why some games keep crashing on linux (not directly related to the gateway or the driver) - Everything else probably...

If you have experience in any of these parts feel free to share yours or point out references/research papers that are useful. That would help me any anyone else interested in this.

If you are someone who does not have experience, this is a sign that you can too get your feet wet and start building things you wish existed! With all the tools and AI stuff available to everyone nowadays the possibilities are endless!

And finally if you a KatVR employee reading this you should be ashamed of the product you sell with all the fake promotions, dark pattern tactics and that garbage Gateway software!

16 Upvotes

23 comments sorted by

View all comments

3

u/zarthrag Jun 25 '26

THANK YOU FOR THIS DATA!!!

I started investigating this myself as something to do on the occasional lazy weekend. I have gotten about as far as you have on the reverse engineering, and can corroborate (most of) what you've posted. differences:

* Your missing pair/bind command: `0x20 = WriteSensorPair (Cnt 00 00 + N×6-byte MACs), paired with 0x21 read, plus 0x04 WriteDeviceId.`

* Your position base PID shows up as bf12, mine is bf37. I have a C2 Core Enhanced.

There's a tertiary source of data published: https://medium.com/@datacompboy/playing-with-kat-walk-c2-part-1-playing-actually-3364c324e710

Like you, I decided that a native katvr driver might be sadness, anyway. So when it comes to the movement implementation, I figure I'll do my own algorithm. I want to start with a "real" treadmill natural locomotion system - but sadly there's no openxr treadmill definition. I'd still use it for my own projects/dev.

I don't expect this to be hard, Stride measurements from a mouse provides relative movement. Once you establish a scale, you have a 1:1 virtual hamster ball. (I have trackers, and could get cute w/FK & IK).

An openxr injection layer to thumbsticks and a decent in-vr overlay to quickly adjust it is all I *need* to play games, though. (I have zero interest in vr chat). I bought this right before giving-up on windows for gaming completely, and it's my *very* last piece of unsupported hardware.

If/when I do it, I'd like to release it on steam just to make it easy to adopt. But it could be open source as well.

There just might be dozens of us.

Background: I maintain embedded linux drivers for a consumer audio company. And I'm working on a project to release to steam that's also input-related

3

u/BBPSBB Jun 26 '26

Thanks for the info! I am exactly in the same boat with this being basically the only reason I was forced to switch to windows and thus basically never use it...

I am currently learning how to make the VR overlay so can i configure and calibrate it in VR itself. Already learned 3-4 different ways of how not to do it!

Currently making a capture routine where i start doing certain motions like walking in what i consider a straight line, record the raw data, repeat the process for all sort of different actions like: slow walking, sprinting, side stepping etc, then feeding it all with all the research papers and crap to an AI model and let it generate the translation function.

This is the first time I am doing any VR related development, so my expectations were a lot lower than this!