Sending file to FTP Server lasts so long...
-
I'm using the FileZilla client. If I want to send a file from a laptop to an FTP server, I have to wait a very long time to finish it (about 4 minutes). Does anyone know what can be a problem?
-
@dabal221 You have to tick the square box left to Ogranicz too
-
@jcaron
I set number of max connections as 1 but it cannot help solve the problem.
-
@dabal221 IIRC there’s an issue with FileZilla opening several connections at once by default while the built-in FTP server does not support it. There’s a setting to change in the FileZilla config for that, check the docs.
-
@dabal221 Hard to say. What is interesting is this initial "Answer 221", which is sent when a connection is closed. Do you have any other connection to the device open, like with pymakr? That would block ftp access.
Besides that: This initial connection is fast at my side. But I run my little modules in station mode and let them connect to my home networks Access Point. That way, the devices are already connected, and I can assign specific IP addresses to each device via ifconfig().
Sample transmission log:2019-04-27 17:04:05 7281 1 Status: Auflösen der IP-Adresse für fipy2 2019-04-27 17:04:05 7281 1 Status: Verbinde mit 10.0.0.148:21... 2019-04-27 17:04:05 7281 1 Status: Verbindung hergestellt, warte auf Willkommensnachricht... 2019-04-27 17:04:05 7281 1 Antwort: 220 Micropython FTP Server 2019-04-27 17:04:05 7281 1 Befehl: USER micro 2019-04-27 17:04:05 7281 1 Antwort: 331 2019-04-27 17:04:05 7281 1 Befehl: PASS ****** 2019-04-27 17:04:05 7281 1 Antwort: 230 2019-04-27 17:04:05 7281 1 Befehl: SYST 2019-04-27 17:04:05 7281 1 Antwort: 215 UNIX Type: L8 2019-04-27 17:04:05 7281 1 Befehl: FEAT 2019-04-27 17:04:05 7281 1 Antwort: 211 no-features 2019-04-27 17:04:05 7281 1 Status: Der Server unterstützt keine Nicht-ASCII-Zeichen. 2019-04-27 17:04:05 7281 1 Status: Angemeldet 2019-04-27 17:04:05 7281 1 Status: Empfange Verzeichnisinhalt für "/flash"... 2019-04-27 17:04:05 7281 1 Befehl: CWD /flash 2019-04-27 17:04:05 7281 1 Antwort: 250 2019-04-27 17:04:05 7281 1 Befehl: PWD 2019-04-27 17:04:05 7281 1 Antwort: 257 /flash 2019-04-27 17:04:05 7281 1 Befehl: TYPE I 2019-04-27 17:04:05 7281 1 Antwort: 200 2019-04-27 17:04:05 7281 1 Befehl: PASV 2019-04-27 17:04:05 7281 1 Antwort: 227 (10,0,0,148,7,232) 2019-04-27 17:04:05 7281 1 Befehl: LIST 2019-04-27 17:04:05 7281 1 Antwort: 150 2019-04-27 17:04:05 7281 1 Antwort: 226 2019-04-27 17:04:05 7281 1 Status: Anzeigen des Verzeichnisinhalts für "/flash" abgeschlossen 2019-04-27 17:04:08 7281 1 Status: Starte Download von /flash/ltetest.py 2019-04-27 17:04:08 7281 1 Befehl: PASV 2019-04-27 17:04:08 7281 1 Antwort: 227 (10,0,0,148,7,232) 2019-04-27 17:04:08 7281 1 Befehl: RETR ltetest.py 2019-04-27 17:04:08 7281 1 Antwort: 150 2019-04-27 17:04:08 7281 1 Antwort: 226 2019-04-27 17:04:08 7281 1 Status: Dateiübertragung erfolgreich, 641 Bytes in 1 Sekunde übertragen 2019-04-27 17:04:10 7281 1 Status: Verbindung zum Server getrennt
-
@robert-hh This is a log view message during a process of sending gps.py file to /flash/lib:
2019-04-27 16:12:37 27396 2 Status: Combination with 192. 168. 4. 1:21. . .
2019-04-27 16:12:37 27396 2 Status: Connection Establishment, waiting for the welcome message. . .
2019-04-27 16:16:13 27396 1 Answer 221
2019-04-27 16:16:13 27396 1 Status: Connection terminated by server
2019-04-27 16:16:13 27396 2 Answer 220 Micropython FTP Server
2019-04-27 16:16:13 27396 2 Command: USER micro
2019-04-27 16:16:13 27396 2 Answer 331
2019-04-27 16:16:13 27396 2 Command: PASSS BLEEP
2019-04-27 16:16:13 27396 2 Answer 230
2019-04-27 16:16:13 27396 2 Status: The server does not support non-ASCII characters.
2019-04-27 16:16:13 27396 2 Status: Logged in
2019-04-27 16:16:13 27396 2 Status: Beginning Sending C:-Users OneDrive Desktop EngineerTest_project_atom. py
2019-04-27 16:16:13 27396 2 Command: CWD /flash/lib
2019-04-27 16:16:13 27396 2 Answer 250
2019-04-27 16:16:13:13 27396 2 Command: TYPE A
2019-04-27 16:16:13 27396 2 Answer 200
2019-04-27 16:16:13 27396 2 Command: PASV
2019-04-27 16:16:13 27396 2 Answer 227 (192,168,4,1,7,232)
2019-04-27 16:16:13 27396 2 Command: STOR gps. py
2019-04-27 16:16:13 27396 2 Answer 150
2019-04-27 16:16:14 27396 2 Answer 226
2019-04-27 16:16:14 27396 2 Status: File transfer successfully completed, 0 bytes transferred in 1 second
2019-04-27 16:16:16:14 27396 2 Status: Getting a directory list in "/flash/lib";. . .
2019-04-27 16:16:14 27396 2 Command: TYPE I
2019-04-27 16:16:14 27396 2 Answer 200
2019-04-27 16:16:14 27396 2 Command: PASV
2019-04-27 16:16:14 27396 2 Answer 227 (192,168,4,1,7,232)
2019-04-27 16:16:14 27396 2 Command: LETTER
2019-04-27 16:16:14 27396 2 Answer 150
2019-04-27 16:16:14 27396 2 Answer 226
2019-04-27 16:16:14 27396 2 Status: Directory listing in "/flash/lib"; successfully completedBold lines indicate that there is a long delay at this stage. Any suggestions?
-
@dabal221 Activate the message log view in Filezilla and look, at which step it is waiting. Or, if possible, try command line ftp, which is more simple and definitely only uses base level commands and single connections. The command line version of ftp for windows is not supported by the pycom devices (no active mode). To use that, you have to install WSL/Linux first.
On windows, you may also try other ftp clients like ws_ftp or cyberduck.
-
@robert-hh
Unfortunately, I have all the settings set correctly according to the recommendations and that's why it's so hard for me to find the reason because I didn't find anything similar on the forum. Have you other suggestions?
-
@robert-hh said in Sending file to FTP Server lasts so long...:
And yes, if the wifi connection is poor, USB can work better.
Other devices don't have this problem. So I assume that error handling is not that good on this system. Or maybe it is only a problem of one charge. So you cannot reproduce it.
-
@crumble For getting files in and out of the xxPy devices there are only a few builtin options: ftp, some kind of USB transfer. Maybe pybytes too. I did not look into that yet. For me, ftp is much more convenient and reliable. USB transfer is only the fallback.
And yes, if the wifi connection is poor, USB can work better.
-
@robert-hh
using FTP is neither fast nor reliable. Maybe it depends on the signal quality.
-
@dabal221 It was not clear form you comment, whether you talk about ftp transfer in general or ftp transfer to a PyCom module. I do the latter routinely to exchange files with my pycom modules using filezilla, and it works fast and reliable. So please check the settings in filezilla. If you use Linux or OS X, you may also try command line ftp, in which it is more obvious what happens (don't forget the -p option when calling).
-
@robert-hh Of course it's related, as I can manage flash files on WiPy with an FTP connection, but it doesn't work well.
-
@robert-hh my guess would be https://docs.pycom.io/gettingstarted/programming/ftp.html
-
@dabal221 How is that related to PyCom products?
-
I experience the same issue most times.