0

I have two USB devices (host and device) that both support high speed. I am trying to emulate a legacy device on gadgetfs which is full speed. The host device unfortunately complains that there is something odd when it connects to the high speed device. I cannot change anything on the host. my device is a Raspberry Pi zero W.

I can not find any way to restrict the gadgetfs device to connect (negotiate?) as a full speed device. Short term I am using a usb 1.1 hub to sovle the problem. Long term this is not a viable solution.

The only reference I have found for this is in Limit USB gadget driver speed, and I would prefer not to have go into the kernel and modify the drivers.

Does anyone have any suggestion on how I could achieve this?

mw.
  • 357
  • 3
  • 18
  • Maybe I did not elaborate the details enough, this is a programming issue. I am writing a linux userspace gadgetfs driver to emulate the device and am trying to limit the the gadgetfs interface to HS. The gadgetfs API has very limited documentations. I can not find any references as to how to limit gadgetfs connections speeds. I was hoping there was a way to do this with gadgetfs, and if not some other alternative. – mw. Mar 11 '19 at 12:33
  • Do you have a git repository? I would be glad to help if I could see the code you used. – TheGreatRambler Oct 18 '19 at 02:53
  • I don't think it is possible without modifying the drivers. It has not been as big an issue as I thought it would be so I have been able to live with the problem. For reference I was originally trying to get it to work with USBProxy so that if the device was a full speed device after going through USBYproxy is would show as a full speed device to the host rather than a high speed device. – mw. Oct 18 '19 at 18:43
  • Just wondering, how did you get GadgetFS to work on the raspi zero? I have been trying to turn the Raspi Zero W into an HID device and I can't even create the device. I have been using https://github.com/ueno/libusb-gadget but it keeps erroring. I guess, I would like to see your code because you seem to have solved this. – TheGreatRambler Oct 18 '19 at 20:49
  • Please, from one dev to another, I cannot seem to get this to work!!! – TheGreatRambler Oct 19 '19 at 02:15
  • I never used libusb-gadget. I would start with the example @ http://www.linux-usb.org/gadget/usb.c. The code I used is from the USBProxy project https://github.com/usb-tools/USBProxy-legacy/blob/master/src/Plugins/Hosts/HostProxy_GadgetFS.cpp or my branch https://github.com/mweal-ed/USBProxy/blob/master/src/Plugins/Hosts/HostProxy_GadgetFS.cpp – mw. Oct 21 '19 at 12:42

0 Answers0