Reviving a Spaceball 4000 FLX

I'm cleaning up my site, and I rediscovered a post I was working on a while ago but never published. I've abandoned this project, but I figured someone might be interested in my documentation I wrote while I was trying to get it working.

For a long time there has been a spaceball in my house. Basically, a spaceball is a joystick with six degrees of freedom and a bunch of buttons. Six degrees of freedom means it can take input along six degrees. Forwards and backwards, like a normal mouse or joystick (x and y), up and down (z axis), rotation around the z axis (clockwise/counterclockwise when looking down), pitching forwards and backwards (rotation around the x axis, or clockwise/counterclockwise when looking at it from the side), and finally, tilting from side to side (rotating around y axis, or clockwise/counterclockwise when looking at it from the front)

4000_mid.jpg

I don't really have a clue what I'll be able to use the spaceball for, but it's a really cool input device. It'd be perfect for flying around in Google Earth, or any sort of game that involves moving around in a 3d world. It could probably be used for a really cool sculpting program, or controlling a quadcopter.

I got the spaceball working after not much effort, although I would have saved some time if I'd tried using root to start with. The command is: # inputattach -sbl /dev/ttyUSB0 Where /dev/ttyUSB0 is where the spaceball is attached to. If you have an actual serial port, it'll probably be one of the /dev/ttyS* files.

If you're trying to get a spaceball to work, try that command before continuing. If that works, you don't need to keep reading (but feel free to!). A few things which I tried before running that command follow the break. If you don't have inputattach, it's currently on apt-get for Ubuntu 11.10. If you're from the future when 11.10 is ancient, you can probably find it in archives somewhere, if it hasn't been updated. There's a small chance I'll have mirrored it somewhere to make sure my devices keep working, so you can also check whatever I'm using at the time to host my projects.

The simplest test I know of to see if you're getting anything from the spaceball is using cat. Running

$ cat /dev/ttyUSB0

Will spit out the data coming in on the serial port. For me, it included the firmware. I didn't wind up needing to know what firmware was running on the spaceball, but it could easily help if inputattach didn't work. When I ran this, my spaceball beeped twice a few seconds after I ran it before it sent any data.

$ cat /dev/ttyUSB0 .`@Firmware version 2.42 created on 24-Oct-1997.t.

Moving the main ball around doesn't seem to change anything, but the buttons are what cause the garbage at the start of that line. It changes whenever I hit buttons. .`@ seems to be the signal for no buttons pressed.

Another lead was through the manufacturer's site, 3Dconnexion. I was very impressed to find that not only is the spaceball listed in their drivers section, but there are still drivers for it. Even for linux. The one I found was a compiled program which I couldn't run at first, because of some old libraries. I found a newer version of the library, and I ran sed on the binary to replace libXm.so.3 (the old libary) with libXm.so.4. Surprisingly, it worked. The driver installer still ran. Unfortunately it got stuck looking for the spaceball, it couldn't figure out how to follow /dev/ttyUSB0 to the spaceball. It was only programmed to look at /dev/ttyS0 through ttyS4, and linking ttyS4 to ttyUSB0 didn't help. I imagine there might be some way to convince that to work, and it might work on a computer that still has a serial port.