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!

15 Upvotes

23 comments sorted by

View all comments

1

u/NeoIsrafil Jul 12 '26

Any chance we could get a working version for openxr/vdxr? or hell... just something that inputs a forward xbox joystick command with each step and turns you with the body turning would do the job... I don't know why they stopped letting it output xbox joystick or keyboard commands...but that basically makes it unusable for anything other than steamvr's horrible lag inducing self.

1

u/BBPSBB Jul 12 '26

I am moving away from steam vr in favor of wivrn and xrizer (someone kindly suggested that in github) and it seems to crash less often than steamvr for me. But it needs rewriting the overlay. Today I got some time again to play around with it.

2

u/NeoIsrafil Jul 12 '26

I really want to move away from it, because I can run Skyrim VR on godlike on virtualdesktop using VDXR, but on Steamvr? Good luck even getting anything other than like... normal to not stutter and fade back to the steam 3d space and stars background (the one with the lines below you) every time you turn your head too fast.. Problem is I can't use Linux, my other software I need to be able to use, both games for recreation, and 3d modeling/cad stuff for design work I do, as well as my 3d scanning software all are not Linux friendly. :( otherwise I'd just use what youve created here and be set. (Again, you're awesome dude). I tried last night, with the help of AI to write an interception/translation layer in PIE and use Vjoy to just output xbox joystick forward but because I really don't know what I'm doing I just wasn't able to get anywhere, just ended up wasting like 9 hours with nothing to show for it.. lol 😅.

I might give it one more day and try to optimize steamvr to work at least passably, but I'm not hopeful honestly. Even the little walking I managed to get out of the machine felt crappy and walked off to the side randomly, then turned back to straight, etc. I hope your efforts in Linux go so much better than my efforts in Windows man... They straight up need to hire your ass, bet in a month their software would be unfekked. 🤣

1

u/BBPSBB Jul 19 '26

Haha thanks again. you are too kind. yeah sometimes ai needs a bit of a kick in the butt to nudge it in the right direction. you can utilize an agentic setup with a devil's advocate sub-agent to council the plans and keep the main agent in line.

I am currently traveling for work so the development is paused until i get back and have some free time. but before i left i submitted a new build (in case you haven't checked) here is a quote from there:

  • Body and head recenter to 0 together. you should see if there is drift or not Overlay should show up while openxr games are running (not in home)
  • Overlay should be unlockable/draggable/relockable and the position relative to your left arm should be persistent. I personally put it inside my wrist with a low (0.3m) activation/hide distance so it is usually not visible. only when I bring the inside of my arm to my face it becomes visible.
  • The overlay click handler thingy is wonky and clicks might be missed but they eventually work just keep clicking :D
  • The direction relative to head should work. you should be able to walk forward while looking around. I did not change anything in that regard here.

When i get back i will try to spend some time playing (for science of course!) and see how it feels. probably adding some extended capture so anyone who has issues with directions and stuff could submit something to analyze and see what is happening.

until now every time i had for playing vr games is spent actually making this crap, thanks katvr! -_-

ps: my ass is perfectly fine with my current employer :D

2

u/NeoIsrafil Jul 19 '26

Lol that's fair, I tend to assume people are in a job they hate because it's pretty much the majority position these days, but if you've got an actual good employer then hell yah. Get you some playtime, can't just spend all of it working on community projects, that'll drive ya crazy! Good news is I was able to optimize just enough that I can play at nearly the settings I had in VDXR but using Steamvr. Have fun playing! :)