AnsweredAssumed Answered

LwIP + UDP echo delay?

Question asked by Alberto Fahrenkrog on Jul 26, 2017
Latest reply on Jul 26, 2017 by Alberto Fahrenkrog

Hi all,


I'm working on a STM32F7 discovery board. UDP sending data at high rates, as well as debug messages is working fine.


I'm trying to get the UDP echo example workig, and I notice there is a HUGE delay (order of 10s of seconds) for the echo to return. So far what I have:

Using ncat to send string to IP + port.

LED1 toggles when an Ethernet message arrives ("Enter" on ncat). That works fine, as soon as I send the message out the LED1 toggles.

LED2 toggles when the receive function (pointer to in udp_recv) sends out the echo message. Now, when I receive a message, the udp_recv function does not call immediately, and that is were the delay is (I think), between data arrival on the ethernet interface and passing it up to the application. If I wait (order ~ 10 seconds or more) the echo is returned. After 3 or 4 tries, the delay gets much longer.


However, the data is inside the micro, because if I send two consecutive packets from ncat, the first packet gets echoed back, I get stuck waiting on the second echo.


Any ideas? Any settings I might have overlooked? Anyone come across this before?


I'm using STMCubeMX 4.22.