1

I am new to Raspberry Pi and recently got a RB Pi 4 intending to use it as a mouse/keyboard for my laptop. The problem is that I can't find valid information about how to configure the Pi 4 as a USB gadget, either in the official documentation, or in forums.

I've spent a week or so trying to figure this out and have narrowed down a few points of confusion.

  • Do I need to edit /boot/config.txt and /boot/cmdline.txt to use dwc2 as in earlier versions of RBP? There seems to be conflicting information online. In some places, there are instructions to overlay the dwc2 controller, and in other places, the USB-C port is said to be controlled by BCM2711 SoC. If I do edit config.txt and cmdline.txt, dtoverlay -l is still unable to find any overlay.
  • Regardless of how I edit config.txt, I find that /sys/class/udc is empty. My understanding is that the USB controller is found here and needs to be copied into the gadget device interface. Is this still true on the Pi 4?
  • The physical CPU chip on my device is labeled as a BCM2711, but Raspberry Pi OS misidentifies the hardware as BCM2835 (checked with cat /proc/cpuinfo | grep Hardware). From what I've read, this is a bug and there's no consequences that should prevent me from using the Pi4 as a USB gadget. But I can't shake the feeling that the bug points to something deeper that's preventing /sys/class/udc from being populated.

I'll be very grateful if someone can help me understand these issues or even point me to the right documentation. I'm really just stuck at this point, and it seems like my knowledge of RBP and USB are too limited to get me closer to a solution.

BLUC
  • 111
  • 1

0 Answers0