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.

Connect problem for basic TCP client TM4C1294

The tcpEcho sample works. I want to make my Tiva a client instead of a server. I am replacing code in the tcpecho example to make it run as a client. Basically, I am replacing bind()/accept() with connect().

In a task, I have the following code:

SOCKET lSocket;
struct sockaddr_in sLocalAddr;

fdOpenSession(TaskSelf());

lSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (lSocket < 0) {
               System_printf("tcpHandler: socket failed\n");
               Task_exit();
                return;
} else {
                System_printf(" %d socket success\n", fdError());
}
System_flush();

memset((char *)&sLocalAddr, 0, sizeof(sLocalAddr));
sLocalAddr.sin_family = AF_INET;
sLocalAddr.sin_len = sizeof(sLocalAddr);
sLocalAddr.sin_addr.s_addr = inet_addr("192.168.1.217"); //IP of my computer
sLocalAddr.sin_port = htons(5000);//arg0);

if (connect(lSocket, (struct sockaddr *)&sLocalAddr, sizeof(sLocalAddr)) < 0){
System_printf("DID NOT CONNECT \n");
System_printf("%d\n", fdError());
} else {
System_printf("CONNECTED\n");
}
System_flush();

At the moment, when I try connecting, it does not connect. the fdError() says that the device is not configured. What does that mean? The socket info should be correct.
I have my Tiva board connected by ethernet to the network. My computer (192.168.1.217) is wirelessly connected to the network. The board is powered via USB to my computer. I have a tcp python server running on my computer to try to listen to my tiva board. It has a bind to 192.168.1.217:5000

What info am I missing? 

Also if anyone has a simple TCP client program for my board. that would be just as helpful too. TM4C1294