Skip to content
Evan Carmi edited this page May 11, 2011 · 1 revision

Zero Configuration Notes

Avahi

First off, we need to install avahi on the client machines. This should be done automatically during the Ubuntu installation. But if you run into errors make sure that the following packages are installed (or install them with apt-get):

  • avahi-daemon
  • avahi-utils
  • libavahi-compat-libdnssd-dev

Publishing _roomtrol._tcp services

Once we have Avahi installed we need to ensure that clients are automatically registering themselves via multicast DNS and publishing their services.

This can be manually via bash:

avahi-publish-service "Roomtrol Client `hostname`" _roomtrol._tcp 10000

However, we want avahi-daemon to automatically publish this service. We do this by putting a file in /etc/avahi/services/roomtrol.service of:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
    <name replace-wildcards="yes">Roomtrol client on %h</name>
    <service>
        <type>_roomtrol._tcp</type>
        <port>10000</port>
    </service>
</service-group>

This should all be setup by chef during the intial system install.

Browsing for services

Once we have our clients publishing their service we can browse for services:

$ avahi-browse '_roomtrol._tcp'
+   eth0 IPv6 Roomtrol client on roomtrol-dev2              _roomtrol._tcp       local
+   eth0 IPv6 Roomtrol client on roomtrol-dev3              _roomtrol._tcp       local
+   eth0 IPv4 Roomtrol client on roomtrol-dev2              _roomtrol._tcp       local
+   eth0 IPv4 Roomtrol client on roomtrol-dev3              _roomtrol._tcp       local

Installation Notes Using ruby gem dnssd

If getting errors ensure that dns_sd.h header file is included:

sudo apt-get install libavahi-compat-libdnssd-dev

to get dns_sd.h header file included

So install the following packages: $ sudo apt-get install avahi-daemon libavahi-compat-libdnssd-dev