I am new at networking so i have a lot of questions also i have a dream about making an open-source and more affordable VR headset and software using rasberry pi so nowadays i am curious about how does popular systems like SteamVR and HTC Vive work . I couldn't really find any documentation online so i decided to ask it here. My question is shortly how does a vr headset send data (tracking , button clicks etc.) to SteamVR and how does games communucate SteamVR and get this data?
I am not an expert so if you will describe it with python terms it will be way more easier for me to understand.
Generally there's not really TCP style networking going on. There's some low level embedded computation going on to determine where controllers and the headset are. Those results along with button presses and trigger pulls are sent through a low level API through OpenVR where XR toolkits abstract all those inputs and allow developers to build applications.
These toolkits include MRTK: https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/GettingStartedWithTheMRTK.html
If you want to dive into how the OpenVR API works then you're free to dig into the SteamVR plugin: https://github.com/ValveSoftware/openvr
OpenVR is counter intuitively not open source so you can't see how they're actually getting and processing the raw inputs.
OpenXR however is open source and is a open standard by Khronos so you can look into how inputs are handled: https://github.com/KhronosGroup/OpenXR-SDK