From owner-freebsd-questions@FreeBSD.ORG Fri May 27 19:02:33 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 3C88F106564A for ; Fri, 27 May 2011 19:02:33 +0000 (UTC) (envelope-from demelier.david@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id BE0998FC0A for ; Fri, 27 May 2011 19:02:32 +0000 (UTC) Received: by wyf23 with SMTP id 23so1985512wyf.13 for ; Fri, 27 May 2011 12:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=bBnjMRQNehI4j9xt2GLK2tVNeywWnhE8dMGOi4Mpzf4=; b=rm2GJvIeCovdRTbjhwYISsrWIZdQojaknQkj3QNU19/wn+D7fGj5tBm+NhwyHWhBFM mhO1pFunhpYjepgZMtV9ITDig5n4BdaLxEJ3eDzqADarsXIz8T1Mhlz6oV+75GhbCXgq XYVg+1IlyRhgStrHCKQDoBastQ+g7LiJVFmOk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=rxyNF6urJeIx9FCQVnF8AE+T3BRRouqokmNtzm+IEzOBRNiFUMUunfNCmn0H3JJq+P rdYJtJf8mZT0/V+Q0qjiDlHM7rg/i/GVl6VgCjZ7o0nWYuOuIYAweJnBzun3vDh48IXL 7MQFVZ/tqQkJ1bIXbyISMPOE2PRK6zE6JYAhs= Received: by 10.227.132.210 with SMTP id c18mr2448494wbt.44.1306522951492; Fri, 27 May 2011 12:02:31 -0700 (PDT) Received: from Melon.malikania.fr (65.21.102.84.rev.sfr.net [84.102.21.65]) by mx.google.com with ESMTPS id ej7sm1385920wbb.19.2011.05.27.12.02.29 (version=SSLv3 cipher=OTHER); Fri, 27 May 2011 12:02:30 -0700 (PDT) Message-ID: <4DDFF4F4.4020300@gmail.com> Date: Fri, 27 May 2011 21:01:08 +0200 From: David Demelier User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110508 Thunderbird/3.1.10 MIME-Version: 1.0 To: Warren Block References: <4DDFC302.2090400@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 19:02:33 -0000 On 27/05/2011 20:50, Warren Block wrote: > 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"... In fact I successfully done it working with : attach 100 { device-name "uhid[0-9]+"; match "vendor" "0x046e"; match "product" "0x55a5"; action "/usr/bin/usbhidaction -f $device-name -c /etc/usbhidaction.conf"; }; I saw the vendor and product id using usbconfig show_ifdrv : ugen0.3.1: uhid0: Cheers, -- David Demelier