cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX deficiency: LwIP DCHP host name hard-wired

Using FreeRTOS + LwIP 2.x

In the generated file ethernetif.c you have:

err_t ethernetif_init(struct netif *netif)
{
  LWIP_ASSERT("netif != NULL", (netif != NULL));
  
#if LWIP_NETIF_HOSTNAME
  /* Initialize interface hostname */
  netif->hostname = "lwip";
#endif /* LWIP_NETIF_HOSTNAME */

Anyone using DHCP typically needs to provide a distinct host name (for example productName-serialNo). Needs a user code block here; possibly just wrap above assignment with a user code block so its generated with an easily overridable default.

Thanks!

Best Regards, Dave

PS: Example IOC to generate this code is attached.

0 REPLIES 0