2023-02-21 02:06 PM
Hello,
I am wondering how to set the DHCP hostname for LwIP when using STMCubeMX. The CubeMX tool creates a definition for the hostname in ethernetif.c:
#if LWIP_NETIF_HOSTNAME
/* Initialize interface hostname */
netif->hostname = "lwip";
#endif /* LWIP_NETIF_HOSTNAME */
However, this is "hard wired" in CubeMX. If I change it manually in ethernetif.c, CubeMX rewrites it to the default value "lwip" after each change in the IOC definition. There is no option in CubeMX for the DHCP hostname.
I am using the latest FW, latest Cube tools (CubeIDE version 1.11.0, CubeMX version 6.7.0).
BTW, I found the same question in the forum, four years old
( but with no satisfactory answer.
Thanks in advance for help
Best Regards
Zdenek
Solved! Go to Solution.
2023-03-07 01:51 AM
Hi,
Thank you for raising this point.
A fix will be done to make "netif->hostname" configurable via CubeMX.
Internal ticket number: 147052
(This is an internal tracking number and is not accessible or usable by customers).
Thank you for your contribution.
Regards
Mahdy
2023-03-07 01:51 AM
Hi,
Thank you for raising this point.
A fix will be done to make "netif->hostname" configurable via CubeMX.
Internal ticket number: 147052
(This is an internal tracking number and is not accessible or usable by customers).
Thank you for your contribution.
Regards
Mahdy
2023-03-07 06:03 AM
Hi Mahdy,
many thanks for taking care.
Best Regards
Zdenek
2023-11-30 01:01 AM
Issue already fixed since STM32CubeMX 6.9.0.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-02-16 09:02 AM
Has this fix ever been done ? I cannot see an option on CUBEIDE in the LWIP section to set the Hostname