mDNS in the new CP firmware

Dale Ghent

I just noticed in the P02-13 release notes[1] that the mDNS responder feature of the embedded OS is now put into use. This is great. Kudos to Mike Hanson, I would guess? 

mDNS refers to multicast DNS and is a way for systems to announce a hostname (and optional services) to the local network. An app running on another system on the network can issue an mDNS request. If something on the network matches the hostname that is being requested, its IP address. This precludes the need to run your own DNS server or mess with maintaining a hostname database. It makes finding a host by name more automagic, so you don't have to hunt for a device's IP address manually. 

This can be used with APCC to connect to a CP4/5, via wifi or ethernet, without having to keep track of the IP address that's assigned to the CP in question. If you're using DHCP on your local network, this will track the change, so you don't need to hunt down and update the IP address if DHCP were to give it a different one, say after a router reboot or somesuch. I've attached a graphic on how to configure this.

mDNS is part of a modern networking concept called Zeroconf, which is a combination of mDNS and something related called DNS-SD, the "SD" meaning "service discovery." What would be *really* cool is if the CP4/5 OS could also register a DNS-SD service for its TCP and UDP server. APCC in turn can do a single mDNS query to find those advertisements and present a list of those respond. A single CP on the network would yield one response and APCC could just automatically connect to it. But if you have multiple A-P mounts with multiple CPs on your network, it can present a list of the hostnames that responded and the user can choose which one they want. 

This is the same type of setup that lets devices find services on your local network at home. Got Sonos speakers? The Sonos app on your phone finds them the same way - by doing a service discovery query.  It's one of the ways your computer can find a networked printer (or one shared by another computer) and so on. It's pretty ubiquitous in IoT things today.

Join { to automatically receive all group messages.