Old SpaceBall FLX4000 (serial), please help

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

Moderator: Moderators

Post Reply
xemet
Posts: 5
Joined: Wed Feb 14, 2007 4:43 am

Old SpaceBall FLX4000 (serial), please help

Post by xemet »

Hello,

I'm a student from Italy,
Just yesterday I've got at university an old SpaceBall 4000 FLX (serial, not USB).
My intention was to use it to move (as manual jog device) a numeric control milling machine.

We use the free software EMC2 ( www.linuxcnc.org) to control our machines.
This software includes HAL (Hardware Abstraction Layer) that is a thing like LabView where you have (and can create) several modules with input/output pins and connects them.
Just yesterday, using this HAL, I succeeded in moving my CNC machine using an inexpensive USB joypad. I used a module called hal_joystick that creates a virtual pin (float type) for every axis and (bit type) for every button.

Now the question is: is it possible to read the SpaceBall axis position so that i can create a pin reporting it, just like the module hal_joystick does?
I've installed the 3dxware driver, and tried the xvalue demo. It shows all axes values...if only I could read them with a script or a C module the problem would be solved.

Or is there a standard way to interact with the 3dxware driver in order to retrieve the axis values?

Many thanks,

Manfredi Leto
UtaSH
Moderator
Moderator
Posts: 3754
Joined: Mon Nov 27, 2006 10:34 am
Location: Munich, Germany
Contact:

Re: Old SpaceBall FLX4000 (serial), please help

Post by UtaSH »

Hello xemet,

the data of the device is sent via XClientMessages to the active window (InputFocus). An example for an application that reads this data (xapp.c) is in our Unix/Linux SDK. You can get it from http://www.3dconnexion.com/support/4h.php.

Uta Ludwig
3Dconnexion
xemet
Posts: 5
Joined: Wed Feb 14, 2007 4:43 am

Post by xemet »

Thank you very much!

I'm not very expert with C right now, but now that I know it is possible to retrieve the axes values I will study the problem.

Many thanks!

Manfredi
xemet
Posts: 5
Joined: Wed Feb 14, 2007 4:43 am

Post by xemet »

Hello,

I discovered that actually there could be a much more simple way (in my case) to make what I need.

Because I have a module hal_joystick ready to work that reads joysticks axes, if my spaceball could be recognized like a joystick the problem would be solved.

In linux Ubuntu there is a command "inputattach" that should do that.

inputattach is a utility to attach legacy serial devices such as mice and joysticks to the input subsystem using the serport and sermouse kernel modules.

And, here are the good news, spaceball 4000 FLX is supported.

just type "inputattach --spaceball /dev/ttyS0"

and the spaceball will be recognized by the system as a joystick.
There is only a BIG problem, it doesn't work.

When I use the command above, my spaceball beeps, but the system does not create the js0 node in the /dev/input directory and the device manager does not show the device.
The incredible thing is that if I use the --spaceorb mode instead of --spaceball, the js0 node is created and the device is shown in the device list...but of course it doesn't work because it isn't a spaceorb...and when I try to calibrate it all axes remain to 0.

Now my question is, anyone knows why the spaceball is not loaded properly?

Maybe I have an old firmware? My firmware is the version 0.24 are there newer versions? If yes, how to update it?

Many thanks

Manfredi
UtaSH
Moderator
Moderator
Posts: 3754
Joined: Mon Nov 27, 2006 10:34 am
Location: Munich, Germany
Contact:

Post by UtaSH »

Hello Manfredi,
And, here are the good news, spaceball 4000 FLX is supported.

just type "inputattach --spaceball /dev/ttyS0"

and the spaceball will be recognized by the system as a joystick.
There is only a BIG problem, it doesn't work.
I have no information about the command inputattach. But from what you describe it could be that the Spaceball 4000 FLX is not supported. The option --spaceball might work for one of the previous models, the Spaceball 2003 or the Spaceball 3003. You should refer to the author of inputattach.

There is no possibility to upgrade the firmware of this device. Firmware 0.24 is the only version that was made for the Spaceball 4000.

Uta
3Dconnexion
xemet
Posts: 5
Joined: Wed Feb 14, 2007 4:43 am

Post by xemet »

Thank you for your reply.

The spaceball 4000 FLX is supported, as can be read in the documentation:

""* SpaceTec SpaceBall 4000 FLX

In addition to having the spaceball and serport modules in the
kernel, you also need to attach a serial port to it. to do that, run the
inputattach program:

inputattach --spaceorb /dev/tts/x &
or
inputattach --spaceball /dev/tts/x &

where /dev/tts/x is the serial port which the device is connected to. After
doing this, the device will be reported and will start working.

SpaceTec SpaceBall 2003 FLX and 3003 FLX are not supported yet. ""

And this should be the module that allow it to be attached as joystick:

http://www.gelato.unsw.edu.au/lxr/sourc ... paceball.c

But at tis point I think that there is some bug in the driver...I've tried to contact the authour, but still no reply.

thank you.

Manfredi
xemet
Posts: 5
Joined: Wed Feb 14, 2007 4:43 am

Post by xemet »

just if someone is interested, problem was solved.

There is a bug in the spaceball.c module that concern the L version of the 4000 FLX (left hand), configuring it as Right hand, the driver works and spaceball can be seen like a normal joystick (and used in all applications in which you can use a joystick...)

bye

Manfredi
arkanoid
Posts: 4
Joined: Mon Aug 27, 2012 7:44 am

Re: Old SpaceBall FLX4000 (serial), please help

Post by arkanoid »

Xemet, are you still around? Seems that I have similar problem.
Betamax
Posts: 1
Joined: Mon Nov 02, 2015 1:27 pm

Re: Old SpaceBall FLX4000 (serial), please help

Post by Betamax »

Anyone successfully get a space mouse working on LinuxCNC?
Post Reply