Yaw VR Emulator#
The Yaw VR Emulator is a software tool designed to simulate the functionality of a Yaw VR motion simulator, allowing developers and enthusiasts to test and develop VR applications without needing expensive hardware.
Features#
- Local Network Discovery: The emulator is discoverable on the local network, just like the real device.
- Game Connectivity: Games can connect to it for testing purposes.
- TCP/UDP Commands: Supports various TCP and UDP commands for communication with games.
- Motion Simulation: Simulates motion based on received commands.
- Tilt and Yaw Limits: Allows setting tilt and yaw limits for the emulator.
Installation and Setup#
- Download and install the Yaw VR Emulator for Windows or Yaw VR Emulator for Android.
- Launch the emulator and ensure it is running on the same network as your game or testing environment.
- Configure your game or application to connect to the emulator using the provided TCP and UDP commands.
Usage#
If you experience issues with communication between the emulator and your game:
- Verify that your network/router allows sending TCP and UDP messages to the chosen ports.
- Adjust your firewall settings accordingly.
After starting the emulator, you can find its current TCP and UDP ports and IP address in the lower-left corner of the screen. The default configuration is as follows:
- TCP Port: 50020
- UDP Port: 50010
You can modify port numbers by changing the value of their fields.
How to Control the Emulator#
Direct Command Control (Authenticated)#
- 
Device Discovery: - You can discover emulators on your local network by sending a DEVICE_DISCOVERYUDP broadcast message to IP address255.255.255.255and the emulator's UDP port.
- The available emulators will respond with a DEVICE_DISCOVERY_RESPONSEcommand, providing their ID, name, TCP port, and status.
 
- You can discover emulators on your local network by sending a 
- 
Direct Targeting: - You can directly connect to your emulator without going through the discovery phase if you already know its IP address and port.
 
- 
Connecting via TCP: - Connect to the emulator's TCP server using a TCP client.
 
- 
Reserve the Emulator: - Send a CHECK_INcommand over TCP to reserve the emulator for your gaming session.
- A CHECK_IN_ANSresponse will be sent back as confirmation.
 
- Send a 
- 
Start Rotation Tracking: - Send a STARTcommand to inform the emulator that it should start following rotation values sent via UDP messages.
- The emulator will respond with the same STARTcommand as confirmation.
 
- Send a 
- 
Set Rotation Values: - Use SET_POSITIONcommands over UDP to send rotation values (euler angles) to the emulator.
- The emulator's 3D simulator model will rotate according to these values, and it will respond with its current positions via ACTUAL_POSITIONcommands.
 
- Use 
- 
Stop Rotation Tracking: - Send a STOPcommand to stop following rotation commands until the nextSTARTcommand is issued.
- The emulator will respond with the same STOPcommand as confirmation.
 
- Send a 
- 
Release Emulator for Others: - Send an EXITcommand to make the emulator available for other games.
- The emulator will respond with the same EXITcommand as confirmation.
 
- Send an 
Using SimTools#
- 
Enable SimTools in the Emulator: - In the bottom-left corner of the emulator window, check the "Using SimTools" checkbox.
 
- 
Set Output Bit Range: - Enter the output bit range that you have configured in the Interface Settings of SimTools.
 
Sending TCP Commands#
To send TCP commands, the game must connect to the emulator's TCP server. Each TCP command begins with a one-byte identifier, followed by bytes representing command parameters if any are required.
- 
Data Types: - Floating-point and integer number parameters are sent using 4 bytes.
- String parameters are converted into a byte array using ASCII character encoding.
- Number types must be sent in big-endian byte order. The YawVR Unity game package and the emulator handle the conversion to little-endian format on little-endian systems.
 
- 
Default Response: - If the emulator accepts a TCP command, it typically sends back the same message unless there is additional information required.
 
