Missing Responses intermittently when used with 3G Router
Serial-to-Ethernet & ConfigTool
No replies yet. Be the first to reply.
Join the discussion.
Serial-to-Ethernet & ConfigTool
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Missing Responses intermittently when used with 3G Router
by irina WIZnet ·
Are there any symptoms even if I set the Inactivity Time to 2000?
And set a value to keepalive in this module and keep the connection from being disconnected.
It may be a network problem, so it would be nice to test it.
RE: RE: Missing Responses intermittently when used with 3G Router
by Praveena ·
Hi Irina,
Thanks for replying.
I made another set of testing with modifying the Inactivity & Keepalive timer. Still the problem exists. We have even done outdoor testing with full signal coverage. Didn’t help either.
Attached logs for your review. Please help.
Testcases done:
log-2.zip (43.9 KB)
Note: Failed connections are highlighted in attached teraterm logs
RE: Missing Responses intermittently when used with 3G Router
by Willznet ·
Hi Praveena,
I’ve tried to test W7500S2E-R1 with a setting similar to your situation:
The result of the test was :both receiving and sending packet of the module worked fine. Serial on my PC received all packet from the IP address.
Serial setting:
Module network setting:
If I didnt get you wrong, what you meant was that your wiznet module had “cool-down” time of 0.8s, no data would be received during the cd?
And there was no port shifting during my test. I assume there was no disconnection throughout my test.
It would help if you could provide more detail about your situation, for example what data you sent to the address, so that I can have another test much more closer to your situation
It is also suggested to check the setting and performance of your 3G module/connection due to the fact that in some cases 3G connection could be slower than serial communication with baud rate 115200, or the performance of the website to see if any misbehavior happened.
Attached is the wireshark record of my test
800ms problem of W7500s2eR1.zip (16.1 KB)
RE: Missing Responses intermittently when used with 3G Router
by Praveena ·
Hi,
We can’t share IP or URL details in forum. I simply explain the issue here.
W7500S2E-R1 is connected to a Desktop using Serial Interface and the other end (Ethernet) is connected to 3G Router (transfers data via cellular network using SIM card). The Desktop is running teraterm to input data & display incoming data on screen and is configured correctly. (Default settings - Baud Rate: 115,200, data size: 8, Parity: None, stop bit: 1 and Flow control: None).
I am sending a HTTP request to a server using serial port (PC serial settings - Baud Rate: 115,200, data size: 8, Parity: None, stop bit: 1 and Flow control: None). I was expecting a HTTP response back to serial port. But I am not getting the response back. When seeing the wireshark log I found, the response actually reaching the LAN interface but not to the serial interface (in teraterm). Observing few failure instances, (I am not sure though, it’s a guess) I found that the response time in Wiznet (roughly 0.8 secs) may causing a timeout and the response is lost. Because, Wiznet does 3 re-transmission of HTTP request; if the ACK or either response reaches LAN after the 3 re-transmission, ideally after ~0.8 secs, will be ignored by wiznet and a new connection is started by sending SYN packet to the server with new port number.
We have tried with different server IPs. Also tried with 38400 baudrate. We get the same result.
Can you able to simulate a simple server, send a HTTP request and delay both the ACK & response by 1 sec and see the result? 3G connection could be slower, but we want to see how wiznet would handle this.
RE: Missing Responses intermittently when used with 3G Router
by Willznet ·
Hi Pravaana,
Since ACK packets is to confirm whether the connection is fine, and normally it should be sent within 0.2s after receiving data, it should be sent ASAP once one end receives a packet. And it is independent from the reply packet of the server.
Since the port changed, losing the packet from you PC through serial made sense.
We are able to alter the buffer time for disconnection for you if necessary. However, checking your the performance/transmission speed of your 3Grouter beforehand is suggested as the time for ack packet is not often seen.
You are welcomed to send us your problem through email if you need further support and are worry about privacy.
RE: Missing Responses intermittently when used with 3G Router
by Praveena ·
Hi,
Thank you so much you came forward to help.
Can you please provide a new software with configurable response time (buffer time for disconnection in your term) for TCP commands with an AT command so that even if there is any delay in serial port or router the connection won’t be affected. Please make the response time to be bit enlarged like 0 to 60 secs.
RE: Missing Responses intermittently when used with 3G Router
by Willznet ·
Hi Pravaana,
I understand your concern. However I am afraid we cannot provide such a software to you.
After double-checked the protocol document RFC1122(RFC 1122 - Requirements for Internet Hosts - Communication Layers), we found that normally a TCP delayed acknowledgment should not be longer than 500ms:
4.2.3.2 When to Send an ACK Segment
The wiznet module already has a buffer upon the standard delayed ACK. It is suggested checking the performance of your 3Grouter or server since other unknown problems would be arisen along with the abnormal delayed ACKs and replies.
Or I personally reckon you could alter the code on your PC side to compromise with the late ACKs and replies if you want to keep the performance the way it performs.
RE: Missing Responses intermittently when used with 3G Router
by Praveena ·
Hi,
WE have carried out another testing to diagnose the problem further. This time we replaced Wiznet with our PC to check the performance of 3G Router. PC is now connected to the 3G Router. The Desktop is running a small java TCP client application to mimic the wiznet testing with teraterm.
The result is not a single failure is captured with PC-3G Router setup. Although there is couple of retransmissions and latencies, the connection is not lost. And same port number is used throughout the TCP conversation start to end.
On comparing the PC-3GRouter & Wiz-3GRouter logs, we noticed few things as below.
You can pick up the thread of the transfer at packet 4 which is a get request to the server.
4 HTTP GET to server
5 TCP ACK, from server, 67 ms later
6 HTTP OK from server, 118 ms after packet 4
7 TCP ACK from Client, almost instantly after packet 6 as you would expect
8 TCP Window update – client is telling the server that it has a 2K buffer
That completes the first sequence without problems and re-transmissions. 118 mS start to finish, but the key point to note is TCP ACK that came back in 67 ms. More on that later…
145 HTTP GET to server
146 TCP retransmission. Client is requesting packet 145 again after 88 mS
147 TCP retransmission. Client is requesting packet 145 again after 176 ms later, 264 ms after packet 145
148 TCP retransmission. Client is requesting packet 145 again after 352 ms later, 617 mS after packet 145
149 TCP ACK from server, 963 ms after packet 145
150 & 151 Duplicate TCP ACK from server in response to packets 146 & 147
152 HTTP OK from server, 1000 mS after packet 145
153 TCP ACK from Client, almost instantly after packet 33 as you would expect
154 TCP Window update – client is telling the server that it has a 2K buffer
That completes the next sequence without problems. 1000 mS start to finish, but the key point to note is TCP ACK that came back in 963 mS.
163 HTTP GET to server, port no 5008
164 TCP retransmission. Client is requesting packet 163 again after 88 mS
165 TCP retransmission. Client is requesting packet 163 again after 176 ms later, 264 ms after packet 163
166 TCP retransmission. Client is requesting packet 163 again after 352 ms later, 616 mS after packet 163
167 HTTP OK from server, 931 ms after packet 163
168 New connection is initiated by sending SYN from Client with new port no 5009 to the server
169 TCP ACK from server, 991 ms after packet 163 in response to packet 163
170 Malformed packet from server
171 & 172 Duplicate ACKs from server in response to packet 164 & 165
173 SYN-ACK from server in response to packet 168
174 ACK from Client in response to 173
175 Server retransmission of HTTP OK to old port 5008
176 Client reset connection on port 5008
So, this sequence does show an apparent problem with TCP receive timeout & retransmission. It takes only 931 ms for the response HTTP OK to reach, but still the connection is reset and the response is not send back to the serial port.
But, in the previous sequence, the ACK reaches in 963 ms which is greater than 931 ms and connection went through successfully.
The bottom line is that the Wiznet device is not obeying RFC 1122. 4.2.3.1 which clearly states that the receive timeout should initially be set to 3 seconds. The attached log clearly show that this is not the case when it is connected to the 3G router. Now, the 3 seconds is a default starting value and it is allowed to reduce this to match that of the data link. I suspect that part of the problem is that a cellular network is not as deterministic as broadband network, and the latency can go up and down based on interference. But on seeing the PC-3GRouter-2.pcapng log, PC still have latencies but managed to retain the connection with sufficient receive timout & RTO values.
In RFC 1122, under 4.2.3.1 Retransmission Timeout Calculation, it is stated that,
"There were two known problems with the RTO calculations
specified in RFC-793. First, the accurate measurement
of RTTs is difficult when there are retransmissions.
"
Did the 67 mS latency of the ACK in the first transfer influence how quickly the Wiznet device decided to timeout and retransmit?
logs.zip (16.7 KB)
RE: Missing Responses intermittently when used with 3G Router
by Praveena ·
Can you please share the email address of the support team so that we do share details and the original logs if you need?
It is more helpful if you arrange for a virtual meeting over phone or teams in a comfortable time for both of us.
RE: Missing Responses intermittently when used with 3G Router
by Alyn ·
Hi Wiznet Team, I am a work colleague of Praveena’s. It would be most helpful to have a call to discus the problem which Praveena has set out above; we could also invite the 3G router supplier to provide input directly. This issue is affecting a key project for us and we seek to resolve as soon as possible. Please let us know if the issue is being actively looked at and your availability for a call. Many Thanks !
RE: Missing Responses intermittently when used with 3G Router
by Willznet ·
Hi Praveena,
Sorry for the late reply.
The test we did last time, which is connecting PC to WIZnet module, and to an ethernet router, did not show the problem you are encountering.
Could you come up with the same test for us so as to analyze the problem more thoroughly? We would like to investigate this problem to see if the frequent retransmission problem arise solely from your WIZnet module or using you 3G router and WIZnet module together
For the RTO and RTT problems, we are looking into it. Thanks for reporting the issue.
The email address of our support team: support @ wiznet.hk