2023-09-19 08:03 AM
Excuse me, I'd like to seek advice from experienced members.
I'm using the STM32F429IGT6 microcontroller in an environment with FreeRTOS and LwIP. I'm attempting to create a TCP Socket (or netconn) server using the LAN8720A network chip to achieve one-to-many connection experiments.
So far, I've been able to successfully communicate with up to one-to-two connections, but when the third client attempts to connect, it fails. Has anyone managed to successfully establish one-to-three or more connections?
Could this issue be related to insufficient memory space, requiring adjustments?
2023-09-19 11:17 AM
Look at the MEMP_NUM_NETBUF and MEMP_NUM_NETCONN entries in CubeMX (LwIP under "Infrastructure - Internal Memory Pool Sizes". They default to very small numbers.
Presuming of course that you are using CubeMX. If not, then search for those in the LwIP config file.
2023-09-19 11:44 PM - edited 2023-09-19 11:46 PM
For TCP / http server only (no netconn) it is MEMP_NUM_TCP_PCB in opt.h to set the max number of clients.
And surely lwip needs more memory for more PCBs.