This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/PROCESSOR-SDK-AM437X: TCP socket max number of connections

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI C/C++ Compiler

Hi,

In my TCP server, I found that only up to 8 clients can be connected. 

I found the parameter setting: NDK Core Stack->Network Layer->IP-General Settings: Maximum number of connections in .cfg file is 8, so I change it to 16. but the actual number of linkable clients is still 8.

How to change it?

processor_sdk_rtos_am437x_6_01_00_08,CCS9.1.0.00010.

  • Hi Bin,

    Did you change the _ipcfg.SockMaxConnect from 8 to 16?

    According to ndk_3_61_01_01\docs\ndk\NDK_API_Reference.html

    _ipcfg.SockMaxConnect – Maximum Connections on a Listening Socket

    Default Value 8

    Description This is the maximum number of connections a socket will pend waiting for a sockets NDK_accept() call from the application. Note: This value is also the upper bounds of the maximum connection argument supplied by an application via the sockets listen() function (calls with higher values are silently rounded down).

    Ming

  • Hi Ming,

    Yes, I tried this API :

        temp = 16;
        CfgAddEntry(hCfg, CFGTAG_IP, CFGITEM_IP_SOCKMAXCONNECT,  CFG_ADDMODE_UNIQUE, sizeof(uint32_t), (uint8_t *)&temp, 0);

    but It's still the same.

  • Hi Bin,

    #define DEF_SOCK_MAXCONNECT 8

    in L:\ti_am4_610\ndk_3_61_01_01\packages\ti\ndk\inc\stack\inc\resif.h.

    You may need to rebuild the NDK after the changes.

    Ming

  • Hi Ming,

    How to rebuild the NDK?

    I can not find the information.

  • Hi Bin,

    On Windows Processor SDK RTOS installation, Assuming you installed the processor SDK RTOS under C:\ti

    set XDC_INSTALL_DIR=C:/ti/xdctools_3_55_02_22_core
    set gnu.targets.arm.A9F=c:/ti/gcc-arm-none-eabi-7-2018-q2-update
    path=%path%;C:/ti/xdctools_3_55_02_22_core
    set SYSBIOS_INSTALL_DIR=c:/ti/bios_6_76_02_02

    gmake -f ndk.mak clean

    gmake -f ndk.mak all

    Ming

  • Hi Ming:

    I built a .BAT file , and copy the commands:

    set XDC_INSTALL_DIR=C:/ti/xdctools_3_55_02_22_core
    set gnu.targets.arm.A9F=c:/ti/gcc-arm-none-eabi-7-2018-q2-update
    path=%path%;C:/ti/xdctools_3_55_02_22_core
    set SYSBIOS_INSTALL_DIR=c:/ti/bios_6_76_02_02

    gmake -f ndk.mak clean

    gmake -f ndk.mak all

    into this file, and copy the file to C:\ti\ndk_3_61_01_01, then run it, get a error as follow:

    gmake: *** [ndk.mak:125: all] Error 2

  • Hi Bin,

    Change the following variables in ndk.mak file directly, then do "gmake -f ndk.mak clean" and "gmake -f ndk.mak all":

    XDC_INSTALL_DIR=C:/ti/xdctools_3_55_02_22_core (line 17)

    SYSBIOS_INSTALL_DIR=c:/ti/bios_6_76_02_02 (line 18)

    gnu.targets.arm.A9F=c:/ti/gcc-arm-none-eabi-7-2018-q2-update (line 46)

    Ming

  • Hi Bin,

    Try the following in Windows:

    gmake -f ndk.mak XDC_INSTALL_DIR=C:/ti/xdctools_3_55_02_22_core SYSBIOS_INSTALL_DIR=C:/ti/bios_6_76_02_02 gnu.targets.arm.A9F=C:/ti/gcc-arm-none-eabi-7-2018-q2-update

    Ming

  • Hi Ming,

    I tried to fix the ndk.mak file as follow:

    XDC_INSTALL_DIR ?= C:/ti/xdctools_3_55_02_22_core  (17)
    SYSBIOS_INSTALL_DIR ?= C:/ti/sysbios_6_76_02_02      (18)
    NS_INSTALL_DIR ?= C:/ti/ns_2_60_01_06                     (19)
    gnu.targets.arm.A9F ?= C:\ti\gcc-arm-none-eabi-7-2018-q2-update (46)

    It's OK. the ? can not be  omitted.

    But the max number of connections is still 8.

  • Hi Bin,

    Have you change the

    #define DEF_SOCK_MAXCONNECT 8 --> 16

    in L:\ti_am4_610\ndk_3_61_01_01\packages\ti\ndk\inc\stack\inc\resif.h.

    AND re-built the NDK?

    Ming

  • Hi Ming,

    I had changed it before re-building.

    It didn't work.

  • Hi Ming,

    I find that the reason why the link cannot be added is that the function accept() in the server returns an error:Memory allocation erro.

    Are there any other settings that need to be changed?

  • Hi Ming,

    I changed the Program.stack to 0x100000 in .cfg file.

    now, it's OK!