micolous.id.au

The result of a blogging accident

Vuzix Wrap 920 VGA on Linux

The Vuzix Wrap 920 are entry-level VR glasses. (Not to be confused with the 920VR, which has a USB interface that operates differently.)

There is a VGA adapter available for them, however I notice that the buttons on the controller and menus do not operate properly on Linux – after the first button press, the menu stops responding. This makes it impossible to select 3D mode or adjust any settings.

The controller works fine on Mac OSX and Windows in my tests, which left me scratching my head. It also works fine when you plug the VGA of a Linux box into it, and USB into another computer. I’ve also tried it with several other configurations, where I had a powered hub not connected to upstream USB, and plugging it into an iPhone USB wall charger, and still wouldn’t work.

Turns out, the controller presents in addition to a USB interface (1BAE:014B) for an internal sound card, a HID interface for the (optional) head tracking module. Linux doesn’t know how to handle it, so it presents it as a “hidraw” interface (typically /dev/hidraw0). You just need to read from the device, and suddenly it starts working! You can’t just ignore the device entirely (with a usbhid quirk or unloading the module), you must read from it otherwise events are blocked. This is probably due to a bug in the VGA adapter firmware, but was never found because Linux isn’t a supported platform.

This is simple to deal with. As root, run: dd if=/dev/hidraw0 of=/dev/null.

All the events will be read from the device, and simply discarded. If you watch it with hexdump, there’s some events that come up whenever you press a button on the controller. In the end, they don’t matter. I haven’t looked much in to it yet, but there’s probably a way that you could parse them, and possibly even reconfigure the device from software. This is needed regardless of whether you have the optional head-tracking sensors installed – I don’t have them.

I think that Mac OSX and Windows both do this in-kernel when it doesn’t know how to handle events, it’s probably just a quirk in how Linux handles these devices.