-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MDNS problems (IDFGH-14160) #14962
Comments
You can check the mDNS status with the command below.
|
@nopnop2002 Thanks for your response. Unfortunately with that command I still don't see my ESP device. Only local stuff from the Ubuntu computer where the command is issued from.
|
Can you stop this local DNS server?
|
@nopnop2002 Ok. I stopped the local server. Now things are looking a bit more promising :
However I can't resolve esp-server :
or esp-server.local :
Here is my function on the esp device which starts the mdns server. I have also attached a copy of my
|
The following is not required.
Now I think you can ping server.local. This is the code I often use.
|
@nopnop2002 I have tried both of these but unfortunately I still get |
A simple sample is here. When you run it, it will respond to ping.
|
@nopnop2002 I flashed that sample, and unfortunately I can't ping the mdns name still from my Ubuntu computer (Only the IP address directly).
I even uninstalled and re-installed avahi daemon and utils. Checking
Now
So it does resolve, but still can't ping it:) Frustrating. Do I need to modify anything in the |
No. The avahi daemon on Ubuntu is an mDNS responder that responds to requests destined for Ubuntu. The avahi daemon on Ubuntu Respond to the following requests:
Does this work? I have two ubuntu's. One hostname is backup-server and the other hostname is Lenovo-S500. Both machines have the avahi daemon running. When I run the following from Lenovo-S500, the backup-server avahi daemon responds.
When I stop the avahi daemon on backup-server, it becomes unresponsive. |
@nopnop2002 Thanks. In the end, to get this to work, I had to re-install avahi daemon with the utils. Then I modified Only now I can ping the hostames from Ubuntu when running those ESP mDNS server examples. |
Closing as it as resolved and unrelated to IDF code. Thanks to @pavel808 and @nopnop2002 for the investigation, testing, and providing guidance. |
Answers checklist.
General issue report
I am trying to get mdns working for my project. I am referencing the following documentation :
https://docs.espressif.com/projects/esp-protocols/mdns/docs/latest/en/index.html
About my project. It is an application which runs on an ESP32-S3 on an ESP Thread Borer Router board.
The application has a HTTP server running which allows clients like CURL to communicate with it over Wi-Fi.
Obviously having a hostname assigned would be the best so that the HTTP client doesn't have to remember the local IP address every time. I am trying to set the hostname as "server".
Here is my below code in my
app_main.cpp
and also some of the terminal output when my application starts.I start the mdns service before the HTTP server.
From the logs it appears to set the hostname ok. Regardless, it is not possible to ping the hostname from anywhere on the same local network.
I also notice that on my router, I can see that hostname "espressif" gets assigned, via the sdkconfig file :
CONFIG_LWIP_LOCAL_HOSTNAME="espressif"
Any help with this would be greatly appreciated. Thanks.
Here is some of the terminal output from the application on startup :
The text was updated successfully, but these errors were encountered: