Last update: The low WiFi transfer speed was caused by the log messages.
Now without the log message I transferred 1MiB (1048576 bytes) in 5s: Sat Jan 7 13:40:41 2023 [pid 158190] [ftpclient] FTP command: Client "::ffff:192.168.0.2", "EPSV" Sat Jan 7 13:40:41 2023 [pid 158190] [ftpclient] FTP response: Client "::ffff:192.168.0.2", "229 Entering Extended Passive Mode (|||41433|)" Sat Jan 7 13:40:41 2023 [pid 158190] [ftpclient] FTP command: Client "::ffff:192.168.0.2", "TYPE I" Sat Jan 7 13:40:41 2023 [pid 158190] [ftpclient] FTP response: Client "::ffff:192.168.0.2", "200 Switching to Binary mode." Sat Jan 7 13:40:41 2023 [pid 158190] [ftpclient] FTP command: Client "::ffff:192.168.0.2", "STOR files/test.bin" Sat Jan 7 13:40:41 2023 [pid 158190] [ftpclient] FTP response: Client "::ffff:192.168.0.2", "150 Ok to send data." Sat Jan 7 13:40:46 2023 [pid 158190] [ftpclient] OK UPLOAD: Client "::ffff:192.168.0.2", "/files/test.bin", 1048576 bytes, 186.42Kbyte/sec Sat Jan 7 13:40:46 2023 [pid 158190] [ftpclient] FTP response: Client "::ffff:192.168.0.2", "226 Transfer complete." BR, Alan On 1/7/23, Alan C. Assis <acas...@gmail.com> wrote: > Replying myself (because it will save someone else life in the future) > > I enabled the network debug and noticed these IOB suspicious "warning" msg: > > devif_poll: WARNING: IOB Prepare failed for dev wlan0! > > Then after some investigation I just changed the IOB Throttle from 0 to: > > CONFIG_IOB_THROTTLE=12 > > It was enough to make FTP client work again: > > Sat Jan 7 13:15:28 2023 [pid 132850] [ftpclient] FTP response: Client > "::ffff:192.168.0.2", "229 Entering Extended Passive Mode (|||42678|)" > Sat Jan 7 13:15:28 2023 [pid 132850] [ftpclient] FTP command: Client > "::ffff:192.168.0.2", "TYPE I" > Sat Jan 7 13:15:28 2023 [pid 132850] [ftpclient] FTP response: Client > "::ffff:192.168.0.2", "200 Switching to Binary mode." > Sat Jan 7 13:15:28 2023 [pid 132850] [ftpclient] FTP command: Client > "::ffff:192.168.0.2", "STOR files/test.bin" > Sat Jan 7 13:15:28 2023 [pid 132850] [ftpclient] FTP response: Client > "::ffff:192.168.0.2", "150 Ok to send data." > Sat Jan 7 13:22:37 2023 [pid 132850] [ftpclient] OK UPLOAD: Client > "::ffff:192.168.0.2", "/files/test.bin", 1048576 bytes, 2.38Kbyte/sec > Sat Jan 7 13:22:37 2023 [pid 132850] [ftpclient] FTP response: Client > "::ffff:192.168.0.2", "226 Transfer complete." > > The network speed for ESP32 seems a little bit low, but it is another > chapter. > > BR, > > Alan > > On 1/7/23, Alan C. Assis <acas...@gmail.com> wrote: >> Hi Everyone, >> >> I noticed that ftpc example is not working correctly, at least here in my >> board. >> >> So before opening an issue on github (case it is some issue with my >> board config) I want to ask if someone tested the ftpc recently and if >> it worked for you? >> >> First thing I noticed is the "nfc" prompt is not displayed correctly, >> so I replaced it with a printf("ftp>\n"); just to confirm that the >> prompt was there. >> >> These are the tests I did: >> >> #ON NuttX side: >> >> NuttShell (NSH) NuttX-11.0.0 >> >> nsh> ftpc -4 192.168.0.5 >> >> NuttX FTP Client: >> ftp> >> login ftpuser YourPassHere >> >> ftp> >> get test.txt /mnt/esp/wifi/test.txt >> get failed: 9 >> >> ftp> >> get test.txt /mnt/esp/wifi/test2.txt >> >> ftp> >> put -b /mnt/esp/wifi/track.db files/test.bin >> put failed: 9 >> >> ftp> >> put -b /mnt/esp/wifi/track.db files/test2.bin >> (stopped forever) >> >> >> # ON Linux side running vsFTPd with verbose log enabled: >> >> Connection / Login *always* work: >> >> Sat Jan 7 11:47:53 2023 [pid 97277] CONNECT: Client "::ffff:192.168.0.2" >> Sat Jan 7 11:47:53 2023 [pid 97277] FTP response: Client >> "::ffff:192.168.0.2", "220 (vsFTPd 3.0.3)" >> Sat Jan 7 11:48:00 2023 [pid 97277] FTP command: Client >> "::ffff:192.168.0.2", "USER ftpclient" >> Sat Jan 7 11:48:00 2023 [pid 97277] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "331 Please specify the password." >> Sat Jan 7 11:48:00 2023 [pid 97277] [ftpclient] FTP command: Client >> "::ffff:192.168.0.2", "PASS <password>" >> >> Sat Jan 7 11:48:00 2023 [pid 97276] [ftpclient] OK LOGIN: Client >> "::ffff:192.168.0.2" >> Sat Jan 7 11:48:00 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "230 Login successful." >> Sat Jan 7 11:48:00 2023 [pid 97278] [ftpclient] FTP command: Client >> "::ffff:192.168.0.2", "PWD" >> Sat Jan 7 11:48:00 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "257 "/" is the current directory" >> >> First test.txt download failed silently: >> >> Sat Jan 7 11:48:06 2023 [pid 97278] [ftpclient] FTP command: Client >> "::ffff:192.168.0.2", "EPSV" >> Sat Jan 7 11:48:06 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "229 Entering Extended Passive Mode (|||58008|)" >> Sat Jan 7 11:48:39 2023 [pid 96817] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "421 Timeout." >> >> Second test.txt download worked: >> >> Sat Jan 7 11:50:42 2023 [pid 97278] [ftpclient] FTP command: Client >> "::ffff:192.168.0.2", "EPSV" >> Sat Jan 7 11:50:42 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "229 Entering Extended Passive Mode (|||42641|)" >> Sat Jan 7 11:50:42 2023 [pid 97278] [ftpclient] FTP command: Client >> "::ffff:192.168.0.2", "TYPE A" >> Sat Jan 7 11:50:42 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "200 Switching to ASCII mode." >> Sat Jan 7 11:50:42 2023 [pid 97278] [ftpclient] FTP command: Client >> "::ffff:192.168.0.2", "RETR test.txt" >> Sat Jan 7 11:50:42 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "150 Opening BINARY mode data connection for >> test.txt (20 bytes)." >> Sat Jan 7 11:50:42 2023 [pid 97278] [ftpclient] OK DOWNLOAD: Client >> "::ffff:192.168.0.2", "/test.txt", 20 bytes, 3.00Kbyte/sec >> Sat Jan 7 11:50:42 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "226 Transfer complete." >> >> First test.bin upload failed silently: >> >> Sat Jan 7 11:51:06 2023 [pid 97278] [ftpclient] FTP command: Client >> "::ffff:192.168.0.2", "EPSV" >> Sat Jan 7 11:51:06 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "229 Entering Extended Passive Mode (|||54653|)" >> >> Second test.bin upload failed by timeout: >> >> Sat Jan 7 11:53:19 2023 [pid 97278] [ftpclient] FTP command: Client >> "::ffff:192.168.0.2", "EPSV" >> Sat Jan 7 11:53:19 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "229 Entering Extended Passive Mode (|||47157|)" >> Sat Jan 7 11:53:19 2023 [pid 97278] [ftpclient] FTP command: Client >> "::ffff:192.168.0.2", "TYPE I" >> Sat Jan 7 11:53:19 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "200 Switching to Binary mode." >> Sat Jan 7 11:53:19 2023 [pid 97278] [ftpclient] FTP command: Client >> "::ffff:192.168.0.2", "STOR files/test2.bin" >> Sat Jan 7 11:53:19 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "150 Ok to send data." >> Sat Jan 7 11:58:19 2023 [pid 97278] [ftpclient] FAIL UPLOAD: Client >> "::ffff:192.168.0.2", "/files/test2.db", 0.00Kbyte/sec >> Sat Jan 7 11:58:19 2023 [pid 97278] [ftpclient] FTP response: Client >> "::ffff:192.168.0.2", "421 Data timeout. Reconnect. Sorry." >> >> >> If you want to test file transfer from/to NuttX/Linux I wrote down the >> process here: >> >> https://acassis.wordpress.com/2023/01/07/setup-ftp-server-on-ubuntu/ >> >> BR, >> >> Alan >> >