[usbproxy] Can't get usb-mitm running

  • From: blinkin <blinkin@xxxxxxxx>
  • To: usbproxy@xxxxxxxxxxxxx
  • Date: Fri, 10 Jun 2016 17:49:05 +0200

Hello, I purchased a BeagleBone Black and tried to get USBProxy running following your instructions. I tried to use the provided release image but it doesn't boot from that image. (Maybe the board boots correctly but there's no ssh server and no way to reach it from the outside? I'm waiting for the usb serial cable I just purchased to be sure...)

So I tried to compile the latest code from git following the included instructions.
The code compiles correctly on the latest debian image provided by beagleboard.org (8.4 jessie, kernel 4.4.9-rt-r25)and usb-mitm starts but I step on the same problem that user potjaune encountered in the git issue #50 (error mounting gadgetfs: no such device).
The issue has been marked closed without any information about how to prevent the error for other users. I understood that the issue is related to the patch for the gadgetfs module, but I am not sure if I patched it correctly.

This is the process I used to patch the module:
-download kernel source from https://github.com/beagleboard/linux/tree/4.4.9-ti-rt-r25
-patch the file drivers/usb/gadget/legacy/inode.c by hand, since the line numbers are no longer the same
-copy the config file from /boot folder in the BBB to .config in the downloaded kernel source directory
-add "-rt-r25" to the EXTRAVERSION line in the kernel Makefile, to match the installed kernel version exactly
-crosscompile the kernel:
-make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- prepare
-make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
-make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules
-copy compiled drivers/usb/gadget/legacy/gadgetfs.ko to the BBB user folder
-sudo insmod ./gadgetfs.ko on the BBB
the module is installed correctly i suppose (no output from insmod), and the used_by count is 0 in lsmod.

However the output of usb-mitm is the same as before.
On this mailing list you also say that there are some conflicting modules that you blacklisted in the release image, but you don't specify which they are.

Also, you say that the MUSB controller must be set to dual role, can you list the relevant lines in the .config file for the kernel? I think they are:

CONFIG_USB_MUSB_DUAL_ROLE=y
and for gadgetfs:
CONFIG_USB_GADGET=y
CONFIG_USB_GADGETFS=m

Last, to overcome these problems, I tought about using a kernel that doesn't need the patch, the 3.15 (as you say, that should be ok), but it's not present in the official beagleboard repository, where can I find it?

As a software developer, I understand the laziness and time shortage in preparing the documentation (even more when working alone on the project), but if you help me setting up a working environment, I could prepare some guides for new users about how to get usb-mitm up and running with these new versions.


--
ZE-Light e ZE-Pro: servizi zimbra per caselle con dominio email.it, per tutti i dettagli Clicca qui http://posta.email.it/caselle-di-posta-z-email-it/?utm_campaign=email_Zimbra_102014=main_footer/f

Sponsor:
Caselle con tuo dominio su piattaforma Zimbra, fino a 30 GB di spazio, 
sincronizzazione dati e backup
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=13324&d=10-6

Other related posts: