httpd not working after IP changed at runtime (no rtos)
Hi,
I'm trying to implement a webpage to change network parameters (IP, Gateway, netmask) on nucleo-F429ZI
If i change parameters before httpd_init() is called, all works ok: the board responds to the ping, and the httpd returns the webpages. But if I call httpd_init(), and after I change network parameters, the network interface responds to ping on the new address until I try to request a webpage. When I request a webpage, httpd go to timeout and the board not respondig to ping.
this is the code to change network parameters:
netif_set_down( &gnetif );
IP4_ADDR(&ipaddr, IP_ADDRESS[0], IP_ADDRESS[1], IP_ADDRESS[2], IP_ADDRESS[3]);
IP4_ADDR(&netmask, NETMASK_ADDRESS[0], NETMASK_ADDRESS[1] , NETMASK_ADDRESS[2], NETMASK_ADDRESS[3]);
IP4_ADDR(&gw, GATEWAY_ADDRESS[0], GATEWAY_ADDRESS[1], GATEWAY_ADDRESS[2], GATEWAY_ADDRESS[3]);
netif_set_addr(&gnetif,&ipaddr,&netmask,&gw);
if (netif_is_link_up(&gnetif))
{
netif_set_up(&gnetif);
}
else
{
netif_set_down(&gnetif);
}
thank you
