First, if you are not already using it, I recommend Wireshark to allow you to see the packets on the network. Your code generally looks fine, although I can’t tell you for sure if it is valid for a Multicast socket. I know mIP would work for that, since mDNS and LLMNR were among my primary goals. However, with LWIP, you might need to join the Multicast group with IP 220.127.116.11.
Generally, communicating with mDNS is just simple UDP messaging. The exception though is that the MAC address is special and the IP address is special and LWIP may filter out the packets unless you join the group.
@ Valkyrie-MT - Over the last days i implement DHCP server, DNS server, mDNS & LLMNR which i will post in the cource of the week on codeshare. My question to you is if you know if Android only relies on DNS?
Ah yes. Great question. You’d think that Android, the product of a company that is so closely tied to the internet, would have a great TCP/IP implementation. Sadly on local name resolution it is by far the worst. I have rarely had Android resolve local names properly. I think it worked once for me by DNS. I believe if the device passes the hostname via DHCP, some routers will use this name for name resolution requests. I have also read that mDNS is supposed to work on Android, but never has for me. Maybe that’s changed recently.
Android local name resolution has been so bad for so long, I find it very hard to believe it’s an accident. Sadly, I have come to believe that local devices that do not rely on the internet are perceived as a threat to Google. They don’t want them to work because there is no way for them to monetize that. I also think that is why they bought NEST. What they don’t realize is that people will never want to be dependent on the Internet for home automation. Can you imagine if my TV would not turn on because the internet is down? Or if I am forced to watch a commercial when the TV starts up. The internet is an unnecessary dependency for most home automation functions. IMHO.