Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 6498

MicroPython • Re: How to receive large (>1024 byte) UDP datagram packets?

$
0
0
but it then stops reporting packets received after some time
Right - now that I send larger amounts, I see the same problem. In fact, if I send 32 KB in sizes of 1460, it stops receiving after two times. If I use 1000-sized packets, it stalls even earlier.

When I look at the number of packets it received before stalling, it's always 24. Same when I use a payload size of 600.

So, even that UDP sample I posted doesn't work. Damn.

I'm now looking into the code, trying to see if it fails to free its buffers…

GOTCHA!

One needs to call

Code:

pbuf_free(p);
in the RcvFromUDP() callback.

(PBUF_POOL_SIZE is 24 - go figure)

Too bad the thread where I got the code from is locked, because that's a serious bug that one should correct there, in case people use that code without seeing this resolution here.

Statistics: Posted by tem_pi — Tue Jul 30, 2024 3:26 pm



Viewing all articles
Browse latest Browse all 6498

Trending Articles