Yes.
In short:
- Flash your SD card
- Open up the “boot” partition and edit “config.txt”, adding “dtoverlay=dwc2” to the bottom
- Open up “cmdline.txt” and add “modules-load=dwc2,g_ether” after “rootwait”
Hint:
- Per default where is no Bonjour running on DietPi or Windows host
- You will need a fix ip adress on DietPi usb0 interface
- You will need a USB Ethernet / RNDIS Gadget driver for Windows and Mac hosts
- You will need a Internet Sharing on your Windows/Mac host
1.)
or: Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way! · GitHub
2.) Advanced Networking (Fixed IP)
nano /etc/network/interfaces and add:
## USB0 Ethernet
allow-hotplug usb0
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0
broadcast 192.168.7.255
gateway 192.168.7.1 ## ONLY if you have internet connection via usb0
or: DietPi-Cloudshell | Alternative Display
… and from now on never again use dietpi-config ==> Network to change your network settings
3.) USB Ethernet / RNDIS Gadget driver (Windows)
http://domotique.caron.ws/cartes-microcontroleurs/raspberrypi/pi-zero-otg-ethernet/
4.) Internet Sharing