simon wrote:I hacked together a proof of concept tool to read out the values, you can download the source at
http://www.home.unix-ag.org/simon/files/spacenavi.c .
I have not yet been able to light up the LED of the device and I am also unsure if maybe some configuration stuff is stored in the navigator. I'd appreciate any hints there...
Hi Simon,
thanks for the great start!
I expanded your hack a little but am currently unable to post the modified source like you did.
Here's how you can controll the blue LED:
open the device O_RDWR, since you not only want to read values from the device but you also have to _write_ to the device for LED control.
Then, use an
event.type = EV_LED //obviously
event.code = 10; // took a few tries to find out
event.value = [0|1]; // 1 turns LED on, 0 turns LED off.
Values are stored persistently inside device. I.e, blue LED may stay lit if you terminate your sample Program via <Ctrl>+<C>.
That's all.
You might want to modify your usage instructions as to how the "path_to_device" needs to be specified. I have found /dev/input/event2 to work. However, I'm unsure if this may change as you plug/unplug other USB devices.
I used the last lines of > dmesg output to find out:
...
usb 2-3: new low speed USB device using address 6
drivers/usb/input/hid-core.c: ctrl urb status -32 received
drivers/usb/input/hid-core.c: ctrl urb status -32 received
drivers/usb/input/hid-core.c: ctrl urb status -32 received
input: USB HID v1.10 Multi-Axis Controller [3Dconnexion SpaceNavigator] on usb-0000:00:02.1-3
Have a great christmas!
regards,
Chris