Enable USB-C Ethernet

Hi all,

I am trying to enable Ethernet via the USB-C port on a Raspberry Pi 4B 8GB Rev 1.5.

There are a few places online and also some videos on YouTube detailing how to do this but they assume that the OS is Raspberry Pi OS.

I have Endeavour up and running my Pi. The end goal is to be able to plug the device into my laptop via the Pi USB-C port. The laptop powers the Pi and ethernet is also enabled on the same connection.

This seems like a really trivial thing to get going on Raspberry Pi OS.

Currently, I have edited my /boot/config.txt to be…

# See /boot/overlays/README for all available options

dtparam=audio=on
# dtoverlay=vc4-kms-v3d
display_auto_detect=1
disable_overscan=1
initramfs initramfs-linux.img followkernel

#Uncomment - to - enable - bluetooth
#dtparam=krnbt=on

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[all]
dtoverlay=vc4-kms-v3d,dwc2,dr_mode=peripheral

I commented out the dtoverlay at the top and added it to the [all] section, and added the two extra properties. dwc2 and dr_mode=peripheral.

I also edited my /boot/cmdline.txt to be…

root=UUID=2a9818bf-eb50-4f31-85b2-bd40d6f82e06 rootflags=subvol=@ rootfstype=btrfs fsck.repair=no rw modules-load=dwc2,g_ether rootwait console=serial0,115200 console=tty1 fsck.repair=yes usbhid.mousepoll=8 usbhid.mousepoll=8

I added the modules-load section.

There is a good and to-the-point video on YouTube of the setup.
Raspberry Pi iPad Pro Setup Explained (Tech Craft)

I am just looking to emulate this functionality on Endeavour but not sure how the setup might differ. Currently, there is no extra network device showing up so I am guessing there has to be something that needs to be done differently.

Any help would be greatly appreciated.

Thanks,

FS

Maybe this helps?

Unrelated to this topic but I just noted that you have both fsck.repair=no and fsck.repair=yes in /boot/cmdline.txt. You might want to remove the latter.

Yeah, I saw that. But I didn’t add that. That was present from the initial EndeavourOS install.

Which option should it be or which is better for BTRFS?

So I have gotten a little further with this but still not where I need to be.

I now have the usb0 interface showing up when I run ifconfig -a. I have set up the interface with a static IP using nmtui and activated the connection. The RNDIS/Ethernet Gadget interface appears on my Mac when connected and I have set a static IP on it using the same range/subnet as on the Pi. I am not able to ping or communicate between the two devices still though.

Any ideas what my issue could be? Could the firwewalld be a factor or do I need to do something with IP tables or the kernel routing table perhaps?

Thanks,

FS

If I am not mistaken the “regular” fsck will not work with BTRFS at all.
So if that is true, there is no benefit to having fsck.repair=XX in the boot command line.
For EXT4 is another story.

Perhaps @Pudge and/or @sradjoker might be able to shed more light on this.

1 Like

Yes you’re right.

2 Likes