Skip to main content
MStra.3
Associate III
May 24, 2024
Question

mDNS example project

  • May 24, 2024
  • 3 replies
  • 2570 views

Hello,

I have a project running on an STM32F407VE that is using FreeRTOS and lwIP.  I have a working webserver among other things.  I want to implement mDNS but it doesn't seem straightforward - never done it before.  Does anyone have some guidance or an example project?

For my application, I think I only need to respond to multicasts so I can provide my IP address if they know my hostname.  I don't need to query devices for their IP address.

Thanks,

Mike.

3 replies

Pavel A.
Super User
May 25, 2024

Read comments in this file in the CubeF4 lib. package:  Middlewares/Third_Party/LwIP/src/apps/mdns/mdns.c

 

MStra.3
MStra.3Author
Associate III
May 29, 2024

The comments in mdns.c explain what the code is doing - not how to use the code to make it do what I want it to do.  For example, what functions need to be called to start it up properly?  If that is done (some init call) then do we need to do anything else?

Mike.

Pavel A.
Super User
May 29, 2024
MStra.3
MStra.3Author
Associate III
June 13, 2024

So that example was helpful but it just pointed out that there are other things to do and that CubeMX isn't properly configuring some things.  Specifically, the netif flag was not set indicating that it was IGMP capable - which it should have been since IGMP had been enabled - a requirement to enable mDNS...I would call this a bug.

So now mDNS appears to be partly working and my device broadcasts some mDNS queries when it boots up, but it does not respond to any mDNS queries.  In reading other online posts about people having issues with mDNS it seems that there are other things that need done and I'm wondering why ST or lwIP didn't help out with this.  It appears that some MAC address filtering has to occur...  

It would just be nice if there was one place to find out how to do this on an ST part...

Mike.