This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

tcp_connect fails when FIRST time connect request send

Hello Sir,
I am using Keil uV RTL lib, for TCP connection

I used the sample test code which ARM has given in lib.

/***************************************************/

U8 tcp_soc;

U16 tcp_callback (U8 soc, U8 event, U8 *ptr, U16 par) { /* This function is called on TCP event */ .. return (0);
}

void main (void) { U8 rem_ip[4] = {192,168,1,110};

init (); /* Initialize the TcpNet */ init_TcpNet (); tcp_soc = tcp_get_socket (TCP_TYPE_CLIENT, 0, 30, tcp_callback); if (tcp_soc != 0) { /* Start Connection */ tcp_connect (tcp_soc, rem_ip, 80, 1000); }

while (1); /* Run main TcpNet 'thread' */ main_TcpNet (); .. }
}

/***************************************************/
when I FIRST time tcp connect from my embedded application to connect PC (IP ADD == rem_ip)
i got ARP request of it seen on Wireshark, PC sends back own MAC D which i checked stored in ARP_INFO struct
but then TCP connect request is not seen on wireshark.tcp_connect returns 0 always
What are all possible reasons that my FIRST TCP_connect request never succeeds,(Fails to TCP Active Open)???
I am able to do tcp_listen successfully (Success for Passive TCP)