espressif / esp-at

AT application for ESP32/ESP32-C2/ESP32-C3/ESP32-C6/ESP8266
Apache License 2.0
849 stars 715 forks source link

mDNS set by AT+MDNS stop responding after some time #352

Closed ghost closed 3 years ago

ghost commented 4 years ago

I normally set mDNS with AT+MDNS, everything works but after a few minutes I need to re-start the my device (to reinit mDNS) to be visible again.

I checked mDNS myself inside LwIP and it has same behaviour too. Is this problem inside lwip or why it happens? I use Bonjour Browser for client.

Luxin812 commented 4 years ago

Can you describe your case in detail and provide some log and the commands you send?

ghost commented 4 years ago

ATE0 AT+CWAUTOCONN=0 AT+GMR AT+CIPMUX=1 AT+CWMODE=3 "AT+CWSAP=\"%s\",\"%s\",%d,%d,%d,%d", ssid, pwd, channel, (uint8_t)encryption, "AT+CWHOSTNAME=\"%s\"", hostname); "AT+CIPAP=\"%s\",\"%s\",\"%s\"", ip_address, gateway, netmask); AT+CIPSERVERMAXCONN=3 AT+CIPSERVER=1,80 "AT+CIPSNTPCFG=1,%d,\"%s\",\"%s\",\"%s\"", timezone, svr_0, svr_1, svr_2); "AT+MDNS=1,\"%s\",\"%s\",%d", hostname, service_name, port);

But the interesting part is that I checked it myself with LwIP on nucleo board with ethernet connector and it behaves same (I just worked with lwip with STM32, I needed it for another project). mDNS stops responding after a few minutes. Might the problem inside the lwip stack? If somebody would recommend me a way how to test this issue, I would try it. I use bonjour, this is the one thing what I know to work with mDNS.

ustccw commented 4 years ago

@kurta999 Could you please providing the packets for us.

it looks like can not reproduce, at least in my test.

ghost commented 4 years ago

Could you describe a little bit how I should do it? Anyway you might be true, please tell me how did you tested it. The problem could be in bonjour too.

ustccw commented 4 years ago

@kurta999 capture the packets by wireshark or omnipeek, etc.. Looks like the following packet in my test:

mdns.zip