lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 18 May 2007 14:54:13 +0100
From:	"Renato Golin" <rengolin@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: joydev.c and saitek cyborg evo force

Hi,

I'm a kernel newbie so please, pardon my French.

I have a Saitek Cyborg Evo Force, a very good joystick with force-
feedback. Problem is, on Windows it works well (its drivers know its
own idiosyncrasies) but on Linux it gets a bit fuzzy.

The behaviour is that, all axis are working fine, except up/down
(elevator) and left/right (aileron) that gives me "random"
signed/unsigned values.

A smaller problem is that it's reporting 8 axis but have 6 only and 13
buttons but have only 12 and the 12th button is always pressed,
messing fgjs setup utility.

Digging drivers/input/joydev.c I found out that if I remove the
correction (setting
JS_CORR_NONE) the values come correct, in a range from 0 to 4096.

Problem is, on joydev_connect, when defining the corrections for every
axis, the joystick is reporting dev->absmax = 127 and dev->absmin =
-127 for both axis 0 and 1, so the correction is based on a signed
range when the joystick is actually sending an unsigned range.

Also, because the module was expecting up to 127 on value and is getting
4094, when the correction does a left shift it might be setting the
signal bit (leftmost) and that could explain why I'm getting random
signed/unsigned values.

The only way to know what is the real range is when you're actually
pushing and pulling the stick so the change I'm willing to make is to
recalibrate (ie. redefine the correction) whenever the raw value goes
off limits. But that would only extend 127 to 4096 but won't change -127
to 0.

Another alternative is to do a dynamic calibration whenever you move the
stick from the beginning and not do it based on what the joystick is
telling you to (ie. at connect time). But that might be a lot of useless
work when the control gives you the correct range in the first place.

At last, hardcoding "if (saitek)" is quite ugly but can be done for the
sake of performance.

comments, please.

cheers,
--renato

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