~ubuntu-branches/ubuntu/saucy/joystick/saucy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
			  linuxconsole tools
			    Release 1.4.6
		 http://sf.net/projects/linuxconsole/


This package contains the following utilities and associated
documentation:
* inputattach - connects legacy serial devices to the input layer
* joystick utilities - calibrate and test joysticks and joypads

The evtest tool, which used to be part of this package, is now
maintained separately at http://cgit.freedesktop.org/evtest/ and
https://bugzilla.freedesktop.org/enter_bug.cgi?product=evtest


Joystick utilities
------------------

The following utilities are provided to calibrate and test joysticks:
* ffcfstress, ffmvforce, fftest - test force-feedback devices
* ffset - set force-feedback device parameters
* jscal - calibrate joystick devices, reconfigure the axes and buttons
* jscal-store, jscal-restore - store and retrieve joystick device
  settings as configured using jscal
* jstest - test joystick devices

The typical scenario when configuring a new device is as follows:
1. Check the basic functions using jstest (number of buttons, axes,
   etc.).
2. Calibrate the joystick using jscal (this can be useful even if the
   device functions correctly, if only to configure the dead-zone at
   the centre).
3. Repeat steps 1 and 2 until the joystick is configured to the user's
   satisfaction.
4. Store the device's setup using jscal-store.


Installation
------------

Most of the utilities have no particular requirement beyond a libc and
the Linux input layer headers (normally part of your libc
installation). ffmvforce requires SDL (libsdl1.2-dev on Debian
derivatives).

To install the utilities and their manpages, run
	make
and then as root
	make install
from the distribution's top directory. This will install everything
into /usr/local. Should you wish to install the tools elsewhere, you
can use the PREFIX variable:
	PREFIX=/usr make install
The Makefiles also recognise the DESTDIR variable which can be used to
install into a temporary directory (this is useful mainly for
distribution packagers).


Auto-loading inputattach and jscal-restore
------------------------------------------

udev can be used to start inputattach and jscal-restore when the
appropriate device is connected to the system (or detected when the
system is booting up).

The following rule restores the stored calibration and axis/button
mappings whenever a joystick device is connected:
	KERNEL=="js*", ACTION=="add", RUN+="/usr/bin/jscal-restore %E{DEVNAME}"
(change the path as appropriate). This rule needs /usr to be
available, which can cause issues on systems where udev is run from
the initramfs or where /usr is a separate partition. To work around
this, the Debian package uses a script provided by Debian's udev
package to wait for jscal-restore to become available. Should you wish
to reproduce this, you need to create a udev agent
(/lib/udev/jscal-restore) containing the following:

#!/bin/sh -e
# udev agent for jscal-restore

wait_for_file() {
	local file=$1
	local count=120
	while [ $count != 0 ]; do
		[ -e "$file" ] && return 0
		sleep 1
		count=$(($count - 1))
	done
	exit 1
}

(
	wait_for_file /usr/bin/jscal-restore
	exec /usr/bin/jscal-restore $1
) &

and change the udev rule to
	KERNEL=="js*", ACTION=="add", RUN+="/lib/udev/jscal-restore %E{DEVNAME}"

The following rule forces flaky Acrux gamepads to stay awake:
	KERNEL=="js*", ACTION=="add", ATTRS{name}=="ACRUX USB GAMEPAD 8116", RUN+="/bin/sleep 5000 < /dev/%k"
(This should only be necessary on kernels older than 2.6.39-rc1.)

The following rule configures a Mouse Systems mouse on the first
serial port:
	KERNEL=="ttyS0", ACTION=="add", RUN+="/usr/bin/inputattach --daemon -msc /dev/%k"
If you need to wait for /usr you can adapt the recipe above.

The following rules configures a Wacom W8001 devices on a Fujitsu
T2010[2] or on Lenovo X200-series laptops and tablets:
	SUBSYSTEM=="tty", KERNEL=="ttyS[0-9]*", ATTRS{id}=="FUJ02e5", ACTION=="add|change", RUN+="/usr/bin/inputattach --daemon --baud 19200 --w8001 /dev/%k"
	SUBSYSTEM=="tty", KERNEL=="ttyS[0-9]*", ATTRS{id}=="WACf00c", ACTION=="add|change", RUN+="/usr/bin/inputattach --daemon --baud 38400 --w8001 /dev/%k"

These rules are liable to cause conflicts with the X.org wacom
driver. For example, on some Debian-based systems the
/usr/share/X11/xorg.conf.d/50-wacom.conf configuration file needs to
be amended so that the "MatchProduct" line matching one of the
identifiers used above ("FUJ02e5" or "WACf00c", the latter being
matched by "WACf") no longer contains the matching identifier. The
appropriate X.org driver when using inputattach in this way is evdev.


Contributors
------------

The following people have contributed to this release:
* Johann Walles: jscal jitter tolerance.
* Dr. László Kaján: button and axis remapping.
* Sebastian Siewior: EVIOCGBIT correction.
* Krzysztof A. Sobiecki: improvements to the button and axis remapping
  functions.
* Claudio Nieder: Sahara Touch-iT213 support.
* Florian Fainelli: evtest fixes.
* Alexander Clouter: W8001 support and error-handling fixes.
* Roberto Neri: much discussion, and fixes and improvements to
  jscal-store/jscal-restore and the udev rules given above.
* Jean Delvare: inputattach improvements, TAOS support.
* Brian Murray and Kees Cook: Lenovo W8001 support.
* Raoul Bönish: fixes for the udev rules.
* John Sung: PenMount 3000, 6000 and 6250 support.
* Christian Gmeiner: TSC-40 support.
* Kyle Manna: various build fixes.
* Denis Gonsiorovsky: Genius EasyPen 3x4 tablet support.
* Jaromir Capik: 64-bit fixes and changes from ff-utils (based on a
  patch originally by Jean-Philippe Meure).
* Ralf Jung: fixes for long device names.


License
-------

The linuxconsole tools are
	Copyright © 1996-2005 Vojtech Pavlik
	Copyright © 2001 Oliver Hamann
	Copyright © 2001-2002 Johann Deneux
	Copyright © 2001 Arndt Schoenewald
	Copyright © 2008-2013 Stephen Kitt


This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
USA.


The GNU General Public License version 2 is provided in the COPYING
file.