|
|
2 weeks ago | |
|---|---|---|
| .. | ||
| main | 2 weeks ago | |
| CMakeLists.txt | 2 weeks ago | |
| README.md | 2 weeks ago | |
| pytest_mdns_app.py | 2 weeks ago | |
| sdkconfig.ci | 2 weeks ago | |
| sdkconfig.defaults | 2 weeks ago | |
| Supported Targets | ESP32 | ESP32-S2 | ESP32-C3 |
|---|
Main purpose of this application is to test the mDNS library to correctly advertise, lookup services and hosts. The "app_test.py" logically separated from two sets of test cases 1. "ESP32 board sends queries -> Host sends answers" and 2. "Host sends queries" -> "ESP32 board sends answers". Two first sets of test cases are starting by 'testquery' and the second ones by 'start_case'.
_http._tcp service is added to be advertisedesp32-delegated._local is added and another _http._tcp service is added for this host.Open the project configuration menu (idf.py menuconfig)
Configure Wi-Fi or Ethernet under "Example Connection Configuration" menu.
Set mDNS Hostname as host name prefix for the device and its instance name in mDNS Instance Name
Build the project and flash it to the board, then run the monitor tool to view the serial output:
idf.py -p PORT flash monitor
[board-hostname].local, where [board-hostname] is preconfigured hostname, esp32-mdns by default._http._tcp on the same network to find the advertised serviceMDNS_RESOLVE_TEST_SERVICES and MDNS_ADD_MAC_TO_HOSTNAME are available, but disabled by default. If enabled, then the hostname suffix of last 3 bytes from device MAC address is added, e.g. esp32-mdns-80FFFF, and a query for test service is issued.(To exit the serial monitor, type Ctrl-].)
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
This test-app can be executed on any ESP32 board, the only required interface is WiFi and connection to a local network and tls server.