Skip to content

Report Sensor Data

Agustín Gimenez Bernad edited this page Nov 22, 2016 · 3 revisions

The information from the Accelerometers/Gyroscopes is sent as HID data and is streamed over USB Interface 4. It also contains some other information such as current volume, button presses (on Vol+, Vol- and Mute), display status, etc.

INTERFACE 4: Human Interface Device ====================
 bLength            :    0x9 (9 bytes)
 bDescriptorType    :    0x4 Interface
 bInterfaceNumber   :    0x4
 bAlternateSetting  :    0x0
 bNumEndpoints      :    0x1
 bInterfaceClass    :    0x3 Human Interface Device
 bInterfaceSubClass :    0x0
 bInterfaceProtocol :    0x0
 iInterface         :    0x7 PS VR Sensor
  ENDPOINT 0x83: Interrupt IN ==========================
   bLength          :    0x7 (7 bytes)
   bDescriptorType  :    0x5 Endpoint
   bEndpointAddress :   0x83 IN
   bmAttributes     :    0x3 Interrupt
   wMaxPacketSize   :   0x40 (64 bytes)
   bInterval        :    0x3

##Six axis sensor model BMI055

  • Accelerometer configured at ± 2g 1024 LSB/g
  • Gyroscope configured at 131.2f ± 250°/s: 131.2 LSB/°/s (need confirmation)
  • Accelerometer data is raw data from the sensor, it must be displaced 4 bits to the right preserving sign

##These are the sensor report fields:

  • 00: byte, Button status mask, b0 = unknown, b1 = volume down, b2 = volume up, b3 = mute

  • 01: byte, Unknown

  • 02: byte, Volume, 0 to 50

  • 08: byte, Status mask

  •   b0 = Worn 
    
  •   b1 = Display on
    
  •   b2 = Unknown
    
  •   b3 = Mute
    
  •   b4 = Earphone
    
  •   b5 = Unknown
    
  •   b6 = Unknown
    
  •   b7 = appears to alternate every second
    
  • 15: byte, unknown, Mode (bit 7 -> 0x00=Cine, 0x40=VR)

---First sensor group---

  • 16: integer, Timestamp1 (in micro-seconds, rolls back at 0x00FFFFFF)
  • 19: byte, padding (0x00 seen)

-Gyroscope 1

  • 20: short, Yaw (signed, +ve turn left, -ve turn right)
  • 22: short, Pitch (signed, +ve look up, -ve look down)
  • 24: short, Roll (signed, +ve clockwise, -ve anticlock)

-Accelerometer 1

  • 26: short, X axis //It's the X value of the sensor, but it's mounted rotated on the headset
  • 28: short, Y axis //Corrected
  • 30: short, Z axis

---Second sensor group---

  • 32: integer, Timestamp2 (in micro-seconds, rolls back at 0x00FFFFFF)
  • 35: byte, padding (0x00 seen)

-Gyroscope 2

  • 36: short, Yaw (signed, +ve turn left, -ve turn right)
  • 38: short, Pitch (signed, +ve look up, -ve look down)
  • 40: short, Roll (signed, +ve clockwise, -ve anticlock)

-Accelerometer 2

  • 42: short, X axis //Corrected
  • 44: short, Y axis //Corrected
  • 46: short, Z axis //Corrected
  • 47: byte, Unknown

--General data--

  • 48: byte, Calibration status? 255 = boot, 0-3 calibrating? 4 = calibrated, maybe a bit mask with sensor status? (0 bad, 1 good)?
  • 49: byte, Sensors ready
  • 50: byte?, Unknown
  • 51: byte?, Unknown
  • 52: byte?, Unknown
  • 53: byte, Voltage reference? starts in 0 and suddenly jumps to 3
  • 54: byte, Voltage value? starts on 0, ranges very fast to 255, when switched from VR to Cinematic and back varies between 255 and 254 and sometimes oscillates between them
  • 55: short, Infrared headset sensor, 0 to 1023, used to measure distance between the face/head and visor
  • 57: byte?, Unknown
  • 58: byte?, Unknown
  • 59: byte?, Unknown
  • 60: byte?, Unknown
  • 61: short, Sampling Period (micro-seconds)
  • 63: byte, Packet sequence