0

I'm trying to set up a raspberry Pi Model A (the original generation) as a USB Ethernet Gadget from DietPi (following these instructions), along with trying suggestions from several similar articles, such as those linked from it. I'm able to SSH into the pi by the ip address (192.168.44.2) over the USB Ethernet Gadget except when I enable internet sharing to it on the Mac it's connected to.

I've tried on two separate Macs, running MacOS Catalina and Monterey, so I'm confident it's not an issue with either of them, given the hardware and software are several generations apart, and I've successfully used this network sharing in the past.

I can't find anyone else online that has this issue, of a successful connection when isolated from the internet, but getting no response from identical ssh attempts when providing network sharing.

The relevant changes to configuration files are:

/boot/cmdline.txt:

root=PARTUUID=0e2887fb-02 rootfstype=ext4 rootwait modules-load=dwc2,g_ether fsck.repair=yes
 net.ifnames=0 logo.nologo quiet console=ttyAMA0,115200 console=tty1

/boot/config.txt: (only showing changes at the end)

#dtoverlay=vc4-fkms-v3d
#enable usb ethernet gadget as a peripheral on the USB A port:
dtoverlay=dwc2,dr_mode=peripheral
#the following for the pi touchscreen:
ignore_lcd=0
lcd_rotate=2

/etc/network/interfaces: (again, relevant changes from default)

##USB
allow-hotplug usb0
iface usb0 inet static
    address 192.168.44.2
    netmask 255.255.255.0
    network 192.168.44.0
    broadcast 192.168.44.255
    gateway 192.168.44.1

/etc/modprobe.d/g_ether.conf: (suggested to potentially fix an issue with some macs here

options g_ether use_eem=0

In the Mac's network settings it's connected to the RNDIS/Ethernet Gadget with manually configured ip address of 192.168.44.1, subnet mask of 255.255.255.0 and router of 192.168.44.1, as the tutorials recommended, And I'm attempting to share the network from Wi-Fi (or ethernet, on the desktop), to the RNDIS/Ethernet Gadget, again, matching all the tutorials I've seen.

DietPi's automated network connectivity tests (pinging 9.9.9.9) fails whether network sharing is on or off, though I'm unable to further test or configure anything while it's in that state of network sharing enabled, given the aforementioned issues, and the severely limited I/O of the model A (I do have it set up with the Pi 7" touchscreen, but there's no additional USB ports to add a keyboard, eithernet/wifi dongle, etc to).

3
  • I don't know what OS you are using, or more precisely what networking DietPi is using but those network settings are 6 years out of date.
    – Milliways
    Nov 20 '21 at 5:40
  • @Milliways thanks for the response, could you point me towards some more up-to-date resources for the networking settings?
    – Patrick L
    Nov 20 '21 at 7:49
  • Debian networking (using /etc/network/interfaces) was replaced in Raspbian in 2015. AFAIK it is not used in any recent OS, although it is still included in Debian - provided you disable any other networking software. I am unaware what DietPi uses. You probably followed some obsolete link.
    – Milliways
    Nov 20 '21 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.