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.

RTOS/LAUNCHXL-CC3235SF: Errno -2005 (SL_API_ABORTED) in "tcpecho" example

Part Number: LAUNCHXL-CC3235SF
Other Parts Discussed in Thread: CC3235SF

Tool/software: TI-RTOS

Hi everyone!

I have troubles with your "tcpecho" example for CC3235SF. After 12 accepted connections an error occurs. If to print "errno" value after while cycle with "accept()" function (tcpEcho.c:137), "errno" is equal -2005 (SL_API_ABORTED). If I pass an argument "StackSize" to "TaskCreate()" function, for example, 4096 instead of 2048, then this error will occur after 6 accepted connections. I tried to send HTTP messages by Postman, Mozilla Firefox browser and the provided python script "tcpSendReceive.py" (I ran and stopped script 12 times sequentially). What is wrong with the example? And what does this error mean in my case?

Best regards,
Roman

  • Hi Roman,

    The issue is that the application is creating a new task for each accepted connection and appears to run out of available memory. A good way to visualize this would probably be with the ROV tool. Take a look at the "Debugging Features and Tools" section in our TI-RTOS SimpleLink Academy if you would like to dig into it further:
    dev.ti.com/.../node

    The design of the application is not a ideal for an actual use-case. It is meant to simply show how to utilize the bsd layer for a simple tcp example. I will make a note that this happens in the example and recommend updating in the future to fix it.

    Best Regards,
    Ben M
  • Thank you, Ben!

    It seems that "TaskCreate()" function should create detached threads, so I added a string like that to avoid memory leak:

    pthread_attr_setdetachstate(&pAttrs_tcp, PTHREAD_CREATE_DETACHED);



    Best regards,
    Roman