Senior III
February 25, 2019
Question
CubeMX deficiency: LwIP DCHP host name hard-wired
- February 25, 2019
- 0 replies
- 551 views
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.
