cancel
Showing results for 
Search instead for 
Did you mean: 

mDNS example project

MStra.3
Associate III

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.

4 REPLIES 4
Pavel A.
Evangelist III

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

 

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.
Evangelist III
MStra.3
Associate III

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.