Line break recovery fails
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
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: Line break recovery fails
by Phono ·
One further information: I have added a software SPI to the loop code, so as to transmit serially the value of the Status Register when blocked in the loop. Apparently, the SR is 1 in this state, which means ARP being sent. Since there is no traffic at that time (according to WireShark), the timeout mechanism seems not to operate, as the status never changes to CLOSED nor is the Timeout flag raised in the interrupt register.
Is this a bug of the W5200 chip?
RE: Line break recovery fails
by Phono ·
I added to my code a workaround: a timeout when the state is ARP. So the loop exits and the whole initialisation process is restarted. I have tested this, and so far, it seems to recover as expected.
I am still curious to know the whereabouts of the W5200 regarding this issue.
RE: RE: Line break recovery fails
by Eugeny ·
You must troubleshoot both sides, not only client side.
When reconnecting, your client seem to use same local (source) port number, and of course server will respond with RST/ACK, because the connection with specified local port is already established. You must use another port number for reconnection, and server must have hardware/software means to monitor hung TCP sockets - the open sockets in TCP mode having no activity within specified period of time.
Were your code waiting for enough time for timeout to happen before doing anything else? See formula for the timeout calculation in the datasheet, time calculation it is not that straightforward.
RE: Line break recovery fails
by Phono ·
Evgueny, initially my software did not have a timeout mechanism, and it would wait for hours because the chip never raised the timeout flag, nor did it return the socket to the closed state. It was stuck in the ARP state, thus my workaround to put a timeout when in this state.