Are usbhidctl/usbhidaction working?
Alexander Motin
mav at FreeBSD.org
Fri Apr 17 13:16:27 UTC 2009
Hi.
I have tried to configure multimedia buttons of my Logitech/BTC keyboard
on 8-CURRENT from March 26 and found that it is not working.
Keyboard detected as:
ugen0.2: <BTC> at usbus0
ukbd0: <BTC USB Multimedia Keyboard, class 0/0, rev 1.10/1.00, addr 2>
on usbus0
kbd2 at ukbd0
kbd2: ukbd0, generic (0), config:0x0, flags:0x3d0000
uhid0: <BTC USB Multimedia Keyboard, class 0/0, rev 1.10/1.00, addr 2>
on usbus0
As I have found keyboard supports 3 reports: #1, #2 and #3, while tools
only trying to use report #0 and fail.
I have tried to hack tools to use report 2, which is most interesting
for me, but I have found that data read from uhid device are preceded
with 0x02 byte (I think it may be report id) which confuses
usbhidaction. Here is some debug I have got from it after just stripping
first byte to make it work:
read 3 bytes: 02 02 00
2 Consumer:Volume_Decrement 1 0 echo 'Volume_Decrement' >>/qqq 1
system 'echo 'Volume_Decrement' >>/qqq'
read 1 bytes: 00
read 3 bytes: 02 00 00
read 1 bytes: 00
read 3 bytes: 02 01 00
1 Consumer:Volume_Increment 1 0 echo 'Volume_Increment' >>/qqq 1
system 'echo 'Volume_Increment' >>/qqq'
read 1 bytes: 00
read 3 bytes: 02 00 00
read 1 bytes: 00
So I have a questions:
- Are these tools are working at least for somebody now?
- Are these tools able to work with several report ids?
- Am I right that 0x02 by preceded before report is report id and
usbhidaction tool should parse/strip it?
- Is it expected way to use uhid with libusd by reading /dev/uhidX
device directly?
--
Alexander Motin
More information about the freebsd-usb
mailing list