2

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?

top 5 comments
sorted by: hot top controversial new old
[-] pelya@lemmy.world 4 points 4 weeks ago

When I'm about to plug four Pi Zeros into one Pi Four

[-] TheButtonJustSpins@infosec.pub 2 points 4 weeks ago
[-] pelya@lemmy.world 1 points 4 weeks ago

Well, uh, I hope your power supply can provide 3 Amperes.

Also you need to explain your network architecture. Does your Pi 4 connect to the internet using WiFi, and provides internet to Pi Zero? Your should see Pi Zero as USB-Ethernet card on your Pi 4, and you should be able to create a shared connection on this card from Pi 4 system settings if you connect a monitor and a mouse to your Pi 4.

[-] TheButtonJustSpins@infosec.pub 2 points 4 weeks ago* (last edited 4 weeks 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.

[-] pelya@lemmy.world 1 points 4 weeks ago
this post was submitted on 15 Oct 2024
2 points (100.0% liked)

raspberrypi

3255 readers
1 users here now

Community about the single-board computers, micro-controllers and related projects.

https://www.raspberrypi.com/

Other RaspberryPi communities on Lemmy

founded 4 years ago
MODERATORS