Bonjour and alternatives for Raspberry Pi OTG

Submitted by code_admin on Wed, 07/25/2018 - 15:49

Windows host commands.
I installed Bonjour then I can run the following:

  1. dns-sd


Avahi Daemon

Getting OTG working in Ubuntu

In boot partition edit config.txt and add the last line

  1. dtoverlay=dwc2

In boot partition edit cmdline.txt and add

  1. 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

  1. dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=970b8044-02 rootfstype=ext4 elevator=deadline 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/ 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:

  1. # interfaces(5) file used by ifup(8) and ifdown(8)
  3. # Please note that this file is written to be used with dhcpcd
  4. # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
  6. # Include files from /etc/network/interfaces.d:
  7. source-directory /etc/network/interfaces.d
  9. auto lo
  10. iface lo inet loopback
  12. iface eth0 inet manual
  14. allow-hotplug wlan0
  15. iface wlan0 inet manual
  16.     wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
  18. allow-hotplug wlan1
  19. iface wlan1 inet manual
  20.     wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
  22. auto usb0
  23. iface usb0 inet static
  24.     address
  25.     netmask
  26.     gateway
  27.     dns-search
  28.     dns-nameservers

Note my dns server is You will probably want to change it to

Restart network: (Didn't work - I ended up rebooting the pi zero

  1. sudo ifdown usb0
  2. 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:
no gateway or anything else

Then the pi can ping my laptop and the internet, but it has no dns server

RJM Article Type
Work Notes