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. – Ephemeral Dec 28 '19 at 10:06sudo dmesg
output`[ 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`
I tested the cable and the 0 turns on.
– Rusty Dec 28 '19 at 15:11POWER supply
for your RPi 4 ? (please, again edit your question with this informations) – Ephemeral Dec 29 '19 at 04:12~120mA * 4
for RPi-Zs. Check this link : Raspberry Pi 4 spec recommends a3 A supply
(15 W), with a minimum current of 2.5 A if downstream USB peripherals consume less than 500 mA in total. Please edit your question with your power supply specifications – Ephemeral Dec 30 '19 at 03:20eth1
andeth2
. I usesudo ifconfig eth1 10.0.0.2 netmask 255.255.255.0
(rndis_host) andsudo ifconfig eth2 10.0.0.2 netmask 255.255.255.0
(cdc_ether). I can useping -I eth1/2 10.0.0.1
orssh pi@10.0.0.1
. In your case you got:new high-speed USB device number 25 using xhci_hcd
, but in my case I have...device number X using dwc_otg
– Ephemeral Jan 01 '20 at 08:49rndis_wlan
,rndis_host
andcdc_ether
modules are loaded wherecdc_ether use rndis_host
andrndis_host use rndis_wlan
. You have :cdc_ether 1-1.4:1.0 usb0: register 'cdc_ether' at usb-0000:01:00.0-1.4, CDC Ethernet Device
, I have this but also the same line for RNDIS device and instance ofusb0
I haveeth1
andeth2
. – Ephemeral Jan 01 '20 at 08:59Thank you very much for your help and patience. What is the proper way to close out this topic?
– Rusty Jan 09 '20 at 01:09It doesn't share internet in this configuration
some other conf (mount the proper interface) must be done (tryifconfig -a
when your gadget is plugged , after a certain amount of time). To close the topic you can accept simply delete this or put an answer and accept your own answer. – Ephemeral Jan 09 '20 at 06:33