From owner-freebsd-usb@FreeBSD.ORG Wed Jan 30 09:39:46 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 991AB555 for ; Wed, 30 Jan 2013 09:39:46 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id EE645AA2 for ; Wed, 30 Jan 2013 09:39:45 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 372082605; Wed, 30 Jan 2013 10:39:43 +0100 From: Hans Petter Selasky To: Yuri Subject: Re: Why my USB keyboard doesn't generate scancodes? Date: Wed, 30 Jan 2013 10:40:54 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-STABLE; KDE/4.8.4; amd64; ; ) References: <5104974C.803@rawbw.com> <201301301025.20211.hselasky@c2i.net> <5108E788.6010401@rawbw.com> In-Reply-To: <5108E788.6010401@rawbw.com> X-Face: ?p&W)c(+80hU; '{.$5K+zq{oC6y| /D'an*6mw>j'f:eBsex\Gi, Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2013 09:39:46 -0000 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