NP Firmware Extractor

NP devices (TrackIR and SmartNav) require a firmware that has to be loaded each time the device is started. Also the linuxtrack Wine bridge utilizes some informations contained in the package (the infamous poetry and list of supported games along with their IDs). The firmware is extracted using Wine from the TrackIR windows package downloaded directly from NP.

Firmware extraction

When the Extraction dialog pops up, press the Download button to download the latest driver package. By default the newest packge available is downloaded; if it is not accessible, select any other from the combobox to the left off the button (all packages listed there contain the same firmware, only the game list might differ a bit).

When the package is downloaded/browsed to, a dialog containing short instructions pops up. After pressing OK the package is installed to a temporary wine prefix.

On Linux, usual installation dialog will pop up - just install the whole thing. Newer packages contain some MS runtime and NP USB drivers install, both of them has to be installed in order to install the main package. Don't worry though, none of the installed things is going to last - when the data are extracted, everything is going to be removed.

On Macs, due to wine configuration pecularities, the installation should be performed silently.

When the installer finishes, the extraction begins - you can follow its progress in the status part of the Extractor dialog. When the extraction is finished, the dialog closes by itself.

If you don't have access to the internet, just download any of the listed packages elsewhere and using the Extract from installer button find and open the one you downloaded.

If you encounter any difficulties using the above methods, you can try to install the driver by hand (using wine or install on windows machine and copy over). Then just press the Extract from unpacked, browse to the directory (the whole directory!) containing the NP software (usually ~/.wine/drive_c/Program\ Files/NaturalPoint/TrackIR5) and press Open button for the extraction to begin.

Why so complicated?

Maybe you wander, why is the whole thing that complicated, or why to download ~20MB package instead of around 100KB one?

There are two main reasons that led to this decision: First one is the neglect from the NP's side - more than year ago I asked couple of relatively simple questions, and I didn't received any andwer at all... <> The second one was their attempt to impose artificial limitations on the linuxtrack itself in order to gain permission to use SmartNav 4 firmware; they asked for disabling SmartNav4 functionality on MacOS, so people couldn't use Linuxtrack in mouse emulation programs. Besides being technicaly impossible to do, it would be completely against the Linuxtrack's spirit.

For those reasons (and couple of others) I decided to cut all the bonds (they used to host Linuxtrack firmware package in the past - per their own request) and using wine was the only logical choice. Given the fact, that this step is mostly one time only, I hope the inconvenience level is not very high.

Technical informations

The extracted files are in the following path: ~/.config/linuxtrack/tir_firmware and it contains the following files: The haiku verses are used by most games to verify that there is a TrackIR software on the other side. It was used to prevent other programs from emulating the interface (most notably FreeTrack). The claim was based on the fact, that those strings contain NP's trademark and they are copyrighted. My belief is, that since most games refuse to work without it, it is a part of the interface and therefore not copyrightable in order to provide means of interoperability. Also Fair use should be aplicable in this case.

The gamedata.txt list is extracted from file sgl.dat; the file is encrypted using RC4 stream cipher, using first 5 bytes in MD5 hash of string "NaturalPoint" as a key. The payload is XML, containing data on supported games, of which the only relevant part is a game ID and its name. The linuxtrack wine bridge uses this info to determine game's name when passed its ID.