zephyr/samples/net/mdns_responder
Torsten Rasmussen 1cccc8a8fe cmake: increase minimal required version to 3.20.0
Move to CMake 3.20.0.

At the Toolchain WG it was decided to move to CMake 3.20.0.

The main reason for increasing CMake version is better toolchain
support.

Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
..
src samples: net: mdns_responder: Fix coverity resource leak issue 2021-03-09 13:10:48 +02:00
CMakeLists.txt cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
README.rst net: dns: enable dns service discovery for mdns responder 2020-11-09 16:15:02 -08:00
overlay-802154.conf net: dns: enable dns service discovery for mdns responder 2020-11-09 16:15:02 -08:00
overlay-bt.conf net: dns: enable dns service discovery for mdns responder 2020-11-09 16:15:02 -08:00
overlay-qemu_cortex_m3_eth.conf net: dns: enable dns service discovery for mdns responder 2020-11-09 16:15:02 -08:00
prj.conf net: dns: enable dns service discovery for mdns responder 2020-11-09 16:15:02 -08:00
sample.yaml

README.rst

.. _mdns-responder-sample:

mDNS Responder Application
##########################

Overview
********

This application will wait mDNS queries for a pre-defined hostname and
respond to them. The default hostname is **zephyr** and it is set in the
:file:`prj.conf` file.

Requirements
************

- :ref:`networking_with_host`

- avahi or similar mDNS capable application that is able to query mDNS
  information.

Building and Running
********************

Build and run the mdns-responder sample application like this:

.. zephyr-app-commands::
   :zephyr-app: samples/net/mdns_responder
   :board: <board to use>
   :conf: <config file to use>
   :goals: build
   :compact:

After the mdns-responder sample application is started, it will await queries
from the network.

Open a terminal window in your host and type:

.. code-block:: console

    $ avahi-resolve -4 -n zephyr.local

If the query is successful, then following information is printed:

.. code-block:: console

    zephyr.local	192.0.2.1

For a IPv6 query, type this:

.. code-block:: console

    $ avahi-resolve -6 -n zephyr.local

If the query is successful, then following information is printed:

.. code-block:: console

    zephyr.local	2001:db8::1

Lastly, resolve services using DNS Service Discovery:

.. code-block:: console

    $ avahi-browse -t -r _zephyr._tcp

If the query is successful, then the following information is printed:

.. code-block:: console

    +   zeth IPv6 zephyr                                        _zephyr._tcp         local
    =   zeth IPv6 zephyr                                        _zephyr._tcp         local
       hostname = [zephyr.local]
       address = [192.0.2.1]
       port = [4242]
       txt = []