Why SpacePilot/Navigator is NOT HID compatible joystick!?

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
ono
Posts: 3
Joined: Mon Nov 30, 2009 5:35 am
Location: Krakow, Poland

Why SpacePilot/Navigator is NOT HID compatible joystick!?

Post by ono »

Hello,

There're numerous examples how to use 3Dconnexion devices (not calling them joysticks) on Windows/Linux/Mac, but here goes the substantial question?

Why 3Dconnexion devices are not reporting that they are HID joysticks, having absolute axes with specific ranges and deadzones!? :shock:

Instead of that it reports to be "miscellaneous" HID device having 6 relative axes. (That leads to treat them as mouse by X11 for example)

I am ought to develop multi-platform surveillance application for my client, that has chosen SpacePilot as the input device for this application, and frankly your device is driving me crazy.

I am using SDL which provides joystick support trough native OS HID APIs. And your "joystick" isn't detected by any of them, because:
(1) it DOES not report JOYSTICK flag
(2) it DOES not report its axis to be absolute

So I need to patch SDL one platform by one to make it work with "relative" axes, next I need to find out empirically the ranges and deadzones. I believe those shall be provided by the device itself via HID, and this is done by all joysticks and pads I have except 3Dconnexion.

Maybe someone can enlighten me on what makes SpacePilot so special that it cannot report itself as a joystick to the OS, and let other application or games use it as regular joystick!?
I do have a few conspiracy theories about that, but not want to troll over here :wink:
ngomes
Moderator
Moderator
Posts: 3321
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

Hi ono,
There're numerous examples how to use 3Dconnexion devices (not calling them joysticks)
We call them "3D mice". USB-IF calls this type of a device an "HID multi-axis controller".
Why 3Dconnexion devices are not reporting that they are HID joysticks, having absolute axes with specific ranges and deadzones!?
As above, 3Dconnexion hardware products are "HID multi-axis controllers". This is an USB Implementers Forum standard (refer to the "HID usage tables" doc).
(2) it DOES not report its axis to be absolute
It does not and that's unfortunate. When the first 3D mice with USB were developed, not all platforms (Windows, Mac, Linux) had the same support for the HID standard. The "mis-reporting" of relative/absolute is a legacy of that time.
next I need to find out empirically the ranges and deadzones
Why "empirically"? Range should be reported back as +/500. Dead-zone is zero (device sends no data until value > 0). Can you tell us the device firmware version?
Maybe someone can enlighten me on what makes SpacePilot so special that it cannot report itself as a joystick to the OS, and let other application or games use it as regular joystick!?
I do have a few conspiracy theories about that, but not want to troll over here :wink:
Joysticks are normally two-axes devices. 3D mice are six-axes. At a basic level they are similar devices (motion sensor/actuator, keyboard, display).
Nuno Gomes
Phil999
Posts: 425
Joined: Tue Jun 30, 2009 5:20 am

Post by Phil999 »

I have no knowledge at all about this, but maybe a look at UniversalCosmonaut could shed some light into this. It seems that the developer had no problems with accessing the six axes of 3dx devices with his application.

http://ccrdude.net/2007/06/use-your-spa ... where.html
ono
Posts: 3
Joined: Mon Nov 30, 2009 5:35 am
Location: Krakow, Poland

Post by ono »

ngomes wrote:
Why 3Dconnexion devices are not reporting that they are HID joysticks, having absolute axes with specific ranges and deadzones!?
As above, 3Dconnexion hardware products are "HID multi-axis controllers". This is an USB Implementers Forum standard (refer to the "HID usage tables" doc).
I am pretty aware that "HID multi-axis controller" is proper name for this device purpose, however the existing APIs and existing application usually expects the device to be a joystick, or at least to be a device having absolute axes, which SpacePilot is in fact from construction/hardware point of view. But SpacePilot does not state that via USB HID, what makes it unusable/not-detectable for existing applications and APIs handling joysticks.
ngomes wrote:
(2) it DOES not report its axis to be absolute
It does not and that's unfortunate. When the first 3D mice with USB were developed, not all platforms (Windows, Mac, Linux) had the same support for the HID standard. The "mis-reporting" of relative/absolute is a legacy of that time.
It is fixable via firmware upgrade? Isn't it?

