raburton / esp8266

Various bits of code for ESP8266
http://richard.burtons.org/
183 stars 47 forks source link

Order of operations - NTP before mDNS breaks mDNS #14

Closed daviddpd closed 9 years ago

daviddpd commented 9 years ago

Strange issue I found using the NTP client as attempting to register on mDNS.

When NTP is called before mDNS, mDNS fails. If NTP is called after mDNS, it works just fine. I suspect that there is an issue with the SDK mDNS or UDP/epconn functions.

Submitting it here as more as FYI/documentation of the interaction.

http://bbs.espressif.com/viewtopic.php?f=7&t=908&p=3110#p3110

raburton commented 9 years ago

Interesting, thanks. I will follow the post and see what happens.

raburton commented 9 years ago

Did the response in the linked forum thread help you fix the problem?

daviddpd commented 9 years ago

Yeah ... I just posted a reply. In short, of course it was my code. Because the way I waited for ntp to complete, ipconfig.ip.addr would be undefined when going to initialize mdns_info *info. So the info->ipAddr was not set correctly.

No strictly about ifconfig being local, but it being undefined when calling the mDNS setup.

raburton commented 9 years ago

Super!