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

Mdns not working in bridge example (IDFGH-14428) #15208

Closed
3 tasks done
abeer0348 opened this issue Jan 14, 2025 · 0 comments
Closed
3 tasks done

Mdns not working in bridge example (IDFGH-14428) #15208

abeer0348 opened this issue Jan 14, 2025 · 0 comments
Labels
Resolution: Duplicate This issue or pull request already exists Status: Done Issue is done internally

Comments

@abeer0348
Copy link

abeer0348 commented Jan 14, 2025

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

ESP-IDF Version: v5.3.1
Project: Bridge Example
I am trying to run mDNS in a bridge configuration, but it appears to be non-functional.
Initially, I used the default configurations:

CONFIG_MDNS_PREDEF_NETIF_STA=y
CONFIG_MDNS_PREDEF_NETIF_AP=y
CONFIG_MDNS_PREDEF_NETIF_ETH=y

However, it did not work as expected.
Next, I registered the bridge network interface using mdns_register_netif and called the mdns_netif_action function, but the output remained the same. I also increased the maximum number of interfaces:

MDNS_MAX_INTERFACES=5

After that, I disabled the predefined network interfaces and tried again by registering only the bridge network interface:

# CONFIG_MDNS_PREDEF_NETIF_STA is not set
# CONFIG_MDNS_PREDEF_NETIF_AP is not set
# CONFIG_MDNS_PREDEF_NETIF_ETH is not set

Despite these changes, mDNS still does not seem to work.

Question:

Is mDNS support for the bridge configuration not implemented, or am I missing something?

Code

esp_err_t err = mdns_init();
if (err != ESP_OK)
{
    ESP_LOGE(TAG, "Failed to initialize mDNS: %s", esp_err_to_name(err));
    return;
}

err = mdns_hostname_set("mywebbie");
if (err != ESP_OK)
{
    ESP_LOGE(TAG, "Failed to set hostname: %s", esp_err_to_name(err));
    mdns_free();
    return;
}

ESP_LOGI(TAG, "mDNS hostname set to: %s", "mywebbie");

const char *instance_name = "Webbie Device";
err = mdns_instance_name_set(instance_name);
if (err != ESP_OK)
{
    ESP_LOGE(TAG, "Failed to set instance name: %s", esp_err_to_name(err));
}
else
{
    ESP_LOGI(TAG, "mDNS instance name set to: %s", instance_name);
}
ESP_ERROR_CHECK(mdns_register_netif(br_netif));
ESP_ERROR_CHECK(mdns_netif_action(br_netif, MDNS_EVENT_ENABLE_IP4 /*| MDNS_EVENT_ENABLE_IP6 */ | MDNS_EVENT_IP4_REVERSE_LOOKUP | MDNS_EVENT_IP6_REVERSE_LOOKUP));
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 14, 2025
@github-actions github-actions bot changed the title Mdns not working in bridge example Mdns not working in bridge example (IDFGH-14428) Jan 14, 2025
@euripedesrocha euripedesrocha closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2025
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Duplicate This issue or pull request already exists and removed Status: Opened Issue is new labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate This issue or pull request already exists Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

3 participants