On Mon, Mar 20, 2017 at 03:19:12PM GMT, Martin Pieuchot wrote:
> Hello Raf,
>
> On 20/03/17(Mon) 12:54, Raf Czlonka wrote:
> > >Synopsis: usbdevs(8) and usbhidaction(1) do not agree on HID device
> > >numbering
> > >Category: system kernel
> > >Environment:
> > System : OpenBSD 6.1
> > Details : OpenBSD 6.1-beta (GENERIC.MP) #40: Sun Mar 19 19:40:41
> > MDT 2017
> >
> > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> >
> > Architecture: OpenBSD.amd64
> > Machine : amd64
> > >Description:
> > I have a USB foot pedal and, without trying all USB HID
> > device numbers, am unable verify using usbdevs(8) which one
> > did it actually attach to so that I can use usbhidaction(1)
> > in order to make use of the device.
> >
> > The device itself otherwise works fine after I "guess" the
> > uhidev.
>
> You don't need to guess anything. If you read usbhidaction(1) until the
> EXAMPLES section you'll see that it cares about uhid(4) not uhidev(4)
Hi Martin,
Going through the $SHELL history, I see that I *was* actually aware
of it - after all, there are no uhidev? device nodes under /dev.
> > uhidev3 at uhub11 port 6 configuration 1 interface 0 "Philips Speech
> > Processing product 0x091a" rev 1.00/3.02 addr 6
> > uhidev3: iclass 3/1
> > uhid2 at uhidev3: input=3, output=0, feature=0
> ^^^^^
> See, this matches what you "guessed".
>
> I agree that the output of usbdevs(8) is confusing since it doesn't show
> uhid(4) devices so better look in the dmesg.
That's exactly what had confused me!
Given there are no uhid(4) devices listed while running usbdevs(8),
first thing that came into my head was that the uhidevX listed there
corresponds to uhidX device I'm actually after.
With the "usbdevs should show me the *correct* device I'm looking
for" stuck in my head, it didn't cross my mind to look in dmesg!
Apart from something like this:
$ awk '/Philips Speech Processing/{ getline ; getline ; print $1 }'
/var/run/dmesg.boot
is there any easy way to get the USB HID device in a more
predictable/automated way?
Regards,
Raf