2 comments

  • smw 2 days ago ago

    Anyone know of a pcie or usb? card that you can plug into a standard pc to get gadget mode (device not host) usb? It seems crazy that they don't exist for development purposes!

    • naruhodo a day ago ago

      You can solder a Zero Stem [1] onto an RPi Zero. No experience with it. I just went searching for "raspberry pi 3 UDC", because I have a spare RPi 3.

      It was mentioned in the context of Raw Gadget [2], which is a Linux kernel driver that gives more low-level control over Gadget FS. I've been reading about this problem space a little lately, and Gadget FS seems pretty versatile and just needs a kernel recompile to enable it on RPi, I believe.

      I found out about Raw Gadget on Raspberry Pi[3] just now, in reading about raw-gadget [4]:

      > Most of the Gadset subsystem interfaces (with the exception of GadgetFS and the FunctionFS-based composite function) only allow emulating USB devices of specific classes. Compared to them, Raw Gadget allows emulating USB devices of arbitary classes.

      [1] https://zerostem.io/

      [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

      [3] https://github.com/xairy/raw-gadget/blob/master/docs/setup_r...

      [4] https://github.com/xairy/raw-gadget