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

How to use the mdns module? #343

Closed
abonshan opened this issue Jan 12, 2024 · 2 comments
Closed

How to use the mdns module? #343

abonshan opened this issue Jan 12, 2024 · 2 comments

Comments

@abonshan
Copy link

I can't get the mdns module to work with the documentation or the stuff I found in some other issues. As in I can't import EspMdns and use it. I'm guessing that I have to enable it as an "remote-component" or "extra-component" but I found no list for which components are which or an explanation on how to enable them. I would be grateful if someone could kindly clear it up for me and others facing the same questions. Thanks in advance

@Vollbrecht
Copy link
Collaborator

Vollbrecht commented Jan 13, 2024

Since esp-idf version 5 espressif started to move things that were previously directly available into there separate components registry. So in your case you are seeing that the mdns module in our code is behind the following feature gate if you look here . If you see such a feature gate where you see *comp_espressif__"component-name" with a double underscore ( __ ) in between you can use the esp-idf-sys component feature to add it as a remote component. This will automatically make it available.

For more information how you can use this esp-idf-sys feature you can have a look here

To make it short you can add it via your Cargo.toml by adding

[[package.metadata.esp-idf-sys.extra_components]]
remote_component = { name = "espressif/mdns", version = "1.2" }

You might need to add a cargo clean after adding it and then recompile

@abonshan
Copy link
Author

Thank you, that did the trick.

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants