Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Toolbox network commands and command line parameters

gusmanb edited this page Nov 8, 2016 · 3 revisions

Description

In order to allow other apps to interact with the device without accessing the USB port, PSRVToolbox implements two ways of accessing these.

First way is through UDP messages. The toolbox will listen for broadcast packets on port 14598. These packets must contain Json messages with the commands to execute.

Second way is through command line. If an instance of the toolbox is running and the correct parameters are specified on the command line it will contact the running one and apply the settings.

UDP Messages

UDP messages are json formatted objects. Each object must contain at least the Command parameter. There are (for now) three Json objects: RemoteCommand, CinematicSettingsCommand and LEDSettingsCommand.

RemoteCommand is used for commands without any parameter and they contain only one property named Command. CinematicSettingsCommand is used to apply cinematic settings, it contains four properties: Command, Brightness, Size and Distance. LEDSettingsCommand is used to configure the HDM led intensity, it contains ten properties: Command and LedA through LedI.

Any parameter except Command can be null or undefined, any parameter null or undefined will be ignored and not updated.

Command line parameters

Command line parameters use the same parameter values as the UDP commands, the first parameter passed is the Command property and is just the command name, subsequent parameters must be in the form "PropertyName=Value", per example if you want to set the cinematic mode brightness you will execute "PSVRToolbox.exe CinematicSettings Brightness=10".

Commands

These are the exposed commands:

HeadsetOn:

  • UDP format: { "Command":"HeadsetOn" }
  • Command line: HeadsetOn

Powers on the headset

HeadsetOff:

  • UDP format: { "Command":"HeadsetOff" }
  • Command line: HeadsetOff

Powers off the headset.

EnableVRTracking:

  • UDP format: { "Command":"EnableVRTracking" }
  • Command line: EnableVRTracking

Enables the VR mode and powers on the HMD leds for head tracking.

EnableVRMode:

  • UDP format: { "Command":"EnableVRMode" }
  • Command line: EnableVRMode

Enables the VR mode without powering on the HMD leds.

EnableCinematicMode:

  • UDP format: { "Command":"EnableCinematicMode" }
  • Command line: EnableCinematicMode

Enables the cinematic mode.

Recenter:

  • UDP format: { "Command":"Recenter" }
  • Command line: Recenter

Recenters the virtual screen on cinematic mode.

Shutdown:

  • UDP format: { "Command":"Shutdown" }
  • Command line: Shutdown

Shuts down the PS VR box (to power it on again the user must press the power button on the HMD cable).

CinematicSettings:

  • UDP format: { "Command":"CinematicSettings", "Brightness":(value), "Size":(size), "Distance":(distance) }
  • Command line: CinematicSettings Brightness=(value) Size=(value) Distance=(value)

Changes the cinematic settings. Brightness values range from 0 (darker) to 32 (brighter). Size values range from 0 (small) to 54 (giant). Distance values range from 0 (near) to 48 (far). Parameter order doesn't matter, any non specified parameter is ignored.

These settings are trainsient.

LedSettings:

  • UDP format: { "Command":"LedSettings", "LedA":(value), "LedB":(value), ... , "LedI":(value) }
  • Command line: CinematicSettings LedA=(value) LedB=(value) ... LedI=(value)

Changes bright intensity of the specified leds. Leds go from LedA to LedI, no need to specify all the leds only specified ones will change, order doesn't matter. Accepted values range from 0 (off) to 100 (max intensity).

These settings are trainsient.

StoreSettings:

  • UDP format: { "Command":"StoreSettings" }
  • Command line: StoreSettings

Makes all transient settings permanent.

DiscardSettings:

  • UDP format: { "Command":"DiscardSettings" }
  • Command line: DiscardSettings

Discars all transient settings and applies the stored ones.