Page 1 of 1

ESP v5.0 removed mdns Why? (IDFGH-9213)

Posted: Tue Jan 24, 2023 3:50 am
by username
In v4.4.3 we had mdns which I was using.
Upgraded to v5.0 and its gone.
Why did they remove it from the components folder, and examples ?

Re: ESP v5.0 removed mdns Why?

Posted: Tue Jan 24, 2023 6:08 am
by ESP_Roland

Re: ESP v5.0 removed mdns Why? (IDFGH-9213)

Posted: Tue Jan 24, 2023 12:15 pm
by username
Thanks for responding.
Out of curiosity, Why would you guys move it to the component registry?

Re: ESP v5.0 removed mdns Why? (IDFGH-9213)

Posted: Thu Jan 26, 2023 8:52 pm
by mbratch
I'm not sure why it was moved. The documentation doesn't say. It tripped me up when I first changed to V5.0 from V4.4 as it wasn't noted in the 4.4 to 5.0 migration documentation.

You don't need to manually edit the yml component configuration file. The documentation for the component gives you the command to use to add the component. Once you do that, it should build just as it did before.

Code: Select all

idf.py add-dependency "espressif/mdns^1.0.7"

Re: ESP v5.0 removed mdns Why? (IDFGH-9213)

Posted: Fri Jan 27, 2023 1:37 am
by ESP_Sprite
Generally, we're moving things to the component registry because it allows us to decouple the code from ESP-IDF releases. It means those components and ESP-IDF can be developed and released individually, meaning that a release of either doesn't have to wait until issues in the other are resolved.

Re: ESP v5.0 removed mdns Why? (IDFGH-9213)

Posted: Fri Jan 27, 2023 3:59 am
by username
Thank you both for the info!

Now I just need to figure out how to do it in PlatformIO. as we dont have idf.py ;-(

Re: ESP v5.0 removed mdns Why? (IDFGH-9213)

Posted: Fri Jan 27, 2023 1:11 pm
by mbratch
ESP_Sprite wrote:
Fri Jan 27, 2023 1:37 am
Generally, we're moving things to the component registry because it allows us to decouple the code from ESP-IDF releases. It means those components and ESP-IDF can be developed and released individually, meaning that a release of either doesn't have to wait until issues in the other are resolved.
Makes sense!
username wrote:
Fri Jan 27, 2023 3:59 am
Now I just need to figure out how to do it in PlatformIO. as we dont have idf.py ;-(
Assuming PlatformIO uses ESP-IDF (and I assume it does, otherwise we wouldn't be having this discussion :)) then I think you just need to create by hand the yml file that ESP_Roland showed in his link. The `idf.py add-dependency` command just creates it for you.

Re: ESP v5.0 removed mdns Why? (IDFGH-9213)

Posted: Sun Jan 29, 2023 5:40 am
by username
Just wanted to update this for the solution incase anyone else needs to know how to do it for PlatformIO

At the root level of your project create a components folder and inside there create a mdns folder.
Then go here: https://components.espressif.com/compon ... essif/mdns
And click "download archive". Extract the contents into your components/mdns folder.

Open the root level CMakeLists.txt file (not the one in your src folder) and add "list(APPEND EXTRA_COMPONENT_DIRS)".
So it should now look simular to this (though your project(mdnsS3) will be the name of your project instead).
cmake_minimum_required(VERSION 3.16.0)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
list(APPEND EXTRA_COMPONENT_DIRS)
project(mdnsS3)
Then clean & rebuild the project.

Re: ESP v5.0 removed mdns Why? (IDFGH-9213)

Posted: Sun Jan 29, 2023 2:39 pm
by mbratch
I don't think all that manual setup is necessary. The build process creates the components subfolder. You just need to run the `idf.py add-dependency` tool and it creates the necessary yml in your source folder. The build process takes care of the rest. (A full clean beforehand is recommended.)

Re: ESP v5.0 removed mdns Why? (IDFGH-9213)

Posted: Sun Jan 29, 2023 2:50 pm
by username
I don't think all that manual setup is necessary. The build process creates the components subfolder. You just need to run the `idf.py add-dependency` tool and it creates the necessary yml in your source folder. The build process takes care of the rest. (A full clean beforehand is recommended.)
Sorry, I will edit my previous post. That explanation was for doing it in platformIO.