I’ve got a Zero set up with usb0 as g_ether and a static IP address:

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 10.14.0.15  netmask 255.255.255.0  broadcast 10.14.0.255
        ether 7e:24:7d:cc:68:7c  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I have the OTG port connected to one of the four USB ports on a 4b. I’m not sure what the next steps are to get the actual connectivity to function, though. I’ve seen posts saying that gadget mode is only supported on the USB-C port - does that only mean for using the 4b as a peripheral, or does that mean for any connectivity, even if it’s the host?

  • TheButtonJustSpins@infosec.pubOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 months ago

    The end goal will be to have none of the Pis connected to wifi; this will be a closed unit. For now, both of the Pis I’m testing with are connected to my wifi.

    I want to communicate over USB, and it seemed like ethernet-over-USB + regular web services are the easiest way to do that.

    The goal is to have each Pi Zero be able to communicate with the Pi 4b and the Pi 4b be able to communicate with each Pi Zero.

    When you say I should see it as a USB-Ethernet card, where would I see it? I only see eth0, lo, and wlan0 when I use ifconfig -a on the 4b.

    EDIT: Oh my god. My cable was bad. I swapped cables and now I can see it.