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

username
Posts: 534
Joined: Thu May 03, 2018 1:18 pm

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

Postby username » Tue Jan 24, 2023 3:50 am

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 ?

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: ESP v5.0 removed mdns Why?

Postby ESP_Roland » Tue Jan 24, 2023 6:08 am


username
Posts: 534
Joined: Thu May 03, 2018 1:18 pm

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

Postby username » Tue Jan 24, 2023 12:15 pm

Thanks for responding.
Out of curiosity, Why would you guys move it to the component registry?

User avatar
mbratch
Posts: 303
Joined: Fri Jun 11, 2021 1:51 pm

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

Postby mbratch » Thu Jan 26, 2023 8:52 pm

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"

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » 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.

username
Posts: 534
Joined: Thu May 03, 2018 1:18 pm

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

Postby username » Fri Jan 27, 2023 3:59 am

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 ;-(

User avatar
mbratch
Posts: 303
Joined: Fri Jun 11, 2021 1:51 pm

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

Postby mbratch » Fri Jan 27, 2023 1:11 pm

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.

username
Posts: 534
Joined: Thu May 03, 2018 1:18 pm

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

Postby username » Sun Jan 29, 2023 5:40 am

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.
Last edited by username on Sun Jan 29, 2023 2:51 pm, edited 1 time in total.

User avatar
mbratch
Posts: 303
Joined: Fri Jun 11, 2021 1:51 pm

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

Postby mbratch » Sun Jan 29, 2023 2:39 pm

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.)

username
Posts: 534
Joined: Thu May 03, 2018 1:18 pm

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

Postby username » Sun Jan 29, 2023 2:50 pm

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.

Who is online

Users browsing this forum: Baidu [Spider] and 125 guests