mDNS Slow Response / Delay

User avatar
seraffimo
Posts: 6
Joined: Wed May 19, 2021 2:46 am

mDNS Slow Response / Delay

Postby seraffimo » Wed Sep 15, 2021 7:55 pm

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 2152 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?

danielciencia
Posts: 1
Joined: Thu Oct 10, 2019 10:57 am

Re: mDNS Slow Response / Delay

Postby danielciencia » Sat Apr 20, 2024 1:45 pm

Hi!
I have the same problem
Did you have encounter some solution?
Thanks in advaced

Who is online

Users browsing this forum: atx823, Bing [Bot], MicroController and 147 guests