ESP8266 Developer Zone The Official ESP8266 Forum 2020-07-19T13:33:20+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=59047 2020-07-19T13:33:20+08:00 2020-07-19T13:33:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=59047&p=81688#p81688 <![CDATA[Re: LwIP and mDNS]]>
Her Mary wrote:
Could this help? https://github.com/espressif/ESP8266_RT ... ocols/mdns


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

Statistics: Posted by mriksman — Sun Jul 19, 2020 1:33 pm


]]>
2020-07-19T13:17:26+08:00 2020-07-19T13:17:26+08:00 https://bbs.espressif.com:443/viewtopic.php?t=59047&p=81685#p81685 <![CDATA[Re: LwIP and mDNS]]> https://github.com/espressif/ESP8266_RT ... ocols/mdns

Statistics: Posted by Her Mary — Sun Jul 19, 2020 1:17 pm


]]>
2020-06-30T17:26:49+08:00 2020-06-30T17:26:49+08:00 https://bbs.espressif.com:443/viewtopic.php?t=59047&p=80739#p80739 <![CDATA[LwIP and mDNS]]>
When I call this;

Code:

           
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:

EAI_FAIL
.

Looking at WireShark, I am seeing the requests;

Code:

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:

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:

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:

HPC8D9D240DB2B.local
, and

Code:

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?

Statistics: Posted by mriksman — Tue Jun 30, 2020 5:26 pm


]]>