Open KALRONG opened 7 years ago
Hi, Glad to hear that you enjoy my project :)
As for your issue, in those lines:
echo 1 > functions/hid.0/protocol echo 1 > functions/hid.0/subclass echo 8 > functions/hid.0/report_length echo -ne \x05\x01\x09\x06\xa1\x01\x05\x07\x19\xe0\x29\xe7\x15\x00\x25\x01\x75\x01\x95\x08\x81\x02\x95\x01\x75\x08\x81\x03\x95\x05\x75\x01\x05\x08\x19\x01\x29\x05\x91\x02\x95\x01\x75\x03\x91\x03\x95\x06\x75\x08\x15\x00\x25\x65\x05\x07\x19\x00\x29\x65\x81\x00\xc0 > functions/hid.0/report_desc
Shouldn't the folder hid.0 be hid.usb0 instead, as it's the one you created just above?
Thanks a lot for your reply!
I was actually following some instructions about how to set the HID gadget and they left it like that, I have modified the file so now it looks like this:
mkdir -p functions/hid.usb0
echo 1 > functions/hid.usb0/protocol
echo 1 > functions/hid.usb0/subclass
echo 8 > functions/hid.usb0/report_length
echo -ne \\x05\\x01\\x09\\x06\\xa1\\x01\\x05\\x07\\x19\\xe0\\x29\\xe7\\x15\\x00\\x25\\x01\\x75\\x01\\x95\\x08\\x81\\x02\\x95\\x01\\x75\\x08\\x81\\x03\\x95\\x05\\x75\\x01\\x05\\x08\\x19\\x01\\x29\\x05\\x91\\x02\\x95\\x01\\x75\\x03\\x91\\x03\\x95\\x06\\x75\\x08\\x15\\x00\\x25\\x65\\x05\\x07\\x19\\x00\\x29\\x65\\x81\\x00\\xc0 > functions/hid.usb0/report_desc
# Link everything and bind the USB device
if [ "$OS" != "MacOs" ]; then
ln -s configs/c.1 os_desc
ln -s functions/rndis.usb0 configs/c.1
fi
ln -s functions/ecm.usb0 configs/c.2
ln -s functions/acm.gs0 configs/c.2
ln -s functions/hid.usb0 configs/c.2
Now the kernel panic dissapears and I have the following message instead:
Jun 1 19:58:48 raspberrypi kernel: [ 24.081945] usb0: HOST MAC 48:6f:73:74:50:43
Jun 1 19:58:48 raspberrypi kernel: [ 24.082872] usb0: MAC 42:61:64:55:53:42
Jun 1 19:58:49 raspberrypi kernel: [ 24.102106] usb1: HOST MAC 48:6f:73:74:50:43
Jun 1 19:58:49 raspberrypi kernel: [ 24.103156] usb1: MAC 42:61:64:55:53:43
Jun 1 19:58:49 raspberrypi kernel: [ 24.124311] Modules linked in: usb_f_hid usb_f_acm u_serial usb_f_rndis bnep hci_uart btbcm bluetooth bridge stp llc brcmfmac brcmutil snd_bcm2835 snd_pcm cfg80211 snd_timer rfkill snd bcm2835_gpiomem uio_pdrv_genirq fixed uio usb_f_ecm u_ether libcomposite dwc2 udc_core ipv6 [last unloaded: usb_f_rndis]
Jun 1 19:58:49 raspberrypi kernel: [ 24.136718] CPU: 0 PID: 814 Comm: ls Not tainted 4.9.24+ #993
Jun 1 19:58:49 raspberrypi kernel: [ 24.142517] Hardware name: BCM2835
Jun 1 19:58:49 raspberrypi kernel: [ 24.148565] task: d8a48da0 task.stack: da704000
Jun 1 19:58:49 raspberrypi kernel: [ 24.154539] PC is at alloc_ep_req+0x30/0xa8 [libcomposite]
Jun 1 19:58:49 raspberrypi kernel: [ 24.160543] LR is at 0x0
Jun 1 19:58:49 raspberrypi kernel: [ 24.166582] pc : [<bf0b6fe8>] lr : [<00000000>] psr: a0000013
Jun 1 19:58:49 raspberrypi kernel: [ 24.166582] sp : da705d98 ip : 00000000 fp : da705db4
Jun 1 19:58:49 raspberrypi kernel: [ 24.178603] r10: da65c2c8 r9 : da462cc4 r8 : da65c270
Jun 1 19:58:49 raspberrypi kernel: [ 24.184763] r7 : da462ca8 r6 : d89d6e00 r5 : da65d890 r4 : 00000008
Jun 1 19:58:49 raspberrypi kernel: [ 24.190610] r3 : d89d6e34 r2 : 00000000 r1 : 00000000 r0 : d89d6e00
Jun 1 19:58:49 raspberrypi kernel: [ 24.196724] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Jun 1 19:58:49 raspberrypi kernel: [ 24.202880] Control: 00c5387d Table: 189f4008 DAC: 00000055
Jun 1 19:58:49 raspberrypi kernel: [ 24.353740] [<bf0b6fe8>] (alloc_ep_req [libcomposite]) from [<bf4437f0>] (hidg_bind+0xa0/0x258 [usb_f_hid])
Jun 1 19:58:49 raspberrypi kernel: [ 24.360802] [<bf4437f0>] (hidg_bind [usb_f_hid]) from [<bf0b20c0>] (usb_add_function+0x7c/0x164 [libcomposite])
Jun 1 19:58:49 raspberrypi kernel: [ 24.368216] [<bf0b20c0>] (usb_add_function [libcomposite]) from [<bf0b6384>] (configfs_composite_bind+0x24c/0x360 [libcomposite])
Jun 1 19:58:49 raspberrypi kernel: [ 24.375577] [<bf0b6384>] (configfs_composite_bind [libcomposite]) from [<bf079838>] (udc_bind_to_driver+0x3c/0xe0 [udc_core])
Jun 1 19:58:49 raspberrypi kernel: [ 24.383313] [<bf079838>] (udc_bind_to_driver [udc_core]) from [<bf079d68>] (usb_gadget_probe_driver+0x100/0x14c [udc_core])
Jun 1 19:58:49 raspberrypi kernel: [ 24.390890] [<bf079d68>] (usb_gadget_probe_driver [udc_core]) from [<bf0b6d10>] (gadget_dev_desc_UDC_store+0xb0/0xcc [libcomposite])
Jun 1 19:58:49 raspberrypi kernel: [ 24.398825] [<bf0b6d10>] (gadget_dev_desc_UDC_store [libcomposite]) from [<c01baf30>] (configfs_write_file+0xd4/0x17c)
Jun 1 19:58:49 raspberrypi kernel: [ 24.406483] [<c01baf30>] (configfs_write_file) from [<c0143dec>] (__vfs_write+0x38/0x128)
Jun 1 19:58:49 raspberrypi kernel: [ 24.414438] [<c0143dec>] (__vfs_write) from [<c0144c24>] (vfs_write+0xb0/0x1bc)
Jun 1 19:58:49 raspberrypi kernel: [ 24.422137] [<c0144c24>] (vfs_write) from [<c0145d34>] (SyS_write+0x54/0xb0)
Jun 1 19:58:49 raspberrypi kernel: [ 24.430213] [<c0145d34>] (SyS_write) from [<c000fe40>] (ret_fast_syscall+0x0/0x1c)
Jun 1 19:58:49 raspberrypi kernel: [ 24.446310] ---[ end trace 29bcb98f1e6e36e0 ]---
The behaviour Im getting is that everything comes up, my computer sees the usb ethernet BUT not the HID and when it seems to try to load it that message is shown and my computer shows the device as removed.
What OS are you plugging it to?
Currently on Linux: Linux 4.9.0-3-amd64 #1 SMP Debian 4.9.25-1 (2017-05-02) x86_64 GNU/Linux
Just tested on a windows 10 with the same results and message on the log.
Hi,
First thanks for your great work :) I have been using your repository for my testings on PoisonTap and love it.
I have been trying to add a keyboard gadget without much success.
I modified the gadget.sh like this:
But Im receiving a kernel panic on boot like this one:
Thanks in advance!