[Bug 1828516] Re: avahi-daemon seems unable to advertise _uscan._tcp??

Trent Lloyd trent.lloyd at canonical.com
Fri May 10 08:05:47 UTC 2019


Hi Markos,

After creating this service file, if you check the contents of
/var/log/syslog, you will see that Avahi gave an error parsing the file:

May 10 16:01:30 optane avahi-daemon[1260]: Loading service file /services/test.service.
May 10 16:01:30 optane avahi-daemon[1260]: /services/test.service: parse failure: didn't expect element <Network_Scanner>.
May 10 16:01:30 optane avahi-daemon[1260]: XML_ParseBuffer() failed at line 4: mismatched tag.
May 10 16:01:30 optane avahi-daemon[1260]: Failed to load service group file /services/test.service, ignoring.

The error here is that you used the "<" and ">" characters in the name
of your service "<Network_Scanner>" but as this is an XML format file,
those characters are reserved for the format of the XML itself. For XML,
to include such characters in the name, you need to escape them similar
to HTML by using the token < ("Less Than" or the < symbol) and >
("Greater Than" or the > symbol)

Once you do that, you will see the service file loads successfully:
May 10 16:03:49 optane avahi-daemon[1260]: Service "optane <Network_Scanner>" (/services/test.service) successfully established.

And it is now visible in avahi-browse:
=    br0 IPv6 optane <Network_Scanner>                      _uscan._tcp          local
   hostname = [optane.local]
   address = [fe80::76d4:35ff:fee0:f74c]
   port = [80]
   txt = []


Most likely a real _uscan._tcp service may need more info than this such as TXT records describing the service but hopefully it at least gets you going.

I am setting this bug as Invalid as it is not an actual bug, but simply
an error using the software. But hopefully I was able to get you in the
right direction!

Regards,
Trent

** Changed in: avahi (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to avahi in Ubuntu.
https://bugs.launchpad.net/bugs/1828516

Title:
  avahi-daemon seems unable to advertise _uscan._tcp??

Status in avahi package in Ubuntu:
  Invalid

Bug description:
  I have set up a /etc/avahi/services/scanner.service that looks like this 
                                                                      

  <?xml version="1.0" standalone='no'?><!--*-nxml-*-->
  <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
  <service-group>
  <name replace-wildcards="yes">%h <Network_Scanner></name>
  <service>
  <type>_uscan._tcp</type>
  <port>80</port>
  </service>
  </service-group>

  I expected that avahi would then advertise this service (I am shooting
  to emulate eSCL, AKA Apple AirScan)

  then I run 
  avahi-browse -t -r  -a 

  there is no service for _uscan._tcp

  As I have searched high and low to figure out how to advertise
  AppleAirScan/eSCL protocol in avahi and have not found much, perhaps I
  am doing something wrong, but seems I should get a mnimaladvertisement
  at least.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1828516/+subscriptions



More information about the foundations-bugs mailing list