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/EK-TM4C1294XL: TM4C129 Launchpad TCPecho example

Part Number: EK-TM4C1294XL

Tool/software: TI-RTOS

Hello, 

I'm using the tcpecho example from TI RTOS for getting familiar with socket programming. The code is working fine. 

I want to know whether it is possible to know in code whether ethernet cable has be connected or not. 

From what I've seen, the code flow doesn't enter the while loop given below:

while ((clientfd =
accept(server, (struct sockaddr *)&clientAddr, &addrlen)) != -1) {

System_printf("tcpHandler: Creating thread clientfd = %d\n", clientfd);

/* Init the Error_Block */
Error_init(&eb);

/* Initialize the defaults and set the parameters. */
Task_Params_init(&taskParams);
taskParams.arg0 = (UArg)clientfd;
taskParams.stackSize = 1280;
taskHandle = Task_create((Task_FuncPtr)tcpWorker, &taskParams, &eb);
if (taskHandle == NULL) {
System_printf("Error: Failed to create new Task\n");
close(clientfd);
}

/* addrlen is a value-result param, must reset for next accept call */
addrlen = sizeof(clientAddr);
}

Is there any other way to know whether ethernet cable is connected or not in code??

Regards

Praveen