2023-08-09 12:57 PM
Hello,
I have a STM32 sending a packet a second, up to 25 UDP packets, to another STM32 whose role is to echo these packets back to the sending STM32.
Inside the packets is a value which I increment after every transmission.
I've noticed that at the original STM I only receive message 1, after I transmitted message 4.
However, if I continue to run the program I do receive all 25 messages and actually in order.
because I transmit every second I expected to receive the echo of the first message before I sent the second.
I am allocating small pBuf sizes, much smaller than my PBUF_POOL_BUFSIZE define, are the packets being queue'd somewhere either at receive or transmit?
Thanks.
Using RAW LWIP 2.1. and STM32F4.
Solved! Go to Solution.
2023-08-19 01:10 PM - edited 2023-08-19 01:10 PM
In these cases there is 1 essential tool: use Wireshark to know which STM32 is the culprit. Or your messages are not getting out or they are not processed somewhere properly.
There are also a number of system traces you can enable in MX in the LwIP configurator. If you enable these you can get a much more detailed view on what is happening.
The number of 4 makes me think it might have to do with the number of pBufs allocated, but that is a long shot.
2023-08-10 09:06 AM
I think lwIP sends any UDP packet immediately, but you better check udp.c
Beware! It's many function calls...
2023-08-19 01:10 PM - edited 2023-08-19 01:10 PM
In these cases there is 1 essential tool: use Wireshark to know which STM32 is the culprit. Or your messages are not getting out or they are not processed somewhere properly.
There are also a number of system traces you can enable in MX in the LwIP configurator. If you enable these you can get a much more detailed view on what is happening.
The number of 4 makes me think it might have to do with the number of pBufs allocated, but that is a long shot.