This is main issue here I believe. Regardless the project I work on is supposed to run on Linux & Windows, I work on Mac myself.

Surprisingly Mac handles SpacePilot (having no drivers) perfectly, it scales the axis values to full signed 16-bit range (as expected in most input APIs), reading and scaling somehow those -/+500 range using data sent by the device itself, regardless it does report axes to be relative. Moreover axes are coming back always to ZERO, so no deadzones here. I presume Mac is doing some smart calibration under the hood. But in case of Linux and Windows it is much worse...
ngomes wrote:
next I need to find out empirically the ranges and deadzones
Why "empirically"? Range should be reported back as +/500. Dead-zone is zero (device sends no data until value > 0). Can you tell us the device firmware version?
Here in Windows and Linux unfortunately there's no way to return those -/+500 using HID API. So I need to hardcode them into the application, which is not the way I like.

Moreover Windows and Linux HID API sends non-zero (close-zero) values when I let the device go (untouched), those values sometimes are quite high like ~20-30, sometimes lower, but still should be zero (they are zero on Mac, but not in Windows/Linux). That's why I refer it as deadzone, and something that has to be empirically tested.

In contradiction to Mac which calibrates the devices pretty well, Windows and Linux direct HID APIs suffer those deadzones, and I have absolutely no clue where those came from. Also I have no clue how Mac gets those -/+500 from the device, while I tried using ABSRANGE queries using Windows and Linux and they always fail, maybe because SpacePilot logically have NO absolute axes.

Regarding firmware version I have no idea. I am not using Windows drivers for the device. I've read in KB that I shall call technical support for firmware upgrade tool assistance, so called them but the technician said most I can do is install Windows software and calibrate the device. But since I am using directly HID API, calibration that takes effect only at high level 3Dconnexion API won't change a thing. Moreover he said Linux is unsupported platform, which is pretty bad since it will be main platform for the project.

So I am pretty lost, why Mac handles this devices pretty well without drivers, but Windows & Linux suffer unpredictable deadzones.

Altogether software I am writing is supposed to handle any input (joystick) device well, and such device should be replaceable without any problem. Therefore I don't want to hardcode any calibration/deadzone information of particular device (such as SpacePilot) into it. So the user of the software can use any joystick device he want to. While SpacePilot is just a choice for the input device for first deployment of the software.
ngomes wrote:
Maybe someone can enlighten me on what makes SpacePilot so special that it cannot report itself as a joystick to the OS, and let other application or games use it as regular joystick!?
I do have a few conspiracy theories about that, but not want to troll over here :wink:
Joysticks are normally two-axes devices. 3D mice are six-axes. At a basic level they are similar devices (motion sensor/actuator, keyboard, display).
I think you can hardly find joystick nowadays that have less than four axes. Most of them have four, five, or even more.
For flight sim joysticks 1st is roll and 2nd is pitch, 3rd is yaw (a rudder), 4th is throttle. Usually there are extra 5,6 axes for small hat for moving the view.
Game consoles such as PS or XBOX do have two analog sticks, so 4 axes. Plus PS have extra two throttle analog buttons (extra 2 axes), which makes six.
What makes a difference for SpacePilot is construction and purpose, but IMHO from logical point of view it is much more a joystick, than a mouse.
ngomes
Moderator
Moderator
Posts: 3321
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

(Site is finally up again. Apologises for taking so long to get back to you, ono.)
ono wrote:Moreover Windows and Linux HID API sends non-zero (close-zero) values when I let the device go (untouched), those values sometimes are quite high like ~20-30, sometimes lower, but still should be zero (they are zero on Mac, but not in Windows/Linux). That's why I refer it as deadzone, and something that has to be empirically tested
Something is not right. Devices should only send data (values > 0) if the cap is being displaced.

