How do you create more than 4 TCP connections

15 May 2013

Hi All,

I am creating an application which takes data from a UDP low bandwidth connection and then mirrors this to multiple TCP/IP ports over a local network.

If I connect the mbed to a server on my PC and then connect multiple clients to the mbed it maxes out at 4 connections.

Any one else had this problem / found a solution to enable say 10 connections

10 Jul 2013

Hi James. We are porting our TCP/IP stack which does not have limitations on the number of concurrent sockets open.

Import libraryPicoTCP

Free (GPLv2) TCP/IP stack developed by TASS Belgium

26 Jul 2013

Hi James,

Have you tried upping MEMP_NUM_TCP_PCB in lwip/include/lwip/opt.h ?

On mine it is set to 5, but I've not tested this limit.

/**
 * MEMP_NUM_TCP_PCB: the number of simulatenously active TCP connections.
 * (requires the LWIP_TCP option)
 */
#ifndef MEMP_NUM_TCP_PCB
#define MEMP_NUM_TCP_PCB                5
#endif

Ashley

22 Sep 2014

Ashley Mills wrote:

Hi James,

Have you tried upping MEMP_NUM_TCP_PCB in lwip/include/lwip/opt.h ?

On mine it is set to 5, but I've not tested this limit.

I've tried changing the #defines, and on my FRDM-K64F, it allows a 5th connection, but then closes the first one.