0
  • Arch Linux
  • systemd-networkd

I want my Raspberry Pi Zero W to show up as an ethernet device to my iPad. It is doable. It's been proven to work.

The problem is in the details. After ensuring there is a usb0 device, I setup systemd-networkd. I know that the cable must support both power and data. I know that only the Power/Data USB port closer to the middle may be used. I know that the device supports UDC - USB Device Controller (which in turn supports the gadget mode (On the Go).

Requirements as I would guess:

  • Fixed address for the Pi
  • Pi is running a DHCP Server
  • Multicast DNS is on

What steps am I missing that Raspbian Jessie is apparently doing automatically?

/etc/systemd/network/10-usb0.network

[Match]
Name=usb0

[Network]
#DHCP=yes
DHCPServer=yes
DNS=8.8.8.8
Address=192.168.7.2/30
Gateway=192.168.7.1
MulticastDNS=yes

[DHCP]
#RouteMetric=10

[DHCPServer]
PoolSize=20
PoolOffset=3
DefaultLeaseTimeSec=500000
EmitDNS=yes

networkctl

networkctl
IDX LINK             TYPE               OPERATIONAL      SETUP
  1 lo               loopback           carrier          unmanaged
  2 usb0             gadget             no-carrier       configuring
  3 wlan0            wlan               routable         configured
2
  • did you perform all of the steps in the linked page?
    – jsotola
    Jun 23 '19 at 19:02
  • @jsotola Yes. The fact that networkctl yields a usb0 device indicates that the steps were successful. The guide stops there and does not go into networking details, but using Arch Linux, one needs those details. Jun 23 '19 at 19:05

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.