cancel
Showing results for 
Search instead for 
Did you mean: 

I hope to achieve one-to-many connections using TCP Socket.

liao2k
Associate

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?

2 REPLIES 2
Bob S
Principal

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.

LCE
Principal

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.