Avahi/Bonjour/Zeroconf support

As simple as the title suggests. Could come handy discovering other devices (ie printers) that support the protocol.

The device doesn’t need to advertise itself (unless the user want it that is)

5 Likes

Maybe we should clear up the terminology slightly…
Zeroconf is the term for many technologies providing similar functionality.
“Avahi”/“Bonjour” is DNS-SD over mDNS to be concrete. I believe this to be the most useful one, but others would be very nice to have around too.
I believe this is what you are (primarily) asking for?

There are also others like SSDP, which is used for e.g. Philips Hue.
So… yeah, i appear to have implemented two varieties myself already. A well-abstracted API would have been much appreciated, and still would be a good upgrade.

1 Like

Yep. Pretty much.
I’ll have to remind here that when it was discussed in a community meeting Jolla devs weren’t in favor of a feature like that. But anyway. Maybe if many need the functionality they might change their mind.

There are three different use case:

  1. exposing services of the phone to the local network. This part usually requires a common server for all services on the device. That usually is avahi on linux.
  2. discovering services on the network. This part does not necessarily involves any service, and can be done purely at the app level. I have some code for this in kontroller (https://github.com/Julien-Blanc-tgcm/kontroller/tree/master/lib/mdns ) which i could release as a standalone library if there is interest.
  3. resolving names ending in .local . This part could also be done at the app level, however it is not really convenient, because you’ll have to resolve before creating your query if the dns name is a local one, since it won’t be resolved by the system.

IMHO the use case most people want to be addressed (and which are reasonable to expect) are 2 and 3. 1 is more of a niche usage.

1 Like

If we ever get a full featured “Suite app”/webserver on the phone, connecting through the browser with a simple hostname.local in the URL is far more user friendly than typing an IP. Even things like ssh user@hostname.local.
Depending on what you want to use it might be handy.

That’s basically the definition of niche :wink:

It doesn’t make it any less valid as a feature request though. But it would make sense to have it as slightly lower prio, if the separation can help the more common use cases to get served sooner (which isn’t necessarily the case).