Page 1 of 1

mDNS Slow Response / Delay

Posted: Wed Sep 15, 2021 7:55 pm
by seraffimo
Has anyone seen this behavior with mDNS? I am using ESP32S2, esp-idf 4.2, running a web server on an AP, configured mDNS as such:

Code: Select all

    
    esp_err_t err = mdns_init();
    if (err != ESP_OK) {
        ESP_LOGE(TAG,"MDNS Init failed: %d\n", err);
        return;
    }
    mdns_hostname_set(MDNS_HOST_NAME); //senditfcs
    mdns_instance_name_set(MDNS_INSTANCE);

    mdns_txt_item_t serviceTxtData[] = {
        {"board", "esp32"},
        {"path", "/"}
    };

    ESP_ERROR_CHECK(mdns_service_add("ESP32-WebServer", "_http", "_tcp", 80, serviceTxtData,
                                     sizeof(serviceTxtData) / sizeof(serviceTxtData[0])));
  
When I run curl command, postman or use browser and hit the URI endpoint using [MDS_HOST_NAME].local (e.g. (curl http://senditfcs.local/...) vs using the IP address , I see a three sec delay in Wireshark as follows (note delay between frames 6 and 7):
mdns_delay.jpg
mdns_delay.jpg (716.45 KiB) Viewed 2116 times
This happens every time unless I have a keep alive header. Why is this happening? Known bug with mDNS? Am I missing a configuration?

Re: mDNS Slow Response / Delay

Posted: Sat Apr 20, 2024 1:45 pm
by danielciencia
Hi!
I have the same problem
Did you have encounter some solution?
Thanks in advaced