From owner-freebsd-questions@FreeBSD.ORG Fri May 27 18:50:18 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11FED106564A for ; Fri, 27 May 2011 18:50:18 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id C7DE78FC1A for ; Fri, 27 May 2011 18:50:17 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.4/8.14.4) with ESMTP id p4RIoHGQ045343; Fri, 27 May 2011 12:50:17 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.4/8.14.4/Submit) with ESMTP id p4RIoHI8045340; Fri, 27 May 2011 12:50:17 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Fri, 27 May 2011 12:50:17 -0600 (MDT) From: Warren Block To: David Demelier In-Reply-To: Message-ID: References: <4DDFC302.2090400@gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Fri, 27 May 2011 12:50:17 -0600 (MDT) Cc: freebsd-questions@freebsd.org Subject: Re: Adding a devd entry for a specified uhid X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 18:50:18 -0000 On Fri, 27 May 2011, Warren Block wrote: > On Fri, 27 May 2011, David Demelier wrote: > >> Hello, >> >> I have a USB keyboard that use uhid for multimedia keys, it works pretty >> well with usbhidaction but I need to run the command by hand each time. >> >> Because I also have gamepad that are uhid too, I would like to get the >> vendor and product id of this keyboard uhid to match the good hid device >> with devd and do not try to run usbhidaction on the gamepad. >> >> usbconfig need ugenx.y to deal with vendor and product id so how can I know >> the vendor and product id of my uhid device ? > > devd returns a device-name value. I thought there was an example in the > scanner section of the Handbook, but no. A rough example: > > attach 20 { > device-name "ugen[0-9].[0-9]"; > match "vendor" "0x09999"; > match "product" "0x9999"; > action "/usr/bin/usbhidaction $device-name ..."; > }; Which should be "-f $device-name"...