All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anssi Hannula <anssi.hannula@gmail.com>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: xerces8 <xerces8@butn.net>,
	linux-input@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: USB mouse protocol,
Date: Thu, 01 May 2008 18:29:50 +0300	[thread overview]
Message-ID: <4819E1EE.6010406@gmail.com> (raw)
In-Reply-To: <20080430141231.GA18693@suse.cz>

Vojtech Pavlik wrote:
> On Wed, Apr 30, 2008 at 04:07:06PM +0200, xerces8 wrote:
>> Vojtech Pavlik wrote:
>>
>>> On Wed, Apr 30, 2008 at 11:28:59AM +0200, xerces8 wrote:
>>>> Hi!
>>>>
>>>> I'm curious about some details in the protocol used by USB mice.
>>>> A cursory look at the "Device Class Definition for HID 1.11" documents
>>>> tells me (note this is the first USB technical document I ever read)
>>>> that a mouse can tell the host the format (the protocol) used to report
>>>> data (movement, button state etc.).
>>>>
>>>> Also a quick look into linuxv2.6.25/drivers/hid/usbhid/usbmouse.c suggests
>>>> that 8 bits are used for position.
>>>>
>>>> So my questions are:
>>>>  - is the position data always 8 bits wide ?
>>> No. The driver you need to look at is usbhid.ko, not usbmouse - that
>>> only works for the static "HID Boot Protocol", and is only useful in
>>> embedded devices.
>> Pretty hard to read there... Can I activate some debug output, to see what
>> my mouse is sending ?
> 
> Yes, #define DEBUG and possibly also DEBUG_DATA will do the trick.

Not true anymore on recent kernels. You need to enable CONFIG_HID_DEBUG
and use the debug module parameter (/sys/module/hid/parameters/debug).

-- 
Anssi Hannula

      reply	other threads:[~2008-05-01 15:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30  9:28 USB mouse protocol, xerces8
2008-04-30 11:18 ` Vojtech Pavlik
     [not found]   ` <20080430111816.GA9876-AlSwsSmVLrQ@public.gmane.org>
2008-04-30 14:07     ` xerces8
2008-04-30 14:12       ` Vojtech Pavlik
2008-05-01 15:29         ` Anssi Hannula [this message]

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=4819E1EE.6010406@gmail.com \
    --to=anssi.hannula@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=vojtech@suse.cz \
    --cc=xerces8@butn.net \
    /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.