Adding a devd entry for a specified uhid
David Demelier
demelier.david at gmail.com
Fri May 27 19:02:33 UTC 2011
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
More information about the freebsd-questions
mailing list