mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1036] Can't add mDNS to OnDemandNonBlocking example #883
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#883
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CoderUni on GitHub (Apr 10, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1036
Basic Infos
Hardware
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
ESP Core Version: 2.4.0, staging
Description
I am trying out the OnDemandNonBlocking example in the development branch and everything works fine. I don't see any code in the example showing that the esp8266 is connected to the internet but instead it is written in the library. I also browsed through the library and pretty much got lost because there is too much code. How would I be able to add mDNS support on your OnDemandNonBlocking example? Thank you.
@tablatronix commented on GitHub (Apr 10, 2020):
Set wm.hostname and use autoconnect, then service mdns in loop as you normally do.
Ill try to add an example, if you check the DEV example it has everything in it if you are interested, still gotta get docs made
@tablatronix commented on GitHub (Apr 10, 2020):
Also check all the public functions in the .h file they all have comments.
@CoderUni commented on GitHub (Apr 11, 2020):
@tablatronix Is there any docs on how to use wm.hostname? Sorry, I've never used it once.
@tablatronix commented on GitHub (Apr 11, 2020):
DEV example has all options
@CoderUni commented on GitHub (Apr 12, 2020):
Thanks but isn't auto connect blocking? If I use setHostname and autoconnect, it won't be OnDemandNonBlocking anymore.
@tablatronix commented on GitHub (Apr 12, 2020):
Good point, maybe I can add some mdns helpers instead...
you can still use autoconnect.
@CoderUni commented on GitHub (Apr 13, 2020):
How can I make that autoconnect on demand as well? Sorry, I forgot to specifically state that it needs to be on demand as well.
@tablatronix commented on GitHub (Apr 13, 2020):
Same thing you were doing before, it doesnt change anything
@CoderUni commented on GitHub (Apr 16, 2020):
Sorry for asking again but I'm really stuck. How would I be able to implement OnDemand and NonBlocking at the same time while using mdns? Can you provide a documentation for this or an example code? Thank you.
@tablatronix commented on GitHub (Apr 16, 2020):
This might work, wm does not include mdnsh files for you, that might have been your problem
(it will if you edit the source files there is a define built in or define
WM_MDNSin you build enviroment)I added around 6 lines of code to the default example
UNTESTED
@tablatronix commented on GitHub (Apr 17, 2020):
were you able to test this ?
@CoderUni commented on GitHub (Apr 18, 2020):
Sorry for late reply, not yet. I will notify you as soon as I test it. Thanks for your solution.
@tablatronix commented on GitHub (Apr 18, 2020):
No prob
@CoderUni commented on GitHub (Apr 19, 2020):
It doesn't work for me. It says unable to connect to it.
@tablatronix commented on GitHub (Apr 20, 2020):
so ping hostname.local does nothing ?
@CoderUni commented on GitHub (May 9, 2020):
@tablatronix Sorry for late reply but it does nothing.
@tablatronix commented on GitHub (May 9, 2020):
I see what I did wrong, let me figure something out, this only would work if there were creds saved
@tablatronix commented on GitHub (May 9, 2020):
hmm this works for me only testing on sta mode, not sure is mdns works in softap
I am having trouble testing because my router does NOT multicast across wired to wireless networks.
@CoderUni commented on GitHub (May 11, 2020):
it still doesn't work for some reason. I can get in using the local ip while it is in sta mode but then using mdnsexample.local doesn't seem to work
@tablatronix commented on GitHub (May 11, 2020):
Are you sure your network domain is .local ? or you are on the same wifi ?
If you are on wired, mdns may fail across segments, some broadband routers have alt dns domains, mine has attlocal.net for example.
You might need to check a bonjour explorer app to see
@CoderUni commented on GitHub (May 11, 2020):
Ok I will check it. I am on the same wifi as the esp8266.
@CoderUni commented on GitHub (May 16, 2020):
I keep on trying and it still doesn't work. Entering the sta ip works but not the mdns.
@tablatronix commented on GitHub (May 16, 2020):
Ok ill upload this example and start from scratch. You can try that
@tablatronix commented on GitHub (May 16, 2020):
What os are you on?
@tablatronix commented on GitHub (May 18, 2020):
I added mdns to that example are you using that?
@tablatronix commented on GitHub (May 19, 2020):
I have no idea how this used to work but it does not now..
Does not work to check if mdns was included..
I have to fix this, precompiler directives are so annoying.
@CoderUni commented on GitHub (May 19, 2020):
Sorry for really late replies. I rarely check my github. I'm using my nodemcu and im using windows 10.
@tablatronix commented on GitHub (May 19, 2020):
Everytime i think I understand precprocessor macros, ill never get it.
Why can I not do
I dont get it
@CoderUni commented on GitHub (May 20, 2020):
I am not good with writing libraries but then did you include it in your .h file? I usually log every action to the console so its easier to debug whats happening.