I would like to use the Pi Zero with a few USB devices (WiFi, TV Tuner, external HDD) plugged into it while at the same time using OTG USB CDC drivers to make the Pi Zero appear as an Ethernet connection in a desktop PC. I have seen USB hubs but these appear to take over the usb connector on the Pi zero.

And yes, I know I could use the Ethernet hat then a USB to Ethernet in the PC or have the Pi be a WiFi hotspot for connection. The Ethernet is additional cables as power would also have to be provided and the WiFi is more flakey.

  • 1
    Or you could just use a proper Pi with Ethernet & a hub, because what you propose is impossible.
    – Milliways
    Feb 13 at 10:55
  • As Milliways points out, you are either a USB slave or a USB master, not both at the same time.
    – goldilocks
    Feb 13 at 16:38
  • So no chipsets/hubs have a OTG port + normal master ports?
    – Lhh92
    Feb 18 at 13:56

There are USB adaptor hats (or a cable) for Raspberry Pi zero they allow you to plug in the Raspberry PI into your computer (and be power by) as if the Raspberry PI is a Network adaptor.

Which means your host computer can access you RPI0 over network in terms of ssh/NFS/Samba etc.

Add the following to your config.txt dtoverlay=dwc2

Add the following to your cmdline.txt modules-load=dwc2,g_ether

Tutorial here with pictures. https://www.circuitbasics.com/raspberry-pi-zero-ethernet-gadget/

  • Thanks for the answer. The hats you are suggesting only allow the RPI to act as a USB slave, not as dual slave and master.
    – Lhh92
    Feb 18 at 13:55
  • I've configured my USB gadget RPI0-W into a network device at which point I use dnsmaqd to assign it a IP address and I that allows connectivity in both directions. I can login from the PI to the HOST computer and vs a versa. Feb 18 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.