This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1294KCPDT: How to reconfigure UDP setting after IP address changed?

Part Number: TM4C1294KCPDT

Dear all

I am working on an application involves Static IP address changes in between, the program use UDP protocol, and it is initialised as:

MyData.udppcb =( struct udp_pcb*) udp_new();
udp_bind(MyData.udppcb, IP_ADDR_ANY, APP_PORT);
udp_recv(MyData.udppcb, Recv_Handler,NULL);

The code works fine until I need to change IP address with following line:

lwIPNetworkConfigChange(NewIpAddr), NewMask), NewGateWay),IPADDR_USE_STATIC);

The IP address change has been done successfully, however, after that if I reinit the UDP configuration, it stuck at udp_bind function, If I skip the init code, it first seems working OK - able to be pinged and receives some packets, but after a while, it seems stuck somewhere. I wonder what I need to do with the UDP configuration after the IP address change.

Your response is appreciated!

Thanks!

Ping