cancel
Showing results for 
Search instead for 
Did you mean: 

Can't send TCP message exactly more than 1000 times

Sadegh Ghorbani
Associate II

Hi

I'm using STM32F439 Dev Board and LWIP as TCP/IP stack; I'm using TCP echo

server example. the board is connected to PC. when I send a message from PC

to the board, it echoes back the message. But there is a problem. after

sending exactly 1000 messages I don't receive the message from the board

anymore. I used RAW and NETCONN API and both of them had the same problem.

The problem For UDP echo server/client there isn't. Please help me to

resolve this issue

2 REPLIES 2
Danish1
Lead II

It seems surprising that it is exactly 1000 messages.

How do you send those 1000 messages? Do you (for example) send 1 per second from the PC?

Do you get any diagnostic messages from LWIP?

How does the Wireshark trace differ before and during/after the failure?

You could have a memory-leak and get an allocation failure after that many messages.

Remember that TCP takes significant (tens of seconds) time to "tear-down" the link, and the server should keep information about a link until that time has expired. So if you make too many connections over a short period, the server will run out of memory.

Hope this helps,

Danish

Sadegh Ghorbani
Associate II

Thanks for your answer. the problem resolved. I used another IDE then the problem resolved!!!