Date: Fri, 27 May 2011 21:01:08 +0200 From: David Demelier <demelier.david@gmail.com> To: Warren Block <wblock@wonkity.com> Cc: freebsd-questions@freebsd.org Subject: Re: Adding a devd entry for a specified uhid Message-ID: <4DDFF4F4.4020300@gmail.com> In-Reply-To: <alpine.BSF.2.00.1105271249470.45242@wonkity.com> References: <4DDFC302.2090400@gmail.com> <alpine.BSF.2.00.1105271237350.45242@wonkity.com> <alpine.BSF.2.00.1105271249470.45242@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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: <BTC USB Multimedia Keyboard, class 0/0, rev 1.10/1.20, addr 3> Cheers, -- David Demelier
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DDFF4F4.4020300>