I need some help with TCP [solved]
Patrick1ab
Posts: 136
Hi everyone!
As I'm proceeding with the work on the W5100 indirect driver, I'm doing some beta tests and found some strange problems.
I am not very familiar with TCP, so perhaps someone can help me with these:
1. The data transmission "txTCP" seems to work, but my browser expects even more data to be sent.
This is what Wireshark shows me (48 is the HTTP header the propeller returns; 50 is the data the propeller returns) :
I'm not sure, but isn't there a "FIN" missing at the end? Are the other lines fine or is there something else, which does not correspond to the TCP standard?
2. Something similar seems to happen to the Propeller itself while trying to receive data: It does not exit the "rxTCP" function.
Unfortunately I can't get any data from Wireshark in this case.
You will find a copy of my test program in the attachments.
The latest driver version can be found here: http://forums.parallax.com/showthread.php?p=877210
Post Edited (Patrick1ab) : 5/4/2010 10:40:45 PM GMT
As I'm proceeding with the work on the W5100 indirect driver, I'm doing some beta tests and found some strange problems.
I am not very familiar with TCP, so perhaps someone can help me with these:
1. The data transmission "txTCP" seems to work, but my browser expects even more data to be sent.
This is what Wireshark shows me (48 is the HTTP header the propeller returns; 50 is the data the propeller returns) :
42 34.199124 192.168.178.31 192.168.178.4 TCP 49474 > http [noparse][[/noparse]SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=8 43 34.200460 192.168.178.4 192.168.178.31 TCP http > 49474 [noparse][[/noparse]SYN, ACK] Seq=0 Ack=1 Win=2048 Len=0 MSS=1460 44 34.200522 192.168.178.31 192.168.178.4 TCP 49474 > http [noparse][[/noparse]ACK] Seq=1 Ack=1 Win=64240 Len=0 45 34.200630 192.168.178.31 192.168.178.4 HTTP GET / HTTP/1.1 46 34.404234 192.168.178.4 192.168.178.31 TCP http > 49474 [noparse][[/noparse]ACK] Seq=1 Ack=386 Win=1663 Len=0 47 34.632227 192.168.178.4 192.168.178.31 TCP [noparse][[/noparse]TCP segment of a reassembled PDU] 48 34.632709 192.168.178.4 192.168.178.31 HTTP HTTP/1.0 200 OK 49 34.632741 192.168.178.31 192.168.178.4 TCP 49474 > http [noparse][[/noparse]ACK] Seq=386 Ack=20 Win=64221 Len=0 50 34.633454 192.168.178.4 192.168.178.31 HTTP Continuation or non-HTTP traffic 51 34.832932 192.168.178.31 192.168.178.4 TCP 49474 > http [noparse][[/noparse]ACK] Seq=386 Ack=49 Win=64192 Len=0
I'm not sure, but isn't there a "FIN" missing at the end? Are the other lines fine or is there something else, which does not correspond to the TCP standard?
2. Something similar seems to happen to the Propeller itself while trying to receive data: It does not exit the "rxTCP" function.
Unfortunately I can't get any data from Wireshark in this case.
You will find a copy of my test program in the attachments.
The latest driver version can be found here: http://forums.parallax.com/showthread.php?p=877210
Post Edited (Patrick1ab) : 5/4/2010 10:40:45 PM GMT
Comments
In a "porting guide" for the w5100 I saw, that if you just close a socket no "FIN" will be send.
So, I'm going to implement a new function which will disconnect without closing the socket.
2. is solved too: My webserver receive buffer was smaller, than the receive buffer of the driver.
So the driver has accidentally overwritten parts of the ram, which were vital for the program.
Now, my webserver is running and I can do the first speed tests...
Post Edited (Patrick1ab) : 5/4/2010 10:40:07 PM GMT