LwIP and mDNS

mriksman
Posts: 9
Joined: Wed Mar 11, 2020 4:10 pm

LwIP and mDNS

Postby mriksman » Tue Jun 30, 2020 5:26 pm

Hi All,

When I call this;

Code: Select all

           
struct addrinfo hints, *res;
int status;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
char *host = "esp_942daf.local";
char *port = "5556";
status = getaddrinfo("esp_942daf.local", "80", &hints, &res)

I get

Code: Select all

EAI_FAIL
.

Looking at WireShark, I am seeing the requests;

Code: Select all

192.168.1.187   224.0.0.251   MDNS   Standard query 0x3090 A esp_942daf.local, "QM" question

But no response.

I then call immediately after the following;

Code: Select all

struct ip4_addr addr;
addr.addr = 0;
mdns_query_a("esp_99a744", 2000,  &addr);

And it correctly resolves the address. Noteably, this time the request is of type QU;

Code: Select all

192.168.1.187   224.0.0.251   MDNS   Standard query 0x0000 A esp_99a744.local, "QU" question


I also tried another mDNS hostname; a HP printer with name

Code: Select all

HPC8D9D240DB2B.local
, and

Code: Select all

getaddrinfo
resolves it correctly.

So, why isn't the ESP module responding to a QM mDNS query? Why is LwIP and mDNS using different query types? What else can I try?

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: LwIP and mDNS

Postby Her Mary » Sun Jul 19, 2020 1:17 pm


mriksman
Posts: 9
Joined: Wed Mar 11, 2020 4:10 pm

Re: LwIP and mDNS

Postby mriksman » Sun Jul 19, 2020 1:33 pm



I’ve raised an Issue on the ESP-IDF GitHub. They’ve confirmed the issue.

Who is online

Users browsing this forum: No registered users and 186 guests