2023-09-28 02:24 PM
Hello,
I'm working on a STM32F407 LwIP acting as a TCP server with a bare winsock based client on Windows 10.
The project is derived from CubeMX V1.27.1 with the tcp_echoserver.c module creating and communicating to the client.
After a few transfer of bytes, I debug hit the RxAllocStatus = RX_ALLOC_ERROR; located in HAL_ETH_RxAllocateCallback from ethernetif.c and the transfer receive exchange stalls. Wireshark indicates that TCP ZeroWindow packet pointing that the rx buffer is full.
Are there any solutions to this particular scenario. Pbuf Free and other mechanisms do not help.
@Tesla DeLorean or any members, please advise.
2023-10-30 05:22 PM
I am running into the same issue too. Seems like the line "LWIP_MEMPOOL_ALLOC(RX_POOL);" is not able geta valid pbuf., did you ever resolve your issue?
2023-10-30 05:31 PM
2023-10-30 05:58 PM
Hi Piranha, I studied your post before. However, I am not able to pin point where the problem is. Can you tell me which one should I look at please?
2023-10-30 07:12 PM
Or why do you think you have just one problem? The topic reports many bugs! From where comes that wrong thinking that you can fix just one of many bugs and the device will somehow magically not be affected by all the other bugs?
2023-10-30 07:37 PM
Got cha. Forgive my ignorance. I just started on embedded development not too long ago. The reason is because in the main loop in Main, it calls "low_level_input" below, and the RxAllocStatus becomes RX_ALLOC_Err, and it stop going in to the If to call "HAL_ETH_ReadData". that's why it appears to be stalling. However I could be very wrong, but i don't know where else to look for the problem. Would you please point me at the right direction? Thank you Chief :)
static struct pbuf * low_level_input(struct netif *netif)
{
struct pbuf *p = NULL;
if(RxAllocStatus == RX_ALLOC_OK)
{
HAL_ETH_ReadData(&heth, (void **)&p);
}
return p;
}