-
Notifications
You must be signed in to change notification settings - Fork 13.3k
mdns is not working STA and AP mode #5711
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
Comments
You need a bonjour (mDNS) service on the network (STA=Station mode, part of the network) and with AP (Access Point, own network) there is no bonjour service available so that's why it is not working. This is not an error. |
There's a possibility where mDNS can be used in AP mode, where a computer running bonjour or avahi is connected. ESP broadcasts/multicasts its mDNS name and the computer's daemon should be able to resolve this name.
|
@d-a-v I could be wrong, but I suspect that @sonukushwah221 request is to be able to use mdns in STA_AP mode on both interfaces at the same time. I haven't tested with the @LaborEtArs implementation, but at least the legacy class would work ether in STA mode, or in AP mode, or only on the STA interface when in STA_AP mode when connected to a router, or only on the AP interface when STA was disconnected. It would not work on both interfaces when STA was connected. |
Currently LEAmDNS will work in STATION OR AP mode, not in both. If both are activated, the AP netif is used as the multicast interface. |
For me it is not working in AP mode. When STA or both are enabled it is working. |
Is it possible for you to try PR #6224 ? |
I'm commenting on this open bug after finding at least #2602 and #6290 (already resolved)
I've tested various versions -- 2.3.0 and 2.4.0 definitely work as expected both ways. This lines up with 2.5.0 including an mDNS rewrite. As a workaround for now, I've copied the library from 2.4.2 and I'm depending on that instead of the one bundled with the esp8266 core. |
Do you call this function after changing the wifi mode? Arduino/libraries/ESP8266mDNS/src/ESP8266mDNS_Legacy.h Lines 86 to 87 in 8a6a7f7
|
I'm not "changing" the wifi mode (at run time). I'm changing the source code, recompiling, and re-flashing. Like I wrote above. |
So is the one bundled with the esp8266 core still broken? How do I check what version is included now in the core I am running? |
A major update has landed in current git version. mDNS is now interface agnostic. Can you try it ? |
2.7.4 seems to work as expected but I'm not prepared to build from source to test that. |
Hello
I want to use mDns service with AP and STA mode but it's working fine in the AP mode but it's not working in the STA mode. please share the suggestions and solutions how we can access this mdns in both mode.
The text was updated successfully, but these errors were encountered: