-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 webserver advertise not working on core 2.5.0 #4938
Comments
#3275 (comment) |
I'm talking about advertise the devices web service in the network - this option seems to be still supported in Tasmota 3257 is about resolving the MQTT broker address on device via mDNS hostname, 4793 is about possiblity to set the mDNS on/off |
As that is a feature of the Arduino core, please try a simple arduino sketch with that, to test if the problem is in the core or in Tasmota. Thanks. |
ok - this was my plan too :) Thanks and have a nice day |
It is correct for it to be executed frequently otherwise other hosts will never know the device exists. So its neither a core or Tasmota issue - you can extend your logs by adding a similar AddLog for every driver if you like to be flooded with debugging info :) To answer your last question in your initial post - you may enable and disable mDNS with SetOption55 as documented in the Wiki here https://github.com/arendst/Sonoff-Tasmota/wiki/Commands |
thanks for clarification :) |
according to the advice from @ascillato - Thanks! I just checked the simple arduino sketch on the same D1 mini: the MDNS.addService is executed only once and works OK |
Ok. So, it is a Tasmota bug for core 2.5.0. Thanks for reporting. We had a similar problem with otaurl that now it is fixed. Another question. Have you tried the latest stage core from arduino repository? The one from today? |
Ah yes, was a bit early for me... |
I guess it should have been executed only once in core 2.3.0 too. I'll change it to being executed only once in next dev version. Pls let me know if it solves your issue as I cannot test it myself. |
according to the examples from MDNS + HTTP server sketch the MDNS.addService is called only on setup to advertise the service, after the wifi connection and HTTP server then in the loop MDNS.update() is called many times but I don't know if this was always like this or it is new approach... Of course I will test this deeply, and I will try to dig this MDNS topic more - I really like this feature - thank you 👍
I did the test again, this time on Core/SDK | STAGE/3.0.0-dev(c0f7b44) Thanks! |
Did you enable mDns with command |
@arendst I will check this deeply tomorrow on Tasmota DEV and I will let you know if is OK |
Hi @arendst I did a test:
it doesn't work, so I checked if the:
all above was correct than I added these lines in support_wifi.ino WifiCheckIp
in DEBUG_MORE we can see what is going on here I don't know if this is a best way but it works :) please see the screens below from avahi-discover, service browser on Android and browser if you want I can submit a pull request with this code but I suppose that you have better idea how to write this full correctly :) |
Great, please do the PR. Thanks. |
6.4.1.9 20190115 * Add support for Mi LED Desk Lamp with rotary switch (arendst#4887) * Fix mDNS addService (arendst#4938)
* Fix mDNS addService (arendst#4938, arendst#4951) * Add (S)SerialSend3 escape sequence \x to allow hexadecimal byte value (arendst#3560, arendst#4947) * Add SerialBridge command SSerialSend5 <hexdata>
Describe the bug
I'm trying to advertise web server
on sdk core 2.3.0 this is ok - I'm able to see the service using the avahi-discover,
but on 2.5.0 the device is not visible in network, I don't know why
of course I have
USE_DISCOVERY and WEBSERVER_ADVERTISE on in the my_user_config file
I figure out that the
MDNS.addService("http", "tcp", WEB_PORT);
is in the support_wifi.ino
to be sure that this part is executed I added a log info below
now I can see that the line MDNS.addService("http", "tcp", WEB_PORT); is executed each second - see the screenshots below
it is normal that MDNS.addService is executed each second?
how we can advertise the device on 2.5.0 maybe something was changed in the core version?
Thanks
Also, make sure these boxes are checked [x] before submitting your issue - Thank you!
status 0
:To Reproduce
program device with lates verion compiled on sdk 2.5.0
try to find the http service from device in network via avahi-discover
Expected behavior
be able to see the http service via avahi-discover
Screenshots
The text was updated successfully, but these errors were encountered: