Repository navigation
Networking
This page describes the technical implementation details of the communication between the controllers, the service and the SteamVR driver.
The controllers must discover the server to push their metadata to. This is solved using a UDP broadcast. The controller broadcasts the (randomly chosen) 4-byte discovery sequence 0x79 0x65 0x65 0x74 to all devices on the subnet on port 12743. The server listens for theses sequences and if one is received, returns its local IP address as a NUL-terminated ASCII string to the controller. The controller then starts streaming motion and button data via UDP to the server on port 12742.
The protocol that is used between the TwometerVR Service (TVR.Service) and the individual hand controllers. This synchronizes button presses and gyroscope data with the PC.
[byte controllerId][byte buttonPressCount][byte[] buttonPresses][float yaw][float pitch][float roll]
Once calibration is completed, the controller sends a message containing 0xFF 0xFF to notify the server that it finished calibration.
The protocol that is used for the communication between the service and the driver. The service regularly pushes updates to the driver, including controller pose data (position & rotation) and button states
[int16 length][byte controllerStateCount][ControllerState[] controllerStates]
[byte ctrlId][float posX][float posY][float posZ][float rotX][float rotY][float rotZ][byte buttonCount][ButtonState[] states]
[byte btnId][bool pressed]
by Twometer, released under GPL license
For makers
For developers
For everyone