5/22/2019 10:35 AM | |
Joined: 5/22/2019 Last visit: 10/16/2024 Posts: 43 Rating: (0) |
TIA Version : V15 Update 4 Hardware Modules: CPU 1517F-3 PN/DP, 6ES7 517-3FP00-0AB0, Hardware 7, firmware V2.6.0 CP 1543-1, 6GK7 543-1AX00-0XE0, Hardware 3, firmware V2.1.4 Short version: With both ethernet interfaces integrated in the CPU, using tdiscon on an established tcp connection sends a RST instead of a FIN so the connection isn't closed cleanly. If I use the CP instead, tdiscon sends a FIN but after a 3 seconds delay. Long version: after implementing the ftp communication with the cp using FTP_CMD (I managed it in spite of the pitiful documentation and badly designed examples), I'm now trying the FTP communication without the CP (I'll need it in a 1200 project). The project here: https://support.industry.siemens.com/cs/ww/en/view/81367009 doesn't work (maybe it does with filezilla as a server, but with three other different servers I tried it doesn't, and it doesn't surprise me looking at the implementation), so I implemented my own version of an ftp client. I have it mostly working, but I cannot send files to the server, only read them: the server always complains about connection reset by peer. I traced the connection with wireshark and I saw what I described above: when I finish sending the data, I close the data connection with tdiscon, but instead of closing it with a FIN flag it closes it with a RST flag, so the server correctly gives the error connection reset by peer. I also tried using the CP instead of the integrated ethernet interfaces. The cp correctly sends the FIN but it does so after 3 seconds (an unnecessary delay, besides I'd like to use the integrated ports). Now I'm trying to get hold of a 1200 cpu to see if it does implement the TCP protocol correctly, but I kinda doubt it. Since the only parameter I can give to tdiscon is the id, maybe there is an undocumented parameter/connection type that I can give to tcon in order to use FIN instead of RST when closing the connection? Side question: why oh why doesn't the system allow me to put both integrated interfaces in the same subnet? |
Last edited by: olivluca at: 05/22/2019 12:14:13Last edited by: Jen_Moderator at: 05/22/2019 14:51:11Optimized link. |
|
This contribution was helpful to1 thankful Users |
5/22/2019 11:45 AM | |
Joined: 5/22/2019 Last visit: 10/16/2024 Posts: 43 Rating: (0) |
I tried with a different cpu (CPU 1513F-1 PN, 6ES7 513-1FL02-0AB0, Hardware 2, Firmware V2.6.0) and it does exactly the same. In the image (wireshark screen capture) 192.168.1.6 is the server and 192.168.1.22 is the 1500. Edit I also attached the capture file (zipped since the forum doesn't allow the pcapng extension). Attachment1500.zip (660 Downloads) |
Last edited by: olivluca at: 05/22/2019 11:50:29 |
|
5/22/2019 12:50 PM | |
Joined: 5/22/2019 Last visit: 10/16/2024 Posts: 43 Rating: (0) |
For completeness sake, here's the wireshark capture if I use the cp for the connection. Notice the 3 seconds delay between the data packet and the FIN packet. The program is the same, i.e. I call the tdiscon at the same time in both cases, so the 3 seconds delay is produced by the cp. The capture file is attached. Attachmentcp.zip (696 Downloads) |
5/22/2019 5:19 PM | |
Joined: 5/22/2019 Last visit: 10/16/2024 Posts: 43 Rating: (0) |
I just found out there's an upgraded firmware for the cpu (V2.6.1). I upgraded it but it does the same. |
5/22/2019 7:33 PM | |
Posts: 3093 Rating: (323)
|
Hello, Regards, |
This contribution was helpful to1 thankful Users |
5/22/2019 8:06 PM | |
Joined: 5/22/2019 Last visit: 10/16/2024 Posts: 43 Rating: (0) |
I just did, let's see... |
Follow us on