I wrote a TCP IP client using stream socket and tried to communicate that with FPGA server. But the communication is not happening. At the same time from windows TCP/Ip client(written in C#)can communicate the FPGA board.
Please let me know if it is possible the Linux to FPGA communication using stream socket. I used AF_INET family to communicate the FPGA server.
int Close_Socket(LAN_MSG *TX)
if(close(TX->sock_fd) == -1)
// printf("\nCould not close socket\n");
struct hostent* pHostInfo; /* holds info about a machine */
struct sockaddr_in Address; /* Internet socket address stuct */
printf("\nMaking a socket");
/* make a socket */
if( socket_fd== -1)
printf("\nCould not make a socket\n");
/* get IP address from name */
/* copy address into long */
/* fill address struct */
printf("\nConnecting to %s on port %d",strHostName,nHostPort);
/* connect to host */
if(connect(socket_fd,(struct sockaddr*)&Address,sizeof(Address)) == -1)
printf("\nCould not connect to host\n");
This is my client communication layer. In this connect itself is failing. I am not understanding why connection itself is not establishing???