TCP Commands Sent Only from the Game to the Emulator#
- CHECK_IN- Command ID: 0x30 (1 byte)
- Parameters:- int UDPListeningPort(4 bytes)
- string gameName
 
- Behavior:- If available, the emulator accepts the connection and reserves it for the game.
 
- Response:- Sends back a CHECK_IN_ANScommand.
 
- Sends back a 
 
TCP Commands Between the Emulator and the Game (Both Directions)#
- 
START - Command ID: 0xA1 (1 byte)
- Behavior:- After receiving this command, the emulator starts following rotation orders from the game.
 
- Response:- The same STARTcommand is sent back as confirmation.
 
- The same 
 
- 
STOP - Command ID: 0xA2 (1 byte)
- Behavior:- Stops accepting rotation orders from the game.
 
- Response:- The same STOPcommand is sent back as confirmation.
 
- The same 
 
- 
EXIT - Command ID: 0xA3 (1 byte)
- Behavior:- Disconnects from the game and becomes available for other uses.
 
- Response:- The same EXITcommand is sent back as confirmation.
 
- The same 
 
- 
SET_TILT_LIMITS - Command ID: 0x40 (1 byte)
- Parameters:- int pitchForwardLimit(4 bytes)
- int pitchBackwardLimit(4 bytes)
- int rollLimit(4 bytes)
 
- Behavior:- Sets the tilt limits for the emulator.
 
- Response:- The same command with accepted values is sent back as confirmation.
 
 
- 
SET_YAW_LIMIT 
- Command ID: 0x70 (1 byte)
- Parameters:- int yawLimit(4 bytes)
 
- Behavior:- Sets the yaw limit for the emulator.
 
- Response:- The same command with accepted value is sent back as confirmation.
 
TCP Commands Sent Only by Emulator to Game#
- 
CHECK_IN_ANS - Command ID: 0x31 (1 byte)
- Parameters:- string answer
 
- Behavior:- Indicates the availability status.
- If available, the response is "AVAILABLE".
- If reserved by another game, the response includes details like the game name and IP address using the simulator.
 
 
- 
ERROR - Command ID: 0xA5 (1 byte)
- Parameters:- string description
 
- Behavior:- Provides an error message detailing the issue encountered.
 
 
Sending UDP Commands#
UDP commands are ASCII-encoded strings.
UDP Messages Sent from the Game to the Emulator#
- 
DEVICE_DISCOVERY - Message: "YAW_CALLING"
- Usage: Broadcast message. When an emulator receives this command, it sends a DEVICE_DISCOVERY_RESPONSEback to the sender.
 
- 
SET_POSITION - Format:- Yaw, pitch, and roll Euler angles in the format:
 "Y[000.00]P[359.99]R[342.54]"
 
- Yaw, pitch, and roll Euler angles in the format:
- Constraints:- Values range from 000.00 to 359.99.
- Use 000.00 instead of 360.00.
 
- Response: None
 
- Format:
UDP Messages Sent from the Emulator to the Game#
- 
DEVICE_DISCOVERY_RESPONSE - Format:- If available:
 "YAWDEVICE;” + /Simulator ID/ + ”;” + /Simulator name/ + ”;" + /TCP server port/ + ";AVAILABLE"
- If reserved:
 "YAWDEVICE;” + /Simulator ID/ + ”;” + /Simulator name/ + ”;" + /TCP server port/ + ";RESERVED"
 
- If available:
 
- Format:
- 
ACTUAL_POSITION - Format:- Yaw, pitch, and roll Euler angles in the format:
 "Y[000.00]P[359.99]R[342.54]"
 
- Yaw, pitch, and roll Euler angles in the format:
- Constraints:- Values range from 000.00 to 359.99.
- Use 000.00 instead of 360.00.
 
 
- Format:
Troubleshooting#
- Ensure the emulator and game are running on the same network.
- Verify that the TCP and UDP ports are not blocked by firewalls or other security software.
- Check the emulator's log files for error messages or debugging information.