Razer Hydra HID Protocol Investigation
Understand how the Razer Hydra communicates over USB HID to allow drivers/applications to interact with it on any platform, including those not supported by the Sixense SDK. One particular concrete goal is the creation of a tracker driver for VRPN to make use of the Hydra.
Gain this knowledge only by interacting with the device and recording data, not through disassembly of Sixense code. A proprietary, Windows-only SDK is available through Steam but we will not be using that in this project, so that we can create "clean" information.
The Razer Hydra is a 6DoF wired magnetic tracker with two sensors, each with gamepad-type controls, designed for use with computer games. The motion sensing technology was developed by Sixense (forum), and was formerly referred to as Sixense TrueMotion.
Known so far
- Vendor ID: 0x1532 hex aka 5426 decimal
Product ID: 0x0300 hex aka 768 decimal
Appears as a composite USB device with two interfaces:
- Interface 0 appears as a generic USB HID device - this is the one with the motion data.
- Interface 1 appears as a standard HID gamepad, allowing access to the buttons.
Seems to have two "modes" - gamepad mode and motion control mode. They are set by the Hydra Configurator on Windows, and enables/disabled the "gamepad" device.
- When in gamepad mode, smaller input reports are sent. (12 bytes?)
- When in motion mode, input reports of 52 bytes are sent.
- Seems to default to gamepad mode when plugged into a machine without the Hydra software.
- There are some 90-byte feature reports being exchanged (set/get) that are not yet understood.
Connecting the Hydra to a Windows virtual machine running the Hydra software, then disconnecting it from the VM (leaving it connected to the Linux host) leaves it in the "52-byte report" mode.
- Start of work on VRPN driver
- Thread on VRPN mailing list about investigating the Hydra
Tools and Resources
Wireshark: Open-source capture tool, usually for networks, but can also capture USB traffic on Linux. By running Windows in a virtual machine on Linux, it can capture Windows USB traffic as well: http://wiki.wireshark.org/CaptureSetup/USB
"ETW in the Windows 7 USB core stack" article - a blog post on how to use built-in tools on Windows 7 to perform USB logging - not sure how useful this is yet. More information here: http://msdn.microsoft.com/en-us/windows/hardware/gg463163
Updated version of SnoopyPro (Open-source USB snooping tool for Windows) - not perfect, but sometimes works
USBlyzer - proprietary and commercial product, with a 33-day fully-functional free trial and offering a 40% academic discount upon request. Works much easier than SnoopyPro.
VRPN - Accesses HID on Windows, Mac, Linux using hidapi - modifying the app
server_src/vrpn_HID_device_watcheris a good way to test decoding input reports.
This GitHub project, with its canonical homepage at https://github.com/rpavlik/razer-hydra-hid-protocol , is intended to collect materials to study and the findings that result from them. You are welcome and encouraged to fork this repository, add your findings, and send pull requests.
Investigation started by: