I have been working on a project that uses Pi Zeros as remote cameras. Recently, I have an application that requires them to be hardwired, so I have been experimenting with the Ethernet over USB function on the Zeros. I have it working on OS X and Linux (Ubuntu).
I followed these steps (not including the static ip): https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadget
[edit]: Changed to to using the tutorial suggested in the comments, following the Ethernet gadget section. https://www.isticktoit.net/?p=1383
However, I cannot connect the Zeros to a Pi 4 via ethernet over USB. I thought it would be the same process as my Linux computer, but the Pi 4 does not show the usb0 when the Zero is plugged in.
Are there extra steps I need to take to enable the USB interface on the Pi 4? Is there a better tutorial I could be following?
My goal is to plug 4x Zeros in to the Pi 4 via USB and control them through SSH.
Here is the dmesg when I plug the Zero into the Pi4. However the cable was tested on my laptop using the Zero.
[ 176.391762] Under-voltage detected! (0x00050005)
[ 182.631705] Voltage normalised (0x00000000)
[ 189.081934] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
[ 189.991993] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
[ 189.992184] usb 1-1-port2: attempt power cycle
[ 191.271930] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
[ 192.182002] usb 1-1-port2: Cannot enable. Maybe the USB cable is bad?
[ 192.182192] usb 1-1-port2: unable to enumerate USB device
After connecting to the power supply that came with the Pi4. It keeps repeating this block, iterating the device number each time.
[ 119.141654] usb 1-1.4: new high-speed USB device number 25 using xhci_hcd
[ 119.272720] usb 1-1.4: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 4.19
[ 119.272736] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 119.272750] usb 1-1.4: Product: RNDIS/Ethernet Gadget
[ 119.272762] usb 1-1.4: Manufacturer: Linux 4.19.75+ with 20980000.usb
[ 119.276883] cdc_ether 1-1.4:1.0 usb0: register 'cdc_ether' at usb-0000:01:00.0-1.4, CDC Ethernet Device, e2:9f:07:61:08:9f
[ 119.822601] usb 1-1.4: USB disconnect, device number 25
The pi4 power supply is 5.1V at 3.5A. As of right now I have only attempted to connect 1x Pi Zero.
libcomposite
configuration... maybe try this website for ethernet gadget configuration, it worked for me. Or maybe edit your question with the result ofsudo dmesg
when you have plug your RPi-Z Ethernet gadget.