cancel
Showing results for 
Search instead for 
Did you mean: 

How to define LwIP DHCP hostname in CubeMX?

ZdenekK
Associate

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

1 ACCEPTED SOLUTION

Accepted Solutions
MSG_ST
ST Employee

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

View solution in original post

4 REPLIES 4
MSG_ST
ST Employee

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

ZdenekK
Associate

Hi Mahdy,

many thanks for taking care.

Best Regards

Zdenek

Amel NASRI
ST Employee

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.

Has this fix ever been done ? I cannot see an option on CUBEIDE in the LWIP section to set the Hostname