All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anssi Hannula <anssi.hannula@gmail.com>
To: Dmitriy Geels <dmitriy.geels@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: hid-pidff bug: fails to find all required reports of saitek gamepad
Date: Thu, 12 Feb 2009 20:42:02 +0200	[thread overview]
Message-ID: <49946D7A.408@gmail.com> (raw)
In-Reply-To: <78f5d6bf0902121006r460ba8d6m61126af161358c19@mail.gmail.com>

Dmitriy Geels wrote:
> 2009/2/11 Anssi Hannula <anssi.hannula@gmail.com>:
>> Dmitriy Geels wrote:
>>> I did that already, you can also see described constant effect report
>>> using links, I posted earlier. There is no direction at all. Constant
>>> report has only effect block index and magnitude (3 bytes total: id,
>>> bi, mag). Device doesn't support direction at all.
>> (for clarification, I meant here an actual usb traffic dump when you play an
>> effect in windows)
> Ok, here is usb sniffer report:
> http://dmitriy.geels.googlepages.com/HIDtrafficdump.html
> Only reports data is raw, everything else decoded.
> What is there: I opened control panel applet for game devices, there
> is a test page, each effect played after button was pressed. All
> effects are periodic. There is pretty much information there.
> Here is just constant effect dump:
> http://dmitriy.geels.googlepages.com/constanteffectdump.html
> I changed magnitude and direction in test program. Changing direction
> doesn't send anything to device.
> 
>> Constant force makes no sense without a direction. What kind of force effect
>> does it actually produce?
> Just rumble. There is only one motor inside. For constant effect motor
> spins with constant speed, as I understood, this speed is controlled
> by magnitude. Also it is a place for report fixup: magnitude logical
> values are -127/127, but actually 1/255 -- 255 is strongest.

Hmm, so it is just rumble ( = periodic), not constant force. But what do 
the periodic effects do then, if constant is rumble? Normally periodic 
effects represent various types of rumble.

>>> After that, driver almost initializes: http://paste.org.ru/index.pl?008sgm
>>> It fails in pidff_check_autocenter(). According to descriptor, effect
>>> 1 is constant force. The problem is that block load report receive
>>> fails.
>>> I have no idea yet, why it fails, need to do some debug.
> ...
>> However, pidff_request_effect_upload should still not fail, as it is needed
>> for uploading effects. Try changing the effect type, make it e.g.
>> error = pidff_request_effect_upload(pidff, 2);
> Actually I tried to comment out check_autocenter() - then driver
> initializes successfully. But fftest fails to upload effect with io
> error.
> 
>> You could also try adding some delays after usbhid_wait_io() calls in
>> pidff_request_effect_upload(), with e.g. msleep(200) (you should also lower
>> the iterations limit 60 when adding such delays).
> I tried this, no result.
> I think, this problem is connected somehow to log message about
> maxusage and report_count do not match.

It is not related to those. I see two likely reasons:
1) Device needs more initialization; in the dump we see a "Actuators 
Enable" command sent first, and then the vendor report 64 three times 
with various data.
2) Reports 21+22 are transmitted as control transfers in the dump. I'll 
have to check whether we are doing the same.

>> If nothing else helps, I guess we need a dump from windows for this as well.
>>
>>> Can you tell,
>>> is there some way to monitor reports in kernel?
>> You can set debug=2 for hid module, but it will produce very much output.
> I found where to get outgoing data, added 2 dbg_hid() loggers, now
> have to find right place for incoming reports.
> 


-- 
Anssi Hannula


  reply	other threads:[~2009-02-12 18:42 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-30 19:45 hid-pidff bug: fails to find all required reports of saitek gamepad Dmitriy Geels
2009-02-02 15:50 ` Anssi Hannula
2009-02-02 18:29   ` Dmitriy Geels
2009-02-02 18:48     ` Dmitriy Geels
2009-02-07 12:28     ` Anssi Hannula
     [not found]       ` <78f5d6bf0902092146x2abaf45an79e4546e75a80356@mail.gmail.com>
2009-02-10  7:49         ` Dmitriy Geels
2009-02-10  7:49         ` Fwd: " Dmitriy Geels
2009-02-10 16:06         ` Anssi Hannula
2009-02-11  9:12           ` Dmitriy Geels
2009-02-11 16:27             ` Anssi Hannula
2009-02-12 18:06               ` Dmitriy Geels
2009-02-12 18:42                 ` Anssi Hannula [this message]
2009-02-13  8:33                   ` Dmitriy Geels
2009-02-13 19:43                     ` Anssi Hannula
     [not found]                       ` <78f5d6bf0902141125m1bf9ac00xb2b414e81d81b869@mail.gmail.com>
     [not found]                         ` <49972478.3060207@gmail.com>
2009-02-14 22:33                           ` Dmitriy Geels
2009-02-17 12:16                             ` Dmitriy Geels
2009-02-18 15:45                               ` Anssi Hannula
2009-02-19  6:56                                 ` Dmitriy Geels
     [not found]                                 ` <78f5d6bf0902182254v191cc485x62eb211baaddd36@mail.gmail.com>
     [not found]                                   ` <499D7C66.6090000@gmail.com>
2009-02-26 21:21                                     ` Dmitriy Geels
2009-02-27 16:24                                       ` Anssi Hannula
2009-03-02 18:41                                         ` Dmitriy Geels
2009-03-02 20:35                                           ` Anssi Hannula
2009-03-03  6:28                                             ` Dmitriy Geels
2009-03-03 18:35                                               ` Dmitriy Geels
2009-03-07 14:38                                                 ` Anssi Hannula
2009-03-08  5:18                                                   ` Dmitriy Geels
2009-03-08 10:16                                                     ` Anssi Hannula
2009-03-09 19:08                                                       ` Dmitriy Geels
2009-05-07 23:45                                                         ` Anssi Hannula
2009-05-07 23:57                                                           ` Anssi Hannula
     [not found]                                                             ` <78f5d6bf0906041227w3a58bde0u554a3d3336e17fa6@mail.gmail.com>
2009-06-06 12:14                                                               ` Anssi Hannula
2009-06-09  5:02                                                                 ` Dmitriy Geels
2009-06-09  6:09                                                                   ` Alek Du
2009-06-09  7:37                                                                     ` Dmitriy Geels
2009-06-11  9:38                                                                     ` Dmitriy Geels
2009-06-11 20:11                                                                       ` Dmitriy Geels
2009-07-09 17:41                                                                         ` Dmitriy Geels
2009-07-09 17:58                                                                           ` Anssi Hannula
2009-11-06  9:06                                                                             ` Dmitriy Geels
2009-11-09 12:00                                                                             ` Dmitriy Geels
2009-11-20 14:17                                                                               ` Dmitriy Geels

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49946D7A.408@gmail.com \
    --to=anssi.hannula@gmail.com \
    --cc=dmitriy.geels@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.