Problems with WIZ812MJ FTP implementation
IO Modules
No replies yet. Be the first to reply.
Join the discussion.
IO Modules
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: Problems with WIZ812MJ FTP implementation
by Eugeny ·
Before ESTABLISHED state, you must issue CONNECT command to the chip. I am sure you do it because CLOSE states you mention will not appear if you do not issue connect. It seems the issue is somewhere in the communication and one of the devices (WIZ or server) terminates the conneciton. The best way to see what is going on is to use Wireshark to capture packets and see what is being exchnaged within the respective TCP session. Install Wireshark on the server (if it is possible).
RE: RE: Problems with WIZ812MJ FTP implementation
by roty ·
Thanks for the answer.
Sure I do CONNECT . I also watched the TCP/IP transfer with Wireshark, installed
on client.( My FTP server is located on a little board with an ARM7 CPU).
However, I (I’m just a hobbyist) can not see a basic difference between the
result in case request of LIST/MLSD and STORE by the client.
The green comments on top are debug information by my server. It shows the
instant disconnect of the Data socket.
It seem the client starts upload of the short file in this example (FTP-Data).
These are debug information in case of LIST/MLSD.
Do you see more about the issue? I really appreciate any help.
Thanks
Robert
RE: Problems with WIZ812MJ FTP implementation
by Eugeny ·
In the wireshark log picture (you’d better upload log itself) you can see that WIZ (19) connects to server (170), then server sends some data (211 bytes) and then server says that it has nothing more to say almost immediately. Am I mistaken that FTP data session requires two concurrent connections?
RE: Problems with WIZ812MJ FTP implementation
by roty ·
Thank you again for looking at the problem.
That’s right. Of cause, I’m using two sockets , one with port 21 (Command-Socket)and another with port 20 (Data-Socket). The basic example is the WIZ5500 Server example which uses the same settings.
The Command socket works correct and as expected. Just Data Socket makes problems in case of upload from client to server.
Regards
Robert
RE: Problems with WIZ812MJ FTP implementation
by Eugeny ·
You will make one step further if look into the packet at port 20 to see what server actually says to client before closing the connection. I wonder if it says something like “authentication failed” and exits. I do not recall exact protocol (was implementing [writing code for] FTP once or twice), but you got the idea.
RE: Problems with WIZ812MJ FTP implementation
by roty ·
Eugeny ,
You indirectly gave me possibly a hint about my problem!
It seems, checking ESTABLISHED will not be done on time in my case. It is different
from the WIZ5500 example. So it seems in case of very short data transfers , I miss
this state. I found longer files can be transferred!
However, I still do not understand what causes socket to close without a command.
Could it be there is a kind of “auto close” after last FTP-Data transmission ? I don’t know.
I’ll now try to improve speed of checking socket states.
Thank you very much for your help.
Robert
RE: Problems with WIZ812MJ FTP implementation
by Eugeny ·
I do not understand. What is “on time”? If you talk about 15 seconds delay, then probably you are right, control connection may expire. But if you talk about milliseconds, then it should not be the cause.
So what server is saying in the packet before it closes the connection? Do not perform guesses, look into evidence given you already have them.
RE: Problems with WIZ812MJ FTP implementation
by roty ·
Excuse me if I’m not as precise as I should be.
I do not talk about the Command Port 21 , I just talk about Data Port 20 connection.
Please refer to the first picture I sent. The Client (170) starts short Data transmission (line 10) on port 20 (FTP-D…) to the Server (19) and immediately ( line 11) the Client sends [FIN][ACK] to the Server (19) also on port 20. Port 20 connection for STOR ends with line 14 on TCP level . This happens within around 20ms , if I’m not wrong. At least that’s my interpretation.
I still “assume” the socket for port 20 will be closed anyhow in between or after line 12 and 14.
Regards
Robert
RE: Problems with WIZ812MJ FTP implementation
by Eugeny ·
My apologies, it is me who messed the things. I thought that module is client, but in your case it is server.
So: .19 is FTP server (WIZ) and .170 is FTP client. And server (19) connects to the client (170), and then client (170) sends 211 bytes of data and almost immediately finishes (packet #11).
Am I correct here? Or I have again messed something?
RE: Problems with WIZ812MJ FTP implementation
by roty ·
That’s absolutely correct.
I’m not an expert and it could be I burk up the wrong tree!
But don’t waste your time with me.
Robert
RE: Problems with WIZ812MJ FTP implementation
by Eugeny ·
But then it means that client closes the connection - without receiving anything material - within 26 microseconds! Maybe it has just sent all the data within these 211 bytes - what is the actual data size?