cancel
Showing results for 
Search instead for 
Did you mean: 

mDNS on LWIP TCP server

jaykay
Associate

I'm tying to setup TCP server using ethernet communications (Nucleo-F767ZI) and find that I can ping the board using the router allocated IP address but I'd like to do the same using Hostname. In STM32CubeMx .ioc file, under Network Interface Options, LWIP_ENABLE_NETIF_HOSTNAME is set to 'enable' and I've set the host name I want to use in LWIP_NETIF_HOSTNAME to 'my_lwip'. However, I still find that I cannot ping the board using the hostname. I know my router DNS is working Ok because I can ping a Raspberry Pi using it's host name.

I realize that in STM32CubeMX generated lwipopts.h #define LWIP_NETIF_HOSTNAME is set to my_lwip by default but I change this to 1 manually. Otherwise, in ethernetif.c, the statement netif ->hostname - "my_lwip" is not enabled.

I think mDNS has to be enabled in LwIP. However, under MDNS/TFTP tab in CubeMX, LWIP_MDNS is always disabled and there is no enable option in the drop-down list.  I've seen a post that suggests to enable LWIP_MDNS, LWIP_UDP and LWIP_IPV4_IGMP have to be enabled.  However, I find that LWIP_IPV4_IGMP has the same issue i.e. no enable option in the drop-down list.   Has anybody successfully enabled mDNS? Thanks.

 

 

0 REPLIES 0