gadget做HID键盘报错
-
报错:
[ 808.059280] configfs-gadget gadget: hidg_bind FAILED
[ 808.065144] configfs-gadget 4100000.udc-controller: failed to start g1: -19
echo: write error: No such device指令:
mount -t configfs none /sys/kernel/config/
mkdir /sys/kernel/config/usb_gadget/g1
echo 0x0525 >/sys/kernel/config/usb_gadget/g1/idVendor
echo 0xa4ac >/sys/kernel/config/usb_gadget/g1/idProduct
mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409
mkdir /sys/kernel/config/usb_gadget/g1/functions/hid.usb0
echo 8 >/sys/kernel/config/usb_gadget/g1/functions/hid.usb0/report_length
echo -ne \x06\xa0\xff\x09\x01\xa1\x01\x09\x02\xa1\x00\x06\xa1\xff\x09\x03\x09\x04\x15\x80\x25\x7f\x35\x00\x45\xff\x75\x08\x95\x40\x81\x02\x09\x05\x09\x06\x15\x80\x25\x7f\x35\x00\x45\xff\x75\x08\x95\x40\x91\x02\xc0\xc0 >/sys/kernel/config/usb_gadget/g1/functions/hid.usb0/report_descecho 0xc0 >/sys/kernel/config/usb_gadget/g1/configs/c.1/bmAttributes
echo 500 >/sys/kernel/config/usb_gadget/g1/configs/c.1/MaxPower
mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409
ln -s /sys/kernel/config/usb_gadget/g1/functions/hid.usb0/ /sys/kernel/config/usb_gadget/g1/configs/c.1/
ls /sys/class/udc/ | xargs echo > /sys/kernel/config/usb_gadget/g1/UDC写指令前用了 echo "" > /sys/kernel/config/usb_gadget/g1/UDC 关闭ADB,还是说要其他方法重置gadget?
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号