Applications hosted on a system without a USB interface can utilize low-cost joystick and game controllers for visualization, virtual reality, and simulation applications.
Joystick data is mirrored to shared memory which allows independent processes to easily interface to the joystick(s) A TCPIP client/server pair mirror the joystick shared memory data to a remote system
Figure 1. (click for a larger version)
If I'm running the client application on the same system as the joystick only rjsd is required as shown in Figure 2.
Figure 2.(click for a larger version)
USB support is included in the kernel for versions 2.3 and above. I recommend the backport of the USB drivers which is included in kernel 2.2.18 which you can download from kernel.org The Linux Joystick Driver is included in the 2.2 kernel - Make sure you kernel has this driver enabled. Refer to the Linux Joystick Driver homepage for a list of supported devices. If using repeatd the networked systems must be able to open up a socket connection between them. Port number 2013 is used by default and may be re-specified with the -p option to repeatd.
Get rjs.tz (2.0 Mb)
The Linux Driver Homepage - The best place to start
mjstest - the multiple joystick test - This is the basic code from which rjsd was formed
Logitech - Several good USB controllers. I have the Wingman Rumblepad
Interact - Many low-cost USB and 15-pin gameport devices. I have a MakoPad that I'm currently working on interfacing ($4.99 at Staples!) (this website requires a Flash plugin for your browser)
Here's some links which assisted me in configuring USB on my laptop:Linux USB ProjectSome General Dell Latitude and Linux on a laptop links:
John's USB on Linux Experience
How to get USB devices working under LinuxLinux on the Dell Latitude CPi A366XT (great stuff - very useful)
Linux on Dell Latitude (a little dated but still good)
Socket-level Programming - the basics for repeatd came from here
And of course for free and consistent tracking of website traffic.
Multiple joystick device support - support for more than a single host/single device Multi-threaded server for repeatd - allowing multiple applications on separate machines to interact with a single device Possibly integrating rjsd with repeatd Encapsulating the raw joystick data into an abstract class. I'd like to do things like:
- Turning a two-axis controller (digital or analog) into 4 separate switch devices
- Report rate data instead of instantaneous analog or digital data to the application
- Smooth data from "noisy" devices
- Incorporate quaternion or matrix-valued rotations into low-level joystick functions
- Adaptive sleep intervals for RJS. The code currently has a CPU-intensive inner loop.
- Allow the user to rotate the axis of a controller to accommodate left hand/right hand use or ergonomic issues
In the future I'd like to extend this capability with infared remote controls in addition to joystick devices. Cheap IR remotes could function in a similar manner as the joystick devices. The LIRC project page can give you a feel for the possibilities.
Microsoft has some very interesting controllers. I'm enamored with the Sidewinder Dual Strike. It seems like a great device for architectural walkthrough applications. (I'm not sure if they're supported yet however)
Ken Schwarz firstname.lastname@example.org