Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No server reply to client SYN TCP connection request

Hi, I apologize if any of the following seem dumb but I'm relatively new to ethernet and TCP/IP embedded programming, even high-level programming at that. I'm trying to establish a TCP 3-way handshake connection from NXP FRDM-K64 development board to a passive PC that has no application actual app running except WireShark and sometimes Internet Explorer, when I open the browser. NOTE that FRDM-K64 uses LWIP protocol stack, "around" TCP/IP stack. I send out SYN from the code. I see WireShark captures that the SYN packet was sent out - both src and dest IP addresses are correct. Also the port I put on the request is 80 (http). The FRDM board normally comes up in original code as a "web server". That connection works fine. I recently (since last week) started coding the board as a client too by simply adding the calls to tcp connect. Today, I added more TCP header "options" besides the MSS - windows scale = 2, shift by 2 or x4, and SACK permitted options. Why? because when I use this PC to GET website from FRDM webserver, that is the way it formats it's SYN TCP packet and the FRDM replies back with SYN-ACK... and the 3-way handshake started by PC client succeeds in establishing a TCP connection.
The addition options did not have any effect, still no SYN-ACK. I increased retries from 6 to 11 thinking the PC is just backed-up with connection requests and so it has not gotten to the FRDM's SYN packet. I only went up to 11 because pre-processor compiler complains about going >12 retransmissions (I didn't want to doctor the code any further. Wireshark shows the 1st SYN transmittion from FRDM to PC and all the 11 retransmission too. Also NOTE: I don't really think this PC backed-up with many SYN requests, because it's ethernet cable is currently only directly hooked-up to the FRDM so there really would not be many requesting to TCP-connect with SYN to it except the board. None of these approaches solves the problem. FRDM's SYNs do not get ACKed. I read somewhere maybe I should enable TIMESTAMP? in the option? while other readings said I should not so I have done that. QUESTIONS: * Why is the PC not replying to the FRDM board with ACK? * Do I need to have a server-app program running on the PC just to have the server endpoint respond to the SYN? * Would simply opening a web browser suffice? * What am I missing on the FRDN client side? * What else should I do on the PC side that will be transparent to any other server - that any other server should or should not be doing to respond with an ACK to the FRDM board under their ethernet TCP/IP network protocol stack standard procedure to do 3-way handshake connection establishment?

Thanks for your help.

No server reply to client SYN TCP connection request

Hi, I apologize if any of the following seem dumb but I'm relatively new to ethernet and TCP/IP embedded programming, even high-level programming at that. I'm trying to establish a TCP 3-way handshake connection from NXP FRDM-K64 development board to a passive PC that has no application actual app running except WireShark and sometimes Internet Explorer, when I open the browser. NOTE that FRDM-K64 uses LWIP protocol stack, "around" TCP/IP stack. I send out SYN from the code. I see WireShark captures that the SYN packet was sent out - both src and dest IP addresses are correct. Also the port I put on the request is 80 (http). The FRDM board normally comes up in original code as a "web server". That connection works fine. I recently (since last week) started coding the board as a client too by simply adding the calls to tcp connect. Today, I added more TCP header "options" besides the MSS - windows scale = 2, shift by 2 or x4, and SACK permitted options. Why? because when I use this PC to GET website from FRDM webserver, that is the way it formats it's SYN TCP packet and the FRDM replies back with SYN-ACK... and the 3-way handshake started by PC client succeeds in establishing a TCP connection. connection with PC as client and FRDM as server.
The addition additional TCP header options did not have any effect, still no SYN-ACK. I increased retries from 6 to 11 thinking the PC is just backed-up with connection requests and so it has not gotten to the FRDM's SYN packet. I only went up to 11 because pre-processor compiler complains about going >12 retransmissions (I didn't want to doctor the code any further. further). Wireshark shows the 1st SYN transmittion transmission from FRDM to PC and all the 11 retransmission retransmissions too. Also NOTE: I don't really think this PC backed-up with many SYN requests, because it's ethernet cable is currently only directly hooked-up to the FRDM so there really would not be many requesting to TCP-connect with SYN to it except the board. None of these approaches solves the problem. FRDM's SYNs do not get ACKed. I read somewhere maybe I should enable TIMESTAMP? in the option? while other readings said I should not so I have not done that. QUESTIONS: * Why is the PC not replying to the FRDM board with ACK? * Do I need to have a server-app program running on the PC just to have the server endpoint respond to the SYN? * Would simply opening a web browser suffice? * What am I missing on the FRDN client side? * What else should I do on the PC side that will be transparent to any other server - that any other server should or should not be doing to respond with an ACK to the FRDM board under their ethernet TCP/IP network protocol stack standard procedure to do 3-way handshake connection establishment?

Thanks for your help.