Thread (1 message) 1 message, 1 author, 2015-06-09

Re: Handling Controllers with Acc/Gyro/Mag via HID system

From: Bastien Nocera <hidden>
Date: 2015-06-09 09:54:17
Also in: linux-iio

On Mon, 2015-06-08 at 22:38 -0400, simon-wM4F9T/ekXmXDw4h08c5KA@public.gmane.org wrote:
quoted
Hi all,
I'm in the process of fixing the HID descriptor for the PS3 Move
Controller. which has a particularly convoluted layout for it's
quoted
Accelormeters, Gyros and Magnetometers involving 2 sets of data per 
output
report.
https://github.com/nitsch/moveonpc/wiki/Input-report
quoted
The plan is/was to massage the HID descriptor so the first set of
Accels/Gyro/Mag appear in a set a axis, as a simple way of getting to
this
quoted
data.
[snip]
quoted
Given that more controllers are coming with 'motion' controls, is 
there a
framework in place for unifying support?
A little more poking around has got me looking at the IIO subsystem, 
which
seems to be everything Accel/Gyro/Mag...
The IIO subsystem's user-space API is awful, and root only. I said as
much here:
http://thread.gmane.org/gmane.linux.kernel.iio/14421
I note that there are a few 'HID'ish things there too, although I'm 
not
sure whether they are useful to us, or just intended for connecting 
motion
devices via the HID bus and then onto IIO.
--
drivers/iio/accel/hid-sensor-accel-3d.c
drivers/iio/gyro/hid-sensor-gyro-3d.c
drivers/iio/magnetometer/hid-sensor-magn-3d.c
drivers/iio/orientation/hid-sensor-rotation.c
--

Does the idea of the drivers for the HID (gaming) controllers opening 
up a
connection to IIO system and pushing the Accel/Gyro/Mag values there
(rather than exposing them on the joystick interface) make sense?

Are there any examples of other devices doing this, so I can re-use 
the code?
I wrote this for accelerometers that are in tablets/convertibles:
https://github.com/hadess/iio-sensor-proxy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help