1
votes

I'm developing an ethernet application on an stm32 nucleo board using the LWIP library and I'm getting a TCP Window Full message when my board is receiving data as you can see at the Wireshark capture. I`ve tested several times and I´ve realized that it stops working when the window arrives to 2144 bytes.

Does anyone know how to clean/reset this window? I know that I could increase this number as you can see at the second photo but i would prefer to be able to reset o clean it after a while because if not I would full the memory in a few minutes.

Thanks in advance ;)

WhireShark Capture: enter image description here

STM32CubeMX capture of the LWIP Configuration: t

1

1 Answers

1
votes

"TCP Window Full" happens when your receive window shrinks down to zero, that is - the receive buffers get filled up. It will remain full until you receive the data from the socket.

It typically happens when the sender sends data faster than the receiver processes it, or at least receives it from the socket. When this happens, sender should stop sending more data until receiver is able to again receive more. This happens after you receive data from the socket and there's two ways in which the sender is informed about it:

  1. Receiver sends "TCP Window Update" which indicates how much space in the receive window is available again. This is not a frame that is acknowledged by the sender, it may get lost. Because of this there's also a second way below.

  2. Sender continually polls the receiver by sending TCP Keep-Alive packets (packets with no data). Those packets must be acknowledged by the receiver and because each TCP frame contains the remote end's window size in its header, this way the sender is able to get the information whether you're able to receive again.

"TCP Window Full" is not an error - Wireshark colors it in black just to indicate that if you have issues with transmission, this may be something you might want to look at. Another example of such coloring is TCP retransmissions.

To summarize - you should receive the data from the socket. If you already are doing so, but in this case there's nothing to read (e.g. select indicates that there's no data to read), then this may indicate some other problem in your specific case.