2

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.

  • On adafruit tutorial i cannot see any libcomposite configuration... maybe try this website for ethernet gadget configuration, it worked for me. Or maybe edit your question with the result of sudo dmesg when you have plug your RPi-Z Ethernet gadget. – Ephemeral Dec 28 '19 at 10:06
  • 1
    @Ephemeral asked you to edit the question to add the output. The reason why you self can see it: the comment is unreadable. There is an edit link beneath your question. Please click on it and insert the output. – Ingo Dec 28 '19 at 23:47
  • 1
    @Ephemeral Thanks for the help. Updated with the information. I was using a cord plugged into my laptop, but I switched to using the power-supply that came with the Pi4. It appears to work better, but still has issues. – Rusty Dec 30 '19 at 0:26
  • 1
    @Ephemeral Thanks again. This project is definitely challenging my knowledge. Power supply specified above. 3.5A so that should work, although I am only trying to do one Pi Z for now as a trial. Still getting the same error from both tutorials. Currently set up on the one you suggested. Not sure what if any set up the Pi4 should have. I have tried both the a clean raspian lite and setting it up the same as the PiZ. – Rusty Dec 31 '19 at 20:28
  • 1
    @Ephemeral Based on your success, I did some more testing and I figured out what is happening. I set up the RPI4 using the itostick tutorial as well as the RPI-Z. It seems that this disabled the ability to use the RPI4 as a host. I deleted the itostick modifications on the RPI4 and system works. It doesn't share internet in this configuration, but that is OK for my purposes. Thank you very much for your help and patience. What is the proper way to close out this topic? – Rusty Jan 9 at 1:09
1

Very late reply, but I have done even more testing and found out more information.

  1. The RPi4 cannot be set up to be an ethernet gadget itself. Originally, I had a chain set up where the RPiZ was plugged into the RPi4, and the RPi4 was plugged into my laptop.

  2. The USB cables must be very good. A cable that successfully creates an ethernet gadget on my laptop and desktop was unable to be used with the RPi4. Changing to a better cable solved this problem.

  3. Working on this now, but the RPi4 appears to only able to handle 1 gadget at a time even though it has multiple USB ports.

| improve this answer | |

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.