Page 1 of 1

[Solved]How to build "esp-protocols" package for idf v5.0

Posted: Tue Dec 06, 2022 12:32 am
by ephone0
Dear Sirs:
The MDNS is isolated for idf v5.0 and hence I downloaded the esp-protocols from https://github.com/espressif/esp-protocols for mdns.
but, I don't know how to correctly use the package, I always get fail when I use eclipse to build it.

Could anyone tell me how to correctly use esp-protocols package, please?

Thank you.

Re: How to build "esp-protocols" package for idf v5.0

Posted: Wed Dec 07, 2022 6:59 am
by ESP_Mahavir
Please see guidelines for IDF removed components here: https://docs.espressif.com/projects/esp ... nents.html

For mdns case, you can add this component to your project by following command:

Code: Select all

idf.py add-dependency espressif/mdns^1.0.7

Re: How to build "esp-protocols" package for idf v5.0

Posted: Wed Dec 07, 2022 9:20 am
by ephone0
Dear ESP_Mahavir:
Thank you very very much to reply to me, I see the URL your mentioned before I pose this question.

But I'm confused,
For v4.4.3, I can use eclipse (new->New Project->ESP IDF Project->from ESP IDF template) to open a ESP32S3 project, because mdns example already exists in the template list.

For v5.0, I don't know how to use eclipse to add the MDNS example, I try to do it as below.
1. Download esp-protocols package
2. copy common_components & components/mdns to C:\Espressif\frameworks\esp-idf-v5.0\componests
3. copy esp-protocols\components\mdns\examples to C:\Espressif\frameworks\esp-idf-v5.0\examples
4. use new->New Project->ESP IDF Project->from ESP IDF template for mdns
5. I got build error.

Do you know how to integrate the package for eclipse?

Sorry, I'm not smart. :(

Re: How to build "esp-protocols" package for idf v5.0

Posted: Wed Dec 07, 2022 1:26 pm
by ESP_Mahavir

Re: How to build "esp-protocols" package for idf v5.0

Posted: Sat Dec 10, 2022 3:09 am
by ephone0
Dear ESP_Mahavir:
Thanks for advising, finally I built the example successfully.

The steps are as below.
1. Execute Eclipse
2. File->New->Espressif IDF Project to create a empty ESP32 project and name project to mdns
3. At this moment, "Install ESP-IDF components." does not show after the mouse right click.
4. Build this project.
5. "Install ESP-IDF components." could be shown after the mouse right click, when the project build is completed.
6. Then I copy all files from esp-protocols-master\components\mdns\examples to the working project folder.
7. rebuild again, I got successful, and the MDNS function works well.


BTW, If I open the example project folder by the eclipse, it cannot be recognized as ESP Project, so I cannot select the launch target to esp, how can I do to solve it?


thanks very much.