From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 8 17:10:19 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9276F16A4CE for ; Fri, 8 Apr 2005 17:10:19 +0000 (GMT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F42543D2D for ; Fri, 8 Apr 2005 17:10:19 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id C57DE3C140; Fri, 8 Apr 2005 12:10:18 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 06952-01-20; Fri, 8 Apr 2005 12:10:18 -0500 (CDT) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44]) by mailgate1b.savvis.net (Postfix) with ESMTP id 9C4153BE25; Fri, 8 Apr 2005 12:10:18 -0500 (CDT) Received: from s228130hz1ew171.apptix-01.savvis.net ([10.146.4.29]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 8 Apr 2005 12:10:08 -0500 Received: from [10.254.186.111] ([66.35.239.94]) by s228130hz1ew171.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 8 Apr 2005 12:09:57 -0500 Message-ID: <4256BAE4.50207@savvis.net> Date: Fri, 08 Apr 2005 10:09:56 -0700 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040822 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Gilbert References: <16982.46075.115518.130213@canoe.dclg.ca> <4256B5EB.9080506@savvis.net> <16982.47024.135663.645297@canoe.dclg.ca> In-Reply-To: <16982.47024.135663.645297@canoe.dclg.ca> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 08 Apr 2005 17:09:57.0937 (UTC) FILETIME=[CAA51A10:01C53C5D] X-Virus-Scanned: amavisd-new at savvis.net cc: freebsd-hackers@freebsd.org Subject: Re: Tricky USB device. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2005 17:10:19 -0000 David, >>> ... I don't know if this is hindering me. The usbhid* commands >>> aren't particularly helpful. The port udesc_dump seems only to >>> work on ugen devices ... and ugen doesn't pop up for this device. > > Maksim> how about getting usb hid descriptor, parsing and dumping it? > Maksim> check out libusbhid - man usbhid(3). it might be that all > you Maksim> need to do is to create hid report and send it to the > Maksim> device. libusbhid(3) will help you with that. > > Tried that. The usb_get_report_desc() returns NULL. This is not a > complicated device --- it's not even technically a "human interface" > device. fine, so i presume usbhidctl(1) does not work on the device too. why did they made look like usb hid device then? >>> I suppose I need to know how to supress uhid ... or to make ugen >>> show up. It would also be nice to know how to generically poke >>> the interupt enpoints... > > Maksim> well comment out 'device uhid' from your kernel config and > Maksim> rebuilding the kernel should do the trick. > > I wanted to try to avoid that since I use many USB devices, but it's > a last resort kind-of-thing. well, for what i know ugen(4) will only claim the device if no other usb device driver claimed it. so if the uhid(4) claimed it than (i assume) usb interface class on the device is set to the appropriate value. > The documentation for the device describes the interface as simply > using the two interupt endpoints (read and write). another way is to hack /sys/dev/usd/uhid.c and specifically ignore (usb vendor id, usb product id) for the device in the MATCH routine. something like if (uaa->vendor == XXXX && uaa->product == XXXX) return (UMATCH_NONE); max