tttapa / ESP8266

Documentation and help with the ESP8266 chip/boards/modules
GNU General Public License v3.0
645 stars 283 forks source link

Needed to add a service before I could get mDNS working #57

Open MProx opened 5 years ago

MProx commented 5 years ago

Hi,

At first I couldn't get the mDNS working on my NodeMCU, but I eventually managed to get it running by adding the following line to the beginning of the loop() function:

MDNS.update();

This line is present in the mDNS example sketch, which is how I worked out that I needed it.

Thanks, M

aramperez commented 5 years ago

Out of curiosity, is mDNS working in STA mode, AP mode or both?

Thanks, Aram

MProx commented 5 years ago

I'm using it as a station on my home wifi network. I have not tried the others. I used the exact code from tttapa's tutorial, modifying only the SSID and password. The only way I could get it to work was to invoke MDNS.update() right at the beginning of loop().

aramperez commented 5 years ago

I can't get mDNS to work in AP mode :-(.

Thanks!

MProx commented 5 years ago

Hmm, does it respond to a ping (either using esp8266.local or the IP address)?

I also found that MDNS.update(); has to appear before server.handleClient(); in the loop function.

aramperez commented 5 years ago

Ok, I have my MDNS.update after server.handleClient. I'll give that a try in the new few days, I'm busy with other stuff right now.

Thanks!