FTP_CLIENT on Eaton stops after 4 kB transfer

Begonnen von karst, 11. November 2014, 12:08:06

Vorheriges Thema - Nächstes Thema

0 Mitglieder und 1 Gast betrachten dieses Thema.

karst

I try to send a file from an Eaton HMI/PLC to a FileZilla Server.
This works for files smaller than 4 kB. With larger files the FB times out with ERROR_T = 16#05 and ERROR_C = 16#03DE0096. (step 990, last response 150 opening data channel).
I know this works OK with the WAGO plc's so I made a compare.
Attached the Wireshark en LOG_CL debug info for the EATON and the WAGO.
But I can't find the reason why the connection on the data channel in the EATON is "gracefully timeout", PLC_PRG.FTP_CLIENT.IPC2.c_status = 253. Please help.
For EATON test plc contact on pm.

[gelöscht durch Administrator]

peewit

module ftp_client:

210:IF S_BUF2.SIZE = UINT#0 THEN (* warten bis alle daten gesendet sind *)
      IF FSD.FILE_SIZE - FSD.OFFSET > UDINT#0 THEN    <---- set a breakpoint here and check the fsd.filesize
         FSD.MODE := BYTE#1; (* vorhandene Datei zum lesen öffnen *)
         S_BUF2.SIZE := UINT#65535; (* maximale länge einlesen *)
         IP_C2.MAILBOX[2] := BYTE#1; (* IP Senden blockieren *)
         step := 200;
      ELSE
         IP_C2.C_ENABLE := FALSE; (* FTP Datenkanal schliessen *)
         step := 300;
      END_IF;
   END_IF;

karst

First time: FSD.FILE_SIZE = 21958
Second -- seventh time: FSD.FILE_SIZE = 21958
There after other program path with the time-out.
Attached the screen dump of the LOG_CL, the WireShark capture, my program and the test file.


[gelöscht durch Administrator]

peewit

one more test

VAR_GLOBAL CONSTANT
   NETWORK_BUFFER_LONG_SIZE : UINT := 4095;   <--- change to 2047 or less ...
   NETWORK_BUFFER_SHORT_SIZE : UINT := 1407;
   LOG_MAX : INT := 40;
   LOG_SIZE : INT := 80;
   ELEMENT_LENGTH : INT := 250;
END_VAR

karst

NETWORK_BUFFER_LONG_SIZE = 1500 same results as before. Timed out after 30 seconds. But I noticed after about 10 seconds the IP error in LOG-CL.MSG[74]. IP_ID 2 is for the data channel.

P.S. my next forum visit is likely coming Friday.

[gelöscht durch Administrator]

karst

Peewit,

I redid the test with NETWORK_BUFFER_LONG_SIZE = 1407 and break point in step 210, program halt on this break point 23 times. Only 1,37 KB of the test file (22 KB) is actually transporter to the ftp destination.
Somehow the FTP_CLIENT stops transmitting after the first data pack. What does the IP_ERROR mean in MSG[75], see attachment?

What can I do to get this solved?

[gelöscht durch Administrator]

Mullacott

Sorry to hijack your thread, but you are not the only one.

I have been having the same problem working on it for two weeks, it will only send a file up to what ever is set in NETWORK_BUFFER_LONG_SIZE : UINT := 4095;
Hope someone can help.


karst

OK now with a little smile: I patched the error!! (see the (* XXXX *) in the screenshot)

But the source of the error lays deeper in the library.
The interlocking between FTP_CLIENT, IP_CONTROL and FILE_SERVER is not completely correct. IP_CONTROL is instructed to send packets of zero size. This is very successful so the number of "bytes_sent" is indeed zero. This causes the c_status := 253 and a termination of the connection.

In my opinion the S_BUF.SIZE is being abused for handshaking. A possible way to solve this could be to expand the NETWORK_BUFFER type with a field for it's maximum size. This would require recoding of at least the three FB named above. Should I just carry on and send in what I think could be a solutions or are there other developing guidelines I should take in consideration?

[gelöscht durch Administrator]