[ANNOUNCE] xf86-input-joystick-1.3.1

Peter Clifton pcjc2 at cam.ac.uk
Thu Dec 6 16:52:52 PST 2007


On Fri, 2007-12-07 at 00:37 +0100, Sascha Hlusiak wrote:
> Release 1.3.1 of the joystick input driver for X.Org-7.3
> 
> git tag: xf86-input-joystick-1.3.1
> 
> 
> This release adds support for evdev devices (/dev/input/event*) but if this 
> fails, the linux joystick interface is tried and, if available, the bsd 
> usbhid interface (so in FreeBSD the linux joystick interface can be used now 
> with the same binary). The evdev backend makes it possible to hotplug the 
> joystick driver from hal; an example policy file is included in the tarball. 
> Use with care.

How does this stand with 6 Axis devices like the SpaceNavigator from
3Dconnexion?

I want to use this device for manipulating 3D objects in applications
(the ones I'm working on at lest). The question I have, is really.. what
is the right model to use..

The device (USB version at least) appears as a /dev/input/event* device
under linux. I can access that directly in the app, but somehow I feel I
should be using an Xorg joystick driver, or perhaps the 3Dconnexions SDK
(ok, no.. that looks horrid!)

According to this forum post (which I'll quote some of):
http://www.3dconnexion.com/forum/viewtopic.php?t=336&postdays=0&postorder=asc&start=0


""
The original HID_Descriptor from SpaceNavigator is at 99% a Joystick one. 
[...]


Here are the first bytes of this descriptor: 

                                 Code:
                             /* Space Nav */ 
    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop) 
          0x09, 0x08,                    // USAGE (Undefined) 
      0xa1, 0x01,                    // COLLECTION (Application) 
       0xa1, 0x00,                    //   COLLECTION (Physical) 
          0x85, 0x01,                    //     REPORT_ID (1) 
     0x16, 0x0c, 0xfe,              //     LOGICAL_MINIMUM (-500) 
      0x26, 0xf4, 0x01,              //     LOGICAL_MAXIMUM (500) 
    0x36, 0x00, 0x80,              //     PHYSICAL_MINIMUM (-32768) 
     0x46, 0xff, 0x7f,              //     PHYSICAL_MAXIMUM (32767)

The second line : 0x09, 0x08 … change it to 0x09,0x04 and u have a Joystick …. 
With those 2 bits changed, SpaceNavigator is seen as a Joystick without any driver.
""


Does the joystick driver seem the right place to try and implement
support for this device? What would it look like to the application
wanting to use the joystick?

(If you can point to any trivial examples of X11 apps using a joystick
with this driver, I'd appreciate it. I don't own a conventional
joystick, and am not a gamer, so can't think where to start in Linux
really!)

Best wishes,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)




More information about the xorg mailing list