cancel
Showing results for 
Search instead for 
Did you mean: 

Lwip - TCP Client : disconnect and reconnect or initialization while cable unplugged problem

ZENIT
Associate

Hi dear friends... I have a big problem with lwip and tcp library in the client side... I created a server in pc and configure my board as a client ( using stm32f407 ). When i turn my board on while the lan cable is plugged and server is running, everything works perfectly... my two main problems are:

1- if cable is unplugged or server is not running then my board can't connect to server if I turn it on! How can I fix it?

​2- if I want to close an active tcp client completely and reconnect it to server what should I do?

It seems to me that tcp_client_close ( including free pbuf and close_tcp) and tcp_client_connect (including tcp_new and tcp_connect) wont work​ properly!

please help me to fix this issue.

Best Regards.

1 REPLY 1
Muhammed Güler
Senior III

While advanced parameters are selected in the LWIP key options tab, you will see the Timeout settings for Socket and Netconn below. If you turn these settings on, your card should not turn into a brick when connection cannot be established.

The following settings have resolved the problem of ports remaining open. I don't know which setting is necessary and which setting is unnecessary.

0693W00000HoMfiQAF.png