Code: Select all
01 f8 ff 14 00 55 00 02 00 00 15 00 00 00 01 00
00 b0 ff 04 00 02 a5 ff 00 00 00 00 01 00 00 00
00 4b 00 02 65 00 fe ff 00 00 01 00 00 bd ff 00
00 02 d7 ff 08 00 00 00 01 00 00 1e 00 cd ff 02
37 00 00 00 00 00 01 00 00 f1 ff 00 00 02 b8 ff
00 00 00 00 01 00 00 2b 00 14 00 02 26 00 00 00
00 00 01 00 00 f5 ff 00 00 02 d1 ff 00 00 00 00
01 00 00 19 00 f5 ff 02 2b 00 00 00 00 00 01 00
00 eb ff 00 00 02 d9 ff 00 00 00 00 01 00 00 04
00 00 00 02 23 00 00 00 00 00 01 00 00 fe ff 00
00 02 f3 ff 00 00 00 00 01 00 00 00 00 00 00 02
09 00 00 00 00 00 01 00 00 00 00 00 00 02 ef ff
00 00 00 00 01 00 00 03 00 00 00 02 08 00 00 00
00 00 01 00 00 00 00 00 00 02 f5 ff 00 00 00 00
01 00 00 00 00 00 00 02 07 00 00 00 00 00 01 00
00 00 00 00 00 02 f7 ff 00 00 00 00 01 00 00 00
00 00 00 02 07 00 00 00 00 00 01 00 00 00 00 00
00 02 f8 ff 00 00 00 00 01 00 00 00 00 00 00 02
05 00 00 00 00 00 01 00 00 00 00 00 00 02 fc ff
00 00 00 00 01 00 00 00 00 00 00 02 00 00 00 00
00 00 01 00 00 00 00 00 00 02 00 00 00 00 00 00
01 00 00 00 00 00 00 02 00 00 00 00 00 00 01 00
00 00 00 00 00 02 00 00 00 00 00 00 01 00 00 00
00 00 00 02 00 00 00 00 00 00 01 00 00 00 00 00
00 02 00 00 00 00 00 00
Backstory: I'm playing around with JavaFX 3D, and I want to make use of this SpaceNavigator that has been gathering dust for a year or so. I'm on Fedora 24. I've tried every Java library I can, and they all fail, and none seem to have legible source code (that I have stumbled across) that parses the binary protocol. Most recently I have attempted to read the C (++?) code in svn://svn.code.sf.net/p/spacenav/code but have not found this to be enlightening, perhaps because I'm not proficient with C. I'm avoiding JNI in my own solution because headaches. I can simply pipe /dev/hidraw2 into my JVM and read it with an InputStream, and that's good enough for this hobby-level project. Who knows; the project could evolve eventually, but I'm not getting ahead of myself.