Skip to content
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

[BUG] mDNS unavailable in ESP32-C3 #5061

Open
TobiasPSP opened this issue May 25, 2024 · 13 comments
Open

[BUG] mDNS unavailable in ESP32-C3 #5061

TobiasPSP opened this issue May 25, 2024 · 13 comments

Comments

@TobiasPSP
Copy link

Firstly, I am new to ESPEasy so in case I overlooked something I apologize. Thanks for your awesome work!

I seem to be unable to configure or use mDNS in the latest "Display" build targeting S2/S3/C3 on a C3 Mini.
I searched for hours in the documentation but couldn't find a setting or even mention.

It appears to me that one target audience of ESPEasy are makers that are looking for a lean and generic management platform. For this audience I feel mDNS is crucial. I wouldn't be able to keep track of changing IP addresses when trying to contact devices.

Apparently, mDNS is included in ESPEasy. What am I doing wrong/missing to get it configured?

Many thanks!

@TD-er
Copy link
Member

TD-er commented May 25, 2024

I have to check, but I think it might have been disabled by me out of pure frustration as it is a continuous source of 'strange issues'.

@TD-er
Copy link
Member

TD-er commented May 25, 2024

At least I found this commit to explicitly disable mDNS for the ESP32-S2:
9aed4b0

Will look further to see why/when it was disabled for the C3 (and others???)

@TD-er
Copy link
Member

TD-er commented May 25, 2024

Also found this commit: bfe5926#diff-0e7c5ae1aa6edf7e0f181cf8990739e1ef2d9354826fc56dbd241d540e6ae507R2763
Apparently I did disable it for C3/C6 as it did cause some long stalls where the ESP became unresponsive for quite a long time (seconds)

@TobiasPSP
Copy link
Author

Thank you for looking into this. I am sorry that mDNS in ESPEasy is causing so much trouble.

Is there a chance to have an option in config to control mDNS by the user?

@TD-er
Copy link
Member

TD-er commented May 25, 2024

I did look a bit more in some commits for the recent ESP-IDF5.1 and the latest Arduino 3.0.0 code for ESP32
I guess we could try enabling it.
I can add it to a branch I'm now working on for a new plugin, so you could later test a test build.

@TD-er
Copy link
Member

TD-er commented May 25, 2024

Thank you for looking into this. I am sorry that mDNS in ESPEasy is causing so much trouble.

Not only ESPEasy.
I just asked the people from Tasmota whether they are using mDNS and this was the reply:

We do use only for Matter. For this restricted use case it does work
It is not activated for the "classic" use

Anyway I will include it in a test build, however I'm not sure it will now work with less issues compared to earlier builds where it was still enabled.

@TD-er
Copy link
Member

TD-er commented May 25, 2024

As soom as this GitHub Actions test build is ready, you can try any ESP32-xx build with "LittleFS" in the name as those have FEATURE_MDNS enabled again.

N.B. if you had a build running without "LittleFS" in the name, you need to backup your settings and rules file as the file system will be erased when moving from SPIFFS to LittleFS.

@TD-er
Copy link
Member

TD-er commented May 25, 2024

I also uploaded the build to the webflasher: https://td-er.nl/ESPEasy/latest/

@TobiasPSP
Copy link
Author

Greatly appreciated! I‘ll test and report back.

Just to clarify: will there be a setting in config showing up in mDNS-enabled builds where I would specify the mDNS name, or is this automatically using the node name?

Sorry if this sounds naive, I did wrap my head around the documentation quite extensively but mDNS doesn’t seem to be explicitly mentioned, or I possibly missed it.

Anyway, looking forward testing it. Thank you for your response and willingness to look into this.

@TD-er
Copy link
Member

TD-er commented May 26, 2024

It just uses the set hostname as mDNS
You can see the .local name on the root page

For example:
image

@TD-er
Copy link
Member

TD-er commented May 29, 2024

I will disable it again as just having mDNS enabled will cause the ESP32-C3 to have a load of 35 - 50% without doing anything else...
And it will also interfere significantly with just about anything as the background task handling this will sometimes take 200 - 500 msec which is blocking the entire system.

So it will be disabled unless you explicitly enable it for a custom build.

@TobiasPSP
Copy link
Author

Ok, I understand. I am not as quick as you are ;-) family and job taking its toll.

I was about to test tonight but if the side effects are so severe then I agree it doesn’t make sense.

So this issue is isolated to newer mc like c3/s2,3? Would a build for a classic esp32 have mDNS enabled?

@TD-er
Copy link
Member

TD-er commented May 29, 2024

I have it now disabled for all builds if it hasn't been explicitly enabled (so only for custom builds where you enable it using a define)

Later I can try to figure out whether it is related to ESP32-C3/C6 only or also for the others. (I assume they all suffer from it)

I had it enabled for a pending PR I'm working on to implement support for a lightning detector.
This is somewhat time-critical as you need to fetch the info from the sensor ASAP or else you will be missing strikes and that was exactly what was happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants