|
From: | Adrian Figueroa |
Subject: | Re: [lwip-users] ERR_MEM when sending large data, LWIP stats show no error |
Date: | Fri, 1 Sep 2017 12:03:16 +0000 |
It seems like I do not have this problem if I choose TCP_SND_BUF to be exactly double the TCP_MSS of 1460. If I choose higher values, the problem happens. Is there an explanation for this? Von: lwip-users [mailto:lwip-users-bounces+address@hidden
Im Auftrag von Adrian Figueroa Hello all, I am trying to send large amounts of data continuously. I use lwIP as a TCP client on an STM32F7 and Matlab on a PC as a TCP server. I send blocks of 32768 bytes. Here are some settings for the memory sizes in lwIP: #define
MEM_ALIGNMENT
4 #define
MEM_SIZE
17520 #define
MEMP_NUM_TCP_SEG
65 #define
PBUF_POOL_BUFSIZE
1516 #define
TCP_WND
8760 #define
TCP_MSS
1460 #define
TCP_SND_BUF
8760 When sending with tcp_write(), I get ERR_MEM errors. So, I switched on LWIP_STATS for seeing memory statistics. When should I be using tcp_output()? Should I check for the remaining tcp_sndbuf and use tcp_output() if it gets low? In Wireshark, I can see TCP Dup ACKs and “TCP Previous segment not captured” errors. Find the dump here: https://sync.coda.pw/r/Z_uuIXRtl2#NT5OwZOSW4Nd8erfCRvLvSdAmMS1YODnWL3tP+dGRMk= I send data every 2 seconds and it takes around 1.5 seconds to send it to the PC, which is too long. Here are some of the results after ERR_MEM happened:
https://snip.coda.pw/?69c4627d150293fa#3cUX2gAqvAKaflXk8NTs7k+TxBAjQwmNT+IYu+GfiJE= There is no Mem/Memp section that contains even one error. So, I am not sure where to look next. Thank you in advance! Adrian |
[Prev in Thread] | Current Thread | [Next in Thread] |