Hi, I have 2 devices running lwip with mdns responder enabled. My mdns setup code:
mdns_resp_init(); mdns_resp_add_netif(my_netif, "BGW", 255); // the name is "BGW [xx:xx:xx:xx:xx]" (xx:xx... is MAC address) // my_get_txt just call mdns_resp_add_service_txtitem(service, ip_str, strlen(ip_str)); to dislay my current ip (for verification) mdns_resp_add_service(my_netif, name, "_http", DNSSD_PROTO_TCP, 80, 120, my_get_txt, NULL); On my Linux laptop, execute avahi-discover to find the devices: $ avahi-discover Browsing domain 'local' on -1.-1 ... Browsing for services of type '_http._tcp' in domain 'local' on 3.0 ... Found service 'BGW [AC:83:F3:A0:41:C0]' of type '_http._tcp' in domain 'local' on 3.0. Found service 'BGW [AC:83:F3:A0:42:20]' of type '_http._tcp' in domain 'local' on 3.0. Service data for service 'BGW [AC:83:F3:A0:42:20]' of type '_http._tcp' in domain 'local' on 3.0: Host BGW.local (192.168.0.102), port 80, TXT data: ['IP=192.168.0.100'] Service data for service 'BGW [AC:83:F3:A0:41:C0]' of type '_http._tcp' in domain 'local' on 3.0: Host BGW.local (192.168.0.102), port 80, TXT data: ['IP=192.168.0.102'] $ avahi-browse -a --resolve + wlp3s0 IPv4 BGW [AC:83:F3:A0:42:20] Web Site local = wlp3s0 IPv4 BGW [AC:83:F3:A0:42:20] Web Site local hostname = [BGW.local] address = [192.168.0.102] port = [80] txt = ["IP=192.168.0.100"] + wlp3s0 IPv4 BGW [AC:83:F3:A0:41:C0] Web Site local = wlp3s0 IPv4 BGW [AC:83:F3:A0:41:C0] Web Site local hostname = [BGW.local] address = [192.168.0.102] port = [80] txt = ["IP=192.168.0.102"] My question is: Why both device display address : 192.168.0.102? And sometimes both devices show "BGW.local (192.168.0.100)". i.e. When I have multiple devices running on the local network, I cannot find the ip address of each device. Thanks, Axel _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users