We cannot understand why you would see a device continuously sending data on Windows and Linux and not on the Mac.

Do you have more than one device? If you do, are you seeing this regardless of device?

Regarding the other issues, the range is reported by the device through the HID reports (Logical Minimum and Logical Maximum). As mentioned above, deadband is zero (devices do not send data if cap is not displaced).

The absolute flag issue can be fixed in the device firmware, yes, but the issue is the 3D mouse installed base which will remain with the wrong setting.
ngomes
Moderator
Moderator
Posts: 3321
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

Hi ono,

Unless we hear from you again, we will consider this matter closed.

We believe the different values observed by you on the Mac are somehow introduce by a third-party framework (you mentioned "SDL").

The raw data observed when using native HID APIs is the same.
rhaschke
Posts: 3
Joined: Tue May 04, 2010 3:47 pm
Location: Bielefeld, Germany

Drift in calibration

Post by rhaschke »

Hi,

I also observe a drift in calibration, when the device is connected for a long time.
I'm using ubuntu Linux with direct HID device access.
However, it seems, that the device is calibrated if it gets (re)connected.

Is this calibration done by the device itself, or by the linux kernel driver?
UtaSH
Moderator
Moderator
Posts: 3754
Joined: Mon Nov 27, 2006 10:34 am
Location: Munich, Germany
Contact:

Re: Drift in calibration

Post by UtaSH »

Hi rhaschke,

what is the serial number / PID of the device? It might be a hardware failure.
cyycdy
Posts: 4
Joined: Wed Jun 18, 2014 11:16 pm

Re: Why SpacePilot/Navigator is NOT HID compatible joystick!

Post by cyycdy »

This problem also confuse me.
My application that work in ubuntu can just recognize the "joystick"(/dev/input/js*), but the spacenavigator is an "event device"(/dev/input/event*).
UtaSH
Moderator
Moderator
Posts: 3754
Joined: Mon Nov 27, 2006 10:34 am
Location: Munich, Germany
Contact:

Re: Why SpacePilot/Navigator is NOT HID compatible joystick!

Post by UtaSH »

cyycdy wrote:This problem also confuse me.
My application that work in ubuntu can just recognize the "joystick"(/dev/input/js*), but the spacenavigator is an "event device"(/dev/input/event*).
The 3D mouse is not a joystick ... it's multiaxis device.
cyycdy
Posts: 4
Joined: Wed Jun 18, 2014 11:16 pm

Re: Why SpacePilot/Navigator is NOT HID compatible joystick!

Post by cyycdy »

UtaSH wrote:
cyycdy wrote:This problem also confuse me.
My application that work in ubuntu can just recognize the "joystick"(/dev/input/js*), but the spacenavigator is an "event device"(/dev/input/event*).
The 3D mouse is not a joystick ... it's multiaxis device.
Thanks.
But I find that the spacenavigator is recognized as "3Dconnexion KMJ Emulator" in windows.
So is there have any similar tool can emulate the spacenavigator as a joystick in linux?
Thank you.
Moder_20
Posts: 3
Joined: Tue Nov 04, 2014 3:34 am
Contact:

Re: Why SpacePilot/Navigator is NOT HID compatible joystick!

Post by Moder_20 »

I had the same problem but already solved it was very similiat to this one
Pendali
Posts: 6
Joined: Sun Nov 16, 2014 11:08 am

Re: Why SpacePilot/Navigator is NOT HID compatible joystick!

Post by Pendali »

They should make some kind of toggle that you could press to turn it into a raw 10 bits input joystick.
Although absolutely worth it, It's kind of a hassle trying to make this thing work with Star citizen :P
Pendali
Posts: 6
Joined: Sun Nov 16, 2014 11:08 am

Re: Why SpacePilot/Navigator is NOT HID compatible joystick!

Post by Pendali »

btw. here is how to make it work as a joystick with vjoy:
https://forums.robertsspaceindustries.c ... n-setup/p1
Post Reply