[MDNS] ESP32s3 cannot get IP information after invoke check_button()

ephone0
Posts: 17
Joined: Fri Oct 14, 2022 3:20 am

[MDNS] ESP32s3 cannot get IP information after invoke check_button()

Postby ephone0 » Tue Nov 01, 2022 3:31 am

Dear All:
Does anyone test the example code for mdns function.
My environment as below

idf version = v4.4.2

Board1:host name="esp32"
Board2:host name="esp32-mdns"

Board1 presses "boot key" to trigger check_button()
check_button() invokes following functions
query_mdns_hosts_async("esp32-mdns");
query_mdns_host("esp32");
query_mdns_service("_http", "_tcp");

but the console always shows
I (141670) mdns-test: Query A: esp32.local
W (143690) mdns-test: ESP_ERR_NOT_FOUND: Host was not found!
I (143690) mdns-test: Query PTR: _arduino._tcp.local
W (146790) mdns-test: No results found!
I (146790) mdns-test: Query PTR: _http._tcp.local
W (149890) mdns-test: No results found!
I (149890) mdns-test: Query PTR: _printer._tcp.local
W (152990) mdns-test: No results found!
I (152990) mdns-test: Query PTR: _ipp._tcp.local
W (156090) mdns-test: No results found!
I (156090) mdns-test: Query PTR: _afpovertcp._tcp.local
W (159190) mdns-test: No results found!
I (159190) mdns-test: Query PTR: _smb._tcp.local
W (162290) mdns-test: No results found!
I (162290) mdns-test: Query PTR: _ftp._tcp.local
W (165390) mdns-test: No results found!
I (165390) mdns-test: Query PTR: _nfs._tcp.local
W (168490) mdns-test: No results found!

Board2 presses "boot key" to trigger check_button() also gets the same result.

The device should respond for mdns query?



I think the esp32.local._http._tcp service should be started after initialise_mdns(void),right?

Do I have an incorrect operation?

Does anyone have idea? Thank you very much.
1.png
mdns package 1
1.png (4.65 KiB) Viewed 2535 times
2.png
mdns package 2
2.png (3.98 KiB) Viewed 2535 times

ephone0
Posts: 17
Joined: Fri Oct 14, 2022 3:20 am

Re: [MDNS] ESP32s3 cannot get IP information after invoke check_button()

Postby ephone0 » Fri Nov 04, 2022 6:16 am

I enabled Lwip debug and traced code for wlanif_input

I seems device does not receivce muticast packet from wlanif_input().

Is this behavior right? how can i do? :cry: :cry: :cry:

ephone0
Posts: 17
Joined: Fri Oct 14, 2022 3:20 am

Re: [MDNS] ESP32s3 cannot get IP information after invoke check_button()

Postby ephone0 » Fri Nov 04, 2022 8:51 am

I found a strange point,

In usually, muliticast MAC should 01:00:5E:00:00:FB(for IPv4)or 33:33:00:00:00:FB(for IPv6),
I see the MAC is f4:28:16:98:1a(My PC sniffer interface) that is a unicast MAC address so device sholud drop the packet in L2 layer.
But it's sample code problem, is it a bug? or I have do something for it. ~_~

Who is online

Users browsing this forum: Bing [Bot], MicroController, VivekBorse and 114 guests