New version of the vr920 headtracking driver coming soon

Last year I published the first version of my linux headtracking driver for the VR920 HMD here. Currently I am working on a new driver version which will have the following additional features:

  • Multiple Protocols:
    -UDP multicast (as before)
    -UDP unicast (for flightgear connection and perhaps more)
    -mouse emulation (via uinput)
    -joystick emulation (via uinput)
    -character device for direct angle readings (via cuse, will
    require a kernel >= 2.6.31)
  • Inverting of axes (to have moving the head up making the mouse pointer up or down, depending on needs)
  • Better filtering algorithm (more stable headtracking)
  • Scaling of data (i.e. to match screen size with mouse mode)
  • Customisable delay between sensor readings
  • User interface separated from the driver

With the upcoming MPX and the mouse emulation it should be possible to control the visible viewport by turning around the head. Controlling the view for games or other software that do not natively support headtracking should also be possible with the emulation.

In the current development stage most of the features are basically working so expect the new driver to be released soon.

Stay tuned for updates


1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Java encoding

For one of our projects I had to write a simple program, for importing items into our online store ( When I finished the coding everything seemed to run smooth, but only on Windows. Afterwards I tested the program on my linux box and it did not work.

After checking all files I found out that the encoding of the files was wrong for importing into our shop. With the help of google and some other sites the problem was solved. I had to use ISO-8859-1 for all files, because the core data is 8859.

To read a file I use the following code now:

BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream(),”ISO-8859-1″));

and to write:

Writer bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fileName), “ISO-8859-1”));

I hope this will help someone who has a similar problem.



1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

osgocean ebuild for gentoo

I just recognized the osgocean release on the osg mailing-list. Osgocean is a library that one can use to render water effects in a very realistic way. It was used to generate the above and below water effects in the VENUS project. For more information on the osgocean project see: osgocean You can see how realistic it looks if you watch the youtube video below.

It looked very interesting, so I decided to try it out. To do so I wrote two ebuilds, one for osgocean and one for  fftss, the fast fourier transformation library it depends on. Both are available in following archive: [download#21]

Extract the archive to your portage overlay.

# mkdir /usr/local/portage/
# cd /usr/local/portage/
# unzip

Be sure that PORTDIR_OVERLAY=”/usr/local/portage” is included in your /etc/make.conf, then you can emerge it:

#emerge osgocean

For this you need to have the OpenSceneGraph library installed. Detailed Instructions on how to build OpenSceneGraph on gentoo can be found on PlopByte.

Since openscenegraph is now in the main portage tree I have updated the ebuild dependencies today (31/08/2009) to either media-gfx/openscenegraph or dev-games/openscenegraph.

Updated ebuild is now available here: [download#42] Just copy it to /usr/local/portage/media-gfx/osgocean/ after like described before and run:

ebuild /usr/local/portage/media-gfx/osgocean/osgocean-1.0.1.ebuild digest

Best regards


1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

VR920 headtracking driver for Linux

As I promised in VR920 Headtracking driver development here comes a usable version of my headtracking driver for the Vuzix VR920 iwear for Linux. Again I want to thank MalMal of Vuzix Forums, from whose code I was able to learn how to read the Sensor data out of the device via USB. For general Information on how to use the device with Linux see:  Vuzix VR920 with Linux and active 3D stereo.

I managed to calculate yaw, pitch and roll from the accelerometer and magnetometer data (The device has got three of each). This makes a 3DOF tracking possible and would allow you to look around in a 3D Scene.

The driver sends the tracking data via network as UDP multicast, thus many clients may read the data, which makes parallelization more possible, i.e. one could use one machine for rendering and another machine for calculations. In addition to this, the approach to send the data out via network makes the language used for writing the application independant from the language used for developing the driver.

The tracking data sent to the clients contains the three angles, yaw, pitch and roll and for easy usage a viewmatrix, one can directly use with scenegraph libraries. If you intend to develop an application using the headtracking of the VR920 see the file democlient.cpp included in the download for details on how to get the data into your application.
Below is a screenshot of the driver during calibration:
vr920 driver screenshot
vr920 driver during calibration ( screenshot)


./vr920 -h vr920 [-h] [-?] [-m multicast ip] [-p multicast port] [-c calibrationfile]

On the commandline you may specify a multicast address and a port to send the data to. If you choose not to define these values the driver will send the tracking data to a sane default ( In any case, the client using the tracking data has to join the same address with the same port. You may decide not to use real network, if you only want to use the data on the same machine. In this case you may use loopback networking.

Add the route for the multicast address to the loopback interface:  route add -host lo

Delete the route:  route del -host lo

After executing the driver it instantly starts to send the trackingdata. Initially it starts in “silent” mode. You may activate/deactivate the monitor mode by pressing the M key. In monitor mode the driver displays the angles for yaw, pitch and roll. By pressing the C key you can activate/deactivate the calibration mode.

In calibration mode the driver displays  the most amount of information, the angles for yaw, pitch and roll above the normalized sensor data. Below the minima/maxima of the sensors are being displayed.The calibration works similar to the windows driver, one has to turn around the HMD (with the side-pieces open) until no minima/maxima changes anymore. Afterwards turn the device forward (the direction where you want to have the center of your view) and press the Z key to set the zero direction. Once you have completed calibration press S to store the calibration for future use. Finally press the C key again to exit calibration mode.

As default the calibration is being saved to the file .vr920 in the users home. You may specify a different filename using the -c option. If you do so this file will also be in the users home. To use i.e. a global calibration file you have to specify the full path  starting with a slash.

Important note: During calibration make sure that the display of the device is displaying something. Since the displays not only showing a blue screen influences the sensor data (at least with my device) you’ll end with wrong calibration else. You may use i.e. nvidia-settings to ensure this.


I decided to publish the driver under the creative common noncommercial license. You may download the full source from here: [download#7], an x86_64 binary from here: [download#8] , or an i686 binary from here: [download#15]. More binary formats may be available in the future. You need to have libusb, libconfig++ and libcurses installed on your system. Libconfig++ is being used to store the calibration data and libcurses for the user interface. The x86_64 binary has been build on an up to date gentoo system, the i686 binary on ubuntu hardy. For the i686 binary you will need to install libconfig++ i.e. libconfig++6_1.3.1-1 from here: libconfig++ If none of the binaries works for you, you may have to build from source…

New version available here.

Building from source:

For building from source unpack the zip and cd to vr920 and run make. If you use a binary based distribution, make sure you have the devel version of the needed libraries installed on your system.

Future Plans:

In the future I plan to extend the jps viewer I published in SIV – a stereoscopic jps viewer for Linux to use the tracking data from the driver, so one can look around the scene by turning his head.

Update: New version of SIV with headtracking support is available at: SIV-1.0 released


If you like the driver, feel free to link to If you developed an application using the tracking data provided by the driver please leave a comment, because then I can review the application and eventually write about it. To request commercial licenses contact us at info(at) Well, if you just want to support our work on use the donate button 😉

best regards


1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)