Subject: Re: oddity and extra buttons on USB keyboard
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Lennart Augustsson <lennart@augustsson.net>
List: netbsd-users
Date: 06/13/2005 09:31:21
Steven M. Bellovin wrote:
> In message <42ACAC2E.8050007@augustsson.net>, Lennart Augustsson writes:
>
>>Steven M. Bellovin wrote:
>>
>>>(Aside: it would be nice if there were a way to refer to usbhid devices
>>>by name instead of number, since presumably what gets recognized as
>>>uhid0 depends on the order in which the ports to which they're
>>>connected are scanned.)
>>
>>But how would you refer to it by name? There might be several devices
>>of the same kind connected. But it's a bit annoying as is, I agree.
>>I think usbhidaction should be changed so it could just try and handle
>>all available uhid devices.
>>
>>If you want a specific uhid number for your device you can always
>>pin it down by locators (either vendor&product or port number).
>>
>
>
> Good question, since there doesn't seem to be a serial number.
>
> I think that I'd be inclined to have a section name in the config file
> that matched against various parts of the device identifier. Perhaps
> it could be a tuple of vendor name, product ID, and port/hub number,
> where it did a best-match or a first-match.
A name might be nice, but NetBSD does not support string valued
locators, so it's not possible without changing the infrastructure a
lot.
>
> I see that uhid(4) speaks of a "reportid". What is that? Does it
> apply to devices that are plugged and unplugged?
>
The reportid is something a device might or might not have. Your device
presents 3 interfaces (in USB parlance) and does not use reportID.
An alternative would be for it to present one interface, but where each
of the three parts report with a different reportID. It's just an
added messyness in USB that has no right to live, but it's there.
-- Lennart