From owner-freebsd-usb@FreeBSD.ORG Mon Mar 14 11:16:23 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6EC5716A4CE for ; Mon, 14 Mar 2005 11:16:23 +0000 (GMT) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C82243D39 for ; Mon, 14 Mar 2005 11:16:22 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j2EBGIUQ015220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 14 Mar 2005 03:16:18 -0800 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.10/Submit) id j2EBGIDt015218; Mon, 14 Mar 2005 03:16:18 -0800 X-Authentication-Warning: hosea.tallye.com: sttng359 set sender to lorenl@alzatex.com using -f Date: Mon, 14 Mar 2005 03:16:18 -0800 From: "Loren M. Lang" To: "Loren M. Lang" Message-ID: <20050314111618.GA15137@alzatex.com> References: <20050313041923.GA16329@alzatex.com> <20050313064312.GA16791@alzatex.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7JfCtLOvnd9MIVvH" Content-Disposition: inline In-Reply-To: <20050313064312.GA16791@alzatex.com> User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C cc: freebsd-usb@freebsd.org Subject: Re: USB Mouse detected as a generic hid device. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2005 11:16:23 -0000 --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 12, 2005 at 10:43:12PM -0800, Loren M. Lang wrote: > On Sat, Mar 12, 2005 at 08:19:23PM -0800, Loren M. Lang wrote: > > I have a Wireless USB Keyboard/Mouse Combo from Compaq. The actual id > > string says G Tech China USB Wireless mouse and keyboard. The keyboard > > is detected and works fine minus all of the extra multimedia keys, but > > the mouse doesn't work at all. The mouse is captured by the uhid driver > > and not the ums driver. I'd like to fix this, if possible, and send a > > patch in. The first thing I think I should do is look at the raw hid > > descriptor table and see what's different about it. Under windows xp, > > no special drivers were needed so I'm expecting it to not be too > > difficult from a regular usb mouse. What tools are available for > > extracting the raw descriptor tables from the usb device including all > > of the standard descriptors? I'd like something that can easily report > > as much detail as usbview for linux does, plus descriptors specific for > > hid devices. >=20 > I couldn't find any already made tools for this, so I've been playing > around with c and libusbhid to examine the keyboard/mouse combo and I > think I've figured out the problem. This wireless combo appears as just > a simple device with one interface (I think) and the report for the > mouse and keyboard are combined together. Does freebsd support having > keyboard and mouse events in the same report? If not, could I do > something like catch all the events through uhid0 and inject them back > into the kernel from a user-space program? The mouse is probably pretty > simple due to moused, but I don't know how I'd inject the keyboard > events. After some further analysis, I've discovered that I can read events from /dev/uhid0 even while the keyboard is controlling the console as /dev/ukbd0, and the only events coming through uhid0 are everything but the standard keyboard keycodes. Reading from uhid0 I see events for all my keyboards extra keys like volume control and sleep, but I also see all the events coming from my mouse including axes, wheel, and all five buttons on it. I wrote a script to parse this and now I have volume control working, but I need a way to inject the mouse events back in to the system. I'd like for the ums driver to read them directly, but I'm not sure how. My other option is to modify a new version of moused and use that to inject them. I don't need to worry about vkbd since my keyboard seems to work at the same time other events are coming in on uhid0. >=20 > > --=20 > > I sense much NT in you. > > NT leads to Bluescreen. > > Bluescreen leads to downtime. > > Downtime leads to suffering. > > NT is the path to the darkside. > > Powerful Unix is. > >=20 > > Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc > > Fingerprint: CEE1 AAE2 F66C 59B5 34CA C415 6D35 E847 0118 A3D2 > > =20 >=20 >=20 >=20 > --=20 > I sense much NT in you. > NT leads to Bluescreen. > Bluescreen leads to downtime. > Downtime leads to suffering. > NT is the path to the darkside. > Powerful Unix is. >=20 > Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc > Fingerprint: CEE1 AAE2 F66C 59B5 34CA C415 6D35 E847 0118 A3D2 > =20 --=20 I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: CEE1 AAE2 F66C 59B5 34CA C415 6D35 E847 0118 A3D2 =20 --7JfCtLOvnd9MIVvH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCNXKCbTXoRwEYo9IRArJwAJ9LnA4/jRU3zBZUYCb7WlsWDId0lACfRu6b wuwd+qO7JjQtMsd2F0JRhlY= =8vFL -----END PGP SIGNATURE----- --7JfCtLOvnd9MIVvH--