New free software (open source) driver and SDK project

Questions and answers about 3Dconnexion devices on UNIX and Linux.

Moderator: Moderators

Post Reply
Posts: 15
Joined: Sat Jun 16, 2007 6:24 am
Location: Greece

New free software (open source) driver and SDK project

Post by nuclear » Thu Jul 26, 2007 1:28 pm

Hello everyone.
I want to announce the first release of my free replacement driver and SDK for GNU/Linux. Free as in freedom of course (aka open source).

Both the new driver and the new library are made compatible with the 3dconnexion ones, and can be used as drop-in replacements. I've tested my driver with the Maya 8.0 plugin from 3dconnexion and it works perfectly.

The library in particular provides a totally new, more orthogonal API, as well as a magellan wrapper on top of it, so it can be used by existing applications without any code changes.

The project web page is at: (read the FAQ for more details), and you can download the initial release from the sourceforge download page: ... _id=200169

Enjoy, any feedback, bug reports, patches, whatever will be appreciated :)

Posts: 4
Joined: Fri Apr 27, 2007 2:33 pm
Location: Austin Texas USA

Post by mew » Thu Jul 26, 2007 4:17 pm

this is exciting, I'll review and let you know!
BTW I've been also looking at for SpacePilot interfacing. My ultimate goal is to publish the 6DOF traffic over VRPN (

-- mew

Posts: 2
Joined: Fri Aug 03, 2007 2:57 pm

Open source driver for 3dconnexion-SpaceNavigators

Post by maurer » Thu Aug 09, 2007 8:43 am

Hallo John,

really great work. I tested it under openSUSE 10.2 on kernel; under X everything works fine.

On a tty-console I did not yet manage to get it working,
spnav_open reports, that connect did not work. I will try
to isolate that problem.

If you could supply some information on the functions
spnav_x11_window and spnav_x11_event, it would be fine
(until now I don't need them and I don't think, I understood
what they are for).

Best greetings,


Posts: 15
Joined: Sat Jun 16, 2007 6:24 am
Location: Greece

Post by nuclear » Mon Aug 13, 2007 5:57 pm

Hello maurer.
Sorry for the late response, but it would be preferable if you contact me directly for such questions (, as I don't monitor this forum regularly.

As for your questions:

This release of the driver/sdk (0.1) is an early one, in the sense that not everything is finished. In particular, the alternative non-X protocol does not get handled correctly by the daemon yet. So you have to use the standard X11 protocol (that also works with 3dconnexion's driver) for now (spnav_x11_open).
It's not difficult to make the alternative protocol handling work at this point, it's mostly done. So, if it is essential for what you are doing, let me know (email please), and I'll give it a priority.

spnav_x11_window() is the equivalent of MagellanSetWindow() of the original SDK. It sends a window ID to the daemon, which is to receive motion/button events. My daemon can work with many client apps at once, and many windows, so this just adds the window to the client window list. I'm not sure how the original daemon works (I was never able to make it run), but I suspect that it only works with one window and this function's purpose is to "replace" the window ID on the daemon.

spnav_x11_event() gets an XEvent pointer and a pointer to an spnav_event. If the current X event passed as the first argument is an event that comes from the driver (motion or button), it fills in the spnav_event, and returns SPNAV_EVENT_MOTION, or SPNAV_EVENT_BUTTON. Otherwise, it returns 0, which means that it's another kind of X event (not generated by the driver).
If you don't need to handle other X events you can just use spnav_wait_event() or spnav_poll_event() to block, or poll, for spacenav events, discarding any other X events.

spnav_x11_event, is similar to the MagellanInputEvent() and MagellanTranslateEvent(), which both seem to do the same thing with different event structures for some weird reason. In fact the Magellan wrapper provided by my replacement SDK, uses spnav_x11_event to implement both these functions.

Posts: 53
Joined: Tue Apr 24, 2007 4:00 am
Location: Sweden

Post by Absum » Fri Oct 12, 2007 2:26 am

I just wanted to bump this thread abit, this new driver is really sweet, I use it as drop-in replacement for the original without any problems. I've also done some hacking to it and thinks it has great potential, this should definitly be a option for all linux/blender users.

Posts: 53
Joined: Tue Apr 24, 2007 4:00 am
Location: Sweden

Post by Absum » Tue Dec 04, 2007 6:41 pm

These are the changes I've made to the driver:
* Separated and extended configuration handeling
* Added override config file for home directory
* Added led settings (on/off)
* Added driver level handeling of buttons
* Added capabilities change the inputed values
* Null either rotation, translation or both
* Invert either rotation, translation or both per axis

Diff (mostly contains whitespace alterations):

Posts: 1
Joined: Fri Dec 28, 2007 4:03 pm
Location: Evanston, IL, USA

Post by madopal » Fri Jan 04, 2008 11:52 am

I've been using the driver with OpenGL/Glut...anyone else notice that it seems to die when you end an app that used it? I wind up having to restart the driver a lot. Am I closing something incorrectly?

Posts: 1
Joined: Wed Jan 16, 2008 12:03 pm

Your driver solved my probs on gentoo

Post by tniemeier » Wed Jan 16, 2008 12:10 pm


You did a great work. The version 0.1 works for me on my gentoo machine. I thought I made a mistake buying my spacenavigator. But now I'm happy and can't live with out it.

Thomas Niemeier

Post Reply