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.

AM2634: How to Test 20 port in UDP - AM2634

Part Number: AM2634
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi all,

I am working on UDP server  so, i am editing this enet_cpsw_rawhttpserver_am263x-cc_r5fss0-0_nortos_ti-arm-clang Project so i couldn't able to use up to 20 port 

in coding in one array i just declared 20 port



i am using Hercules for sending data from server so here my requirement is i can able to use up to 4 port but i couldn't able to test more than 4 port how to achieve?

can you guide what is the reason why i couldn't use more than 4 port 

is there any memory restriction is to use port or did i need to change any configuration in sysconfig? 
 

  • Hi Aakash V,

    The default LwIP configuration supports only 4 connections. To modify this, please follow the steps below:

    1. Go to source/networking/lwip/lwip-config/am263x/enet/lwipopts.h. Here you can search for MEMP_NUM_UDP_PCB and set it to a high number (like 20). 

    2. Also based on your application requirements, increase the values for MEMP_NUM_PBUF, MEMP_NUM_RAW_PCB.

    3. Go to source/networking/lwip/lwip-config/am263x/enet/lwippools.h and increase the number of Pools for size 1586.

    4. Increase your application Heap size and the number of packet pools from syscfg.

    Step 3 & 4 are just to make sure you don't run into some memory limitations. You can later try and reduce them and find out how many pools does you application really need.

    Now rebuild your lwip libraries using the following:

    gmake -sj -f makefile.am263x lwipif-cpsw-nortos_r5f.ti-arm-clang PROFILE=debug
    gmake -sj -f makefile.am263x lwip-nortos_r5f.ti-arm-clang PROFILE=debug
    gmake -sj -f makefile.am263x lwip-contrib-nortos_r5f.ti-arm-clang PROFILE=debug

    Now rebuild your application and test again. You should be able to establish more than 4 connections with these changes.

    Regards,
    Shaunak Deshpande

  • Hi shaunak,

    Thank you for your replay now i did up to 20 port

    My one more requirement is I am working on client-server protocol and i am editing on same enet_cpsw_rawhttpserver_am263x-cc_r5fss0-0_nortos_ti-arm-clang so i can able to send the message from client but i couldn't able to receive the message from server side and

    when server send a data i couldn't able to see in herculus.

    i am using this project can you sort out my issue. if you did can you send your zip file. which will be helpful for me.

    thank you,

    enet_cpsw_rawhttpserver_am263x-cc_r5fss0-0_nortos_ti-arm-clang.zip

  • Hi Aakash,

    Can you please raise a new E2E thread for the new issue. Also request you to explain the issue in bit detail. For example if the AM26x3 is running a client, then who sends data, at what rate, and when the AM263x runs a server, who is the client and what is the exact issue being faced.

    Regards,
    Shaunak