2024-09-23 12:14 AM - edited 2024-09-23 12:19 AM
This is my Environment:
Microcontroller: STM32H723ZET6
LWIP is used. No RTOS used.
I am setting a Static IP address in the *.ioc file. I am setting the same IP address in the TCP Raw Socket Echo Server to Bind the socket. Over that I am running the Modbus Server. DHCP is disabled.
I want to change the IP Address at run-time. How is it possible?
2024-09-23 12:46 AM
@VSomasekhar wrote:I want to change the IP Address at run-time. How is it possible?
Use DHCP.
Provide an interface so that the user can provide the (static) IP address.
2024-09-23 07:20 AM
Hello,
To change the IP address, please try disabling the network interface. Next, use netif_set_addr to set the new IP address, subnet mask, and gateway. Finally, re-enable the interface to apply the new configurations.
With Regards,