Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2013 10:40:54 +0100
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        Yuri <yuri@rawbw.com>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: Why my USB keyboard doesn't generate scancodes?
Message-ID:  <201301301040.54478.hselasky@c2i.net>
In-Reply-To: <5108E788.6010401@rawbw.com>
References:  <5104974C.803@rawbw.com> <201301301025.20211.hselasky@c2i.net> <5108E788.6010401@rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 30 January 2013 10:27:36 Yuri wrote:
> On 01/30/2013 01:25, Hans Petter Selasky wrote:
> > usbconfig -d X.Y do_request 0x81 0x06 0x2200 1 0x300
> 

Hi,

Your HID descriptor is decoded like this:

Report descriptor:
Collection type=Application page=Generic_Desktop usage=Mouse
Collection type=Logical page=Generic_Desktop usage=Mouse
Collection type=Physical page=Generic_Desktop usage=Pointer
Input   rid=26 size=1 count=1 page=Button usage=Button_1, logical range 0..1
Input   rid=26 size=1 count=1 page=Button usage=Button_2, logical range 0..1
Input   rid=26 size=1 count=1 page=Button usage=Button_3, logical range 0..1
Input   rid=26 size=1 count=1 page=Button usage=Button_4, logical range 0..1
Input   rid=26 size=1 count=1 page=Button usage=Button_5, logical range 0..1
Input   rid=26 size=3 count=1 page=0x0000 usage=0x0000 Const Array, logical range 0..1
Input   rid=26 size=16 count=1 page=Generic_Desktop usage=X, logical range -32767..32767
Input   rid=26 size=16 count=1 page=Generic_Desktop usage=Y, logical range -32767..32767
Collection type=Logical page=Generic_Desktop usage=Y
Feature rid=18 size=2 count=1 page=Generic_Desktop usage=Resolution_Multiplier, logical range 0..1, physical range 1..4
Input   rid=26 size=16 count=1 page=Generic_Desktop usage=Wheel, logical range -32767..32767
End collection
Collection type=Logical page=Generic_Desktop usage=Wheel
Feature rid=18 size=2 count=1 page=Generic_Desktop usage=Resolution_Multiplier, logical range 0..1, physical range 1..4
Feature rid=18 size=4 count=1 page=0x0000 usage=0x0000 Const Array, logical range 0..1
Input   rid=26 size=16 count=1 page=Consumer usage=AC_Pan, logical range -32767..32767
End collection
End collection
End collection
End collection
Collection type=Application page=Consumer usage=Consumer_Control
Collection type=Logical page=Generic_Desktop usage=Mouse
Input   rid=31 size=16 count=1 page=Consumer usage=AC_Pan, logical range -32767..32767
Feature rid=23 size=2 count=1 page=Microsoft usage=0xff06, logical range 0..1, physical range 1..4
Feature rid=23 size=2 count=1 page=Microsoft usage=0xff0f, logical range 0..1, physical range 1..4
Feature rid=23 size=1 count=1 page=Microsoft usage=0xff04, logical range 0..1
Feature rid=23 size=3 count=1 page=0x0000 usage=0x0000 Const Array, logical range 0..1
End collection
Input   rid=22 size=16 count=1 page=Consumer usage=Unassigned Array, logical range 0..1023
Input   rid=22 size=8 count=1 page=Microsoft usage=0xfd01 Array, logical range 1..255
Input   rid=22 size=8 count=1 page=0x0000 usage=0x0000 Const Array, logical range 1..255
Input   rid=28 size=8 count=1 page=Microsoft usage=0xff25, logical range 0..4
Input   rid=28 size=16 count=1 page=Microsoft usage=0xff26, logical range 0..65535
End collection
Total   input size 10 bytes
Total  output size 0 bytes
Total feature size 2 bytes


Work for you:

RID=22 (0x16) is the one you are receiving. This is a microsoft specific extension to the HID class.
I don't have time to look at this right now, but if you can get documentation for this HID usage, then
we could map it to a mouse button at least. Else press all the buttons on your mouse while recording USB
trace information. Then reverse engineer the values, make a nice table and I can implement it for you in
the ums driver.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301301040.54478.hselasky>