Windows host commands.
I installed Bonjour then I can run the following:
-
dns-sd
Linux:
Avahi Daemon
Getting OTG working in Ubuntu
In boot partition edit config.txt and add the last line
-
dtoverlay=dwc2
In boot partition edit cmdline.txt and add
-
modules-load=dwc2,g_ether g_ether.host_addr=00:22:82:ff:ff:20 g_ether.dev_addr=00:22:82:ff:ff:22
After rootwait.
Final line will look like
-
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=970b8044-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_ether g_ether.host_addr=00:22:82:ff:ff:20 g_ether.dev_addr=00:22:82:ff:ff:22 quiet init=/usr/lib/raspi-config/init_resize.sh splash plymouth.ignore-serial-consoles
I used ifconfig with raspberrypi plugged in and not plugged in.
I found that the interface for the raspberry pi was "enp0s20f0u1i1"
I decided I want my Pi to be on ip range 192.168.200.*
I will use static IP on this for both my ubuntu host and for the machine
On the pi I set the following /etc/network/interfaces file:
-
# interfaces(5) file used by ifup(8) and ifdown(8)
-
-
# Please note that this file is written to be used with dhcpcd
-
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
-
-
# Include files from /etc/network/interfaces.d:
-
source-directory /etc/network/interfaces.d
-
-
auto lo
-
iface lo inet loopback
-
-
iface eth0 inet manual
-
-
allow-hotplug wlan0
-
iface wlan0 inet manual
-
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
-
-
allow-hotplug wlan1
-
iface wlan1 inet manual
-
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
-
-
auto usb0
-
iface usb0 inet static
-
address 192.168.200.2
-
netmask 255.255.255.0
-
gateway 192.168.200.1
-
dns-search metcarob-home.com
-
dns-nameservers 192.168.1.254
Note my dns server is 192.168.1.254. You will probably want to change it to 8.8.8.8
Restart network: (Didn't work - I ended up rebooting the pi zero
-
sudo ifdown usb0
-
sudo ifup usb0
In ubuntu I didn't have to change any files. In the menu item for the network I saw the connection appear, I selected edit connections and set up ipv4 settings as follows:
192.168.200.1
netmask 255.255.255.0
no gateway or anything else
Then the pi can ping my laptop and the internet, but it has no dns server