* How to use force feedback correctly?
@ 2009-03-16 10:42 Alexander Stein
2009-03-17 13:15 ` Anssi Hannula
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Stein @ 2009-03-16 10:42 UTC (permalink / raw)
To: linux-input
Hello,
I've read the documentation about force feedback in
Documentation/input/ff.txt. But I'm rather unsure how to use it actually. So
far I understood this you have to use /dev/input/eventX to access your ff-
device. But normally only root has read and write access to this device files,
while a joystick is used normally using /dev/input/jsX which can be used by a
non-root user.
So my actual question is: How can I use force feedback of a joystick without
setting global read/write permissions to /dev/input/eventX? Or may I even be
able to use force feedback using /dev/input/jsX?
Other thing: Is it possible that on line 52 in Documentation/input/ff.txt the
declaration of the features array is wrong?
> #52 unsigned long features[1 + FF_MAX/sizeof(unsigned long)];
IMO it has to be declared like this:
> unsigned long features[1 + FF_MAX/ (8 * sizeof(unsigned long))];
Which creates actually a Bit array, not an Byte array.
Thanks in advance
Regards
Alexander
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to use force feedback correctly?
2009-03-16 10:42 How to use force feedback correctly? Alexander Stein
@ 2009-03-17 13:15 ` Anssi Hannula
2009-03-18 7:03 ` Dmitriy Geels
0 siblings, 1 reply; 3+ messages in thread
From: Anssi Hannula @ 2009-03-17 13:15 UTC (permalink / raw)
To: Alexander Stein; +Cc: linux-input
Alexander Stein wrote:
> Hello,
Hi!
> I've read the documentation about force feedback in
> Documentation/input/ff.txt. But I'm rather unsure how to use it actually. So
> far I understood this you have to use /dev/input/eventX to access your ff-
> device. But normally only root has read and write access to this device files,
> while a joystick is used normally using /dev/input/jsX which can be used by a
> non-root user.
>
> So my actual question is: How can I use force feedback of a joystick without
> setting global read/write permissions to /dev/input/eventX?
The distribution should configure joystick eventX devices to
either have global read/write access, or read/write access for one group
(which the user is in), or have it chown the device to logged-in user,
depending on distribution conventions.
One can identify joystick devices from other eventX devices with udev
variable ENV{ID_CLASS}="joystick", or with existence of
"/dev/input/by-path/*-event-joystick", which is a symlink to the eventX
device.
On Mandriva Linux, permissions are granted to logged-in user with
pam_console / ConsoleKit, with /dev/input/by-path/*-event-joystick.
> Or may I even be
> able to use force feedback using /dev/input/jsX?
Nope.
> Other thing: Is it possible that on line 52 in Documentation/input/ff.txt the
> declaration of the features array is wrong?
>> #52 unsigned long features[1 + FF_MAX/sizeof(unsigned long)];
> IMO it has to be declared like this:
>> unsigned long features[1 + FF_MAX/ (8 * sizeof(unsigned long))];
> Which creates actually a Bit array, not an Byte array.
Right, seems to be wrong.
--
Anssi Hannula
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to use force feedback correctly?
2009-03-17 13:15 ` Anssi Hannula
@ 2009-03-18 7:03 ` Dmitriy Geels
0 siblings, 0 replies; 3+ messages in thread
From: Dmitriy Geels @ 2009-03-18 7:03 UTC (permalink / raw)
To: Anssi Hannula; +Cc: Alexander Stein, linux-input
2009/3/17 Anssi Hannula <anssi.hannula@gmail.com>:
>> So my actual question is: How can I use force feedback of a joystick without
>> setting global read/write permissions to /dev/input/eventX?
>
> The distribution should configure joystick eventX devices to
> either have global read/write access, or read/write access for one group
> (which the user is in), or have it chown the device to logged-in user,
> depending on distribution conventions.
>
> One can identify joystick devices from other eventX devices with udev
> variable ENV{ID_CLASS}="joystick", or with existence of
> "/dev/input/by-path/*-event-joystick", which is a symlink to the eventX
> device.
Created bug report for ubuntu jaunty. https://bugs.launchpad.net/bugs/344673
This wasn't a problem for ubuntu, because kernels prior to 2.6.28 were
missing force feedback support for hid devices.
You can make this rule yourself, here is a good manual:
http://www.reactivated.net/writing_udev_rules.html
Or just wait, I will make this rule and post it to bug report.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-18 7:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-16 10:42 How to use force feedback correctly? Alexander Stein
2009-03-17 13:15 ` Anssi Hannula
2009-03-18 7:03 ` Dmitriy Geels
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).