All of lore.kernel.org
 help / color / mirror / Atom feed
* Rewriting wheels HID descriptor for complete functionality
@ 2010-12-01 18:23 simon
  2010-12-01 19:32 ` Nikolai Kondrashov
  2010-12-01 21:20 ` Antonio Ospite
  0 siblings, 2 replies; 5+ messages in thread
From: simon @ 2010-12-01 18:23 UTC (permalink / raw)
  To: linux-input

I am working on a driver for a Logitech gaming wheel where the HID
descriptor presents a 'joystick' with X and Y axis, the Y is a combined
acc/brake value even though the wheel has separate paddles for each.

There are 'vendor defined' variables for both the acc/brake within the HID
descriptor, but these are not (by Linux) tied to their function.

On the Windows, the specialised Logitech driver gives the option to use
either combined or separate acc/brake.

I am considering re-writing the HID descriptor to expose these separate
values as 'proper' axis, as they would provide both better resolution and
better functionality (ie. left foot braking).

Q1. Is this an acceptable thing to do?

Q2. In the case where there is significant change to the HID descriptor,
is it OK to just re-write the whole block (rather than patch/swap a couple
of bytes)?

Q3. In re-writing descriptor for the combined acc/brake. Is there a
particular 'variable' I should change it to (X, Y and Z would already be
used), or should I just make it 'vendor defined'?

Thanks in advance,
Simon
(aka Mungewell)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Rewriting wheels HID descriptor for complete functionality
  2010-12-01 18:23 Rewriting wheels HID descriptor for complete functionality simon
@ 2010-12-01 19:32 ` Nikolai Kondrashov
  2010-12-01 21:20 ` Antonio Ospite
  1 sibling, 0 replies; 5+ messages in thread
From: Nikolai Kondrashov @ 2010-12-01 19:32 UTC (permalink / raw)
  To: simon; +Cc: linux-input

On 12/01/2010 09:23 PM, simon@mungewell.org wrote:
> I am considering re-writing the HID descriptor to expose these separate
> values as 'proper' axis, as they would provide both better resolution and
> better functionality (ie. left foot braking).
>
> Q1. Is this an acceptable thing to do?
>
> Q2. In the case where there is significant change to the HID descriptor,
> is it OK to just re-write the whole block (rather than patch/swap a couple
> of bytes)?
When I asked a similar question on linux-usb, nobody answered, but nobody
complained when I submitted patches with 8 full report descriptors either.
They were accepted by Jiri Kosina.

I could also recommend using my tool for (de-)composing HID report
descriptors:
http://digimend.sourceforge.net/#proj-hidrd

Sincerely,
Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Rewriting wheels HID descriptor for complete functionality
  2010-12-01 18:23 Rewriting wheels HID descriptor for complete functionality simon
  2010-12-01 19:32 ` Nikolai Kondrashov
@ 2010-12-01 21:20 ` Antonio Ospite
  2010-12-01 22:18   ` simon
  2011-02-27 22:45   ` Marcin Tolysz
  1 sibling, 2 replies; 5+ messages in thread
From: Antonio Ospite @ 2010-12-01 21:20 UTC (permalink / raw)
  To: simon; +Cc: linux-input, Marcin Tolysz

[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]

On Wed, 1 Dec 2010 13:23:15 -0500
simon@mungewell.org wrote:

> I am working on a driver for a Logitech gaming wheel where the HID
> descriptor presents a 'joystick' with X and Y axis, the Y is a combined
> acc/brake value even though the wheel has separate paddles for each.
> 
> There are 'vendor defined' variables for both the acc/brake within the HID
> descriptor, but these are not (by Linux) tied to their function.
>
> On the Windows, the specialised Logitech driver gives the option to use
> either combined or separate acc/brake.
> 
> I am considering re-writing the HID descriptor to expose these separate
> values as 'proper' axis, as they would provide both better resolution and
> better functionality (ie. left foot braking).
>

Simon,

have you tried Marcin Tolysz's approach of loading the new HID
descriptor from an external file?

Look at:
https://patchwork.kernel.org/patch/69723/

If there is interest maybe Marcin's way could be brought back on the
discussion table (Marcin added to CC).

I'll be needing descriptor patching for Sony Sixaxis too, after I solved
some other issues, so I am also interested on settling on a "standard"
way to achieve that.

> Q1. Is this an acceptable thing to do?
> 
> Q2. In the case where there is significant change to the HID descriptor,
> is it OK to just re-write the whole block (rather than patch/swap a couple
> of bytes)?
> 
> Q3. In re-writing descriptor for the combined acc/brake. Is there a
> particular 'variable' I should change it to (X, Y and Z would already be
> used), or should I just make it 'vendor defined'?
> 
> Thanks in advance,
> Simon
> (aka Mungewell)
> 

Regards,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Rewriting wheels HID descriptor for complete functionality
  2010-12-01 21:20 ` Antonio Ospite
@ 2010-12-01 22:18   ` simon
  2011-02-27 22:45   ` Marcin Tolysz
  1 sibling, 0 replies; 5+ messages in thread
From: simon @ 2010-12-01 22:18 UTC (permalink / raw)
  To: Antonio Ospite; +Cc: simon, linux-input, Marcin Tolysz


> have you tried Marcin Tolysz's approach of loading the new HID
> descriptor from an external file?
>
> Look at:
> https://patchwork.kernel.org/patch/69723/
>

This looks plausable, and would be helpful to the hard-core hacker or
developer. However it would not really help with 'out of the box'
experience unless the distros would carry additional files for all known
'patches'.

As it stands it would require a file for each USB bus (presumably to allow
different settings for similar devices on a PC).

Given that you can bind/unbind USB devices via the
'/sys/bus/usb/drivers/usb-hid/[un]bind' interface, could it be possible to
present a HID descriptor file into which could be cat'ed a new descriptor
by the hard-core hacker?

Simon


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Rewriting wheels HID descriptor for complete functionality
  2010-12-01 21:20 ` Antonio Ospite
  2010-12-01 22:18   ` simon
@ 2011-02-27 22:45   ` Marcin Tolysz
  1 sibling, 0 replies; 5+ messages in thread
From: Marcin Tolysz @ 2011-02-27 22:45 UTC (permalink / raw)
  To: linux-input

Hi, All

I had been doing some external stuff regarding editing HID
descriptors, just to prove it could be done fairly easy:

0) read http://code.google.com/p/ghid/wiki/HowTo

1) haskell compiler to aid hid editing:
  a) install haskell-platform
  b) hg clone https://ghid.googlecode.com/hg/ ghid

2) Use the online thing which uses this comiler:
  a) http://gem4.tolysz.co.uk/ghid/
  b) you would need to click outside the texbox to make it work (it's AJAX)

3) There is a CLI script which uses the above compiler from via the
above AJAX interface:
 a) https://code.google.com/p/ghid/source/browse/Docs/eHID.pl

## those 2), 3) are using my low end server, I did only a small
regression test so am not sure if it can not be slashdoted, but my
guess, there is not this many people who wanted to see/edit their hid
descriptors to kill this server.

Regards.

ps.
Just a small apologize for this slightly off-topic.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-27 22:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-01 18:23 Rewriting wheels HID descriptor for complete functionality simon
2010-12-01 19:32 ` Nikolai Kondrashov
2010-12-01 21:20 ` Antonio Ospite
2010-12-01 22:18   ` simon
2011-02-27 22:45   ` Marcin Tolysz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.