# MDNS and DNS Service Discovery library

**URL:** <https://community.particle.io/t/mdns-and-dns-service-discovery-library/9550>\
**Category:** Libraries\
**Created:** [January 22, 2015, 9:44pm UTC](https://community.particle.io/t/mdns-and-dns-service-discovery-library/9550 "2015-01-22T21:44:45Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mars](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mars/32/3588_2.png) [@mars](https://community.particle.io/u/mars)\
**Post date:** [October 15, 2015, 2:50pm UTC](https://community.particle.io/t/mdns-and-dns-service-discovery-library/9550/4 "2015-10-15T14:50:05Z")

</div>

First off, great work @mrhornsby - thanks!

I tried the library referenced here but couldn't get it to compile on the Photon (yet)

> [@Spark Core and MDNS](https://community.particle.io/t/spark-core-and-mdns/4945):
>
> Spark Core and MDNS Here is the Spark Core port of Adafruit MDNS library. The library provides the ability to setup a name for the Spark Core and resolve it. We can name the Core anything we want, the library will append “.local” to the name and we can access the Core using the URL “name.local”. The sample application names the Core as “myspark”. If the MDNS is setup correctly then it creates a TCPServer on port 80. The Core can be accessed using the URL “[http://myspark.local](http://myspark.local)”. The server simpl…

In any case, yours seems closer to what I'm looking for.  
I'd like to use zeroconf so that a Photon can be discovered as an OSC [1] device, e.g. by TouchOsc.  
The code compiles fine and I've modified the example slightly for my purposes - changing the service to:  
`mdns.setService("udp", "osc", 8000, "OSM");`

However it's not showing up as a service (I use Bonjour Browser on a Mac) although TouchOSC on my smartphone is (same network).  
I tried as well with the example code but no joy. Is it known to work on Photon?  
I understand that some routers can drop or not propagate zeroconf messages, but I can see other devices.

Another question, have you thought about how the library could support more than one service entry? At the moment, the number of labels is fixed at 3 and only one of them can be a service.

[1] [http://opensoundcontrol.org/topic/110](http://opensoundcontrol.org/topic/110)

---

_[View the full topic](https://community.particle.io/t/mdns-and-dns-service-discovery-library/9550)._
