How to dump HID report descriptor under Linux

You can detach and attach drivers by hand. To unbind hiddev from a
device:
cd /sys/bus/usb/drivers/hiddev
ls
Find the filename for the interface you want to unbind. Interface
filenames have the form
B-P:C.I
where B is the bus number, P is a string of port numbers separated by
periods, C is the configuration value, and I is the interface number.
Having found the filename for the interface you want to unbind, do
echo -n interface-filename >unbind
To re-attach the driver, do
echo -n interface-filename >bind



Example:
$# ls
1-3:1.0 1-5:1.0 1-7:1.0 1-7:1.1 bind module new_id uevent unbind
$# su -
Password:
$# cd /sys/bus/usb/drivers/usbhid/
$# ls
1-3:1.0 1-5:1.0 1-7:1.0 1-7:1.1 bind module new_id uevent unbind
$# echo -n 1-7:1.0 >unbind
$# echo -n 1-7:1.1 >unbind
$# lsusb -vvv | more

留言

這個網誌中的熱門文章

NMEA標準格式 -- GPS

網路 Transformer 的用途

cut,sed,awk 字串處理