Home › Forums › The libraries hosted on the site › Simple FTP Server › FTP Server using ESP32 with SD Card
- This topic has 7 replies, 5 voices, and was last updated 2 weeks, 3 days ago by
Renzo Mischianti.
-
AuthorPosts
-
-
20 March 2023 at 21:36 #24871
Hi Renzo….
I want to create ESP32 as FTP Server with SD Card but it is failed. So, I will to explain what I have done as below.
1. I have try it without SD Card so it means I use SPIFFS methode and you see the arduino code on picture 1 & its FtpServerKey.h file also on picture 8, picture 9, picture 10 and picture 11.
2. Then I have setting in the FileZilla, you can see on picture 3, picture 4, picture 5, picture 6 and picture 7.
3. Then I upload the arduino codes successfully, you can see on picture 2.
4. Then I connect the FileZilla and the directory is successfully listing, you can see on picture 12.
5. Then I try to upload and download the file is success, you can see on picture 13 and picure 14.
6. After that I try using SD Card and I edit the arduino code, you can see on picture 15.
7. Then I also change #define DEFAULT_STORAGE_TYPE_ESP32 STORAGE_SPIFFS with #define DEFAULT_STORAGE_TYPE_ESP32 STORAGE_SD in FtpServerKey.h file, you can see on picture 16.
8. Then I upload the arduino codes successfully, you can see on picture 17.
9. Setting’s FileZilla is same as before, so connect it directly. the directory is successfully listing, you can see on picture 18.
10. After that, I try to download and upload the file but it was unsuccessful.Can you assit me to solve this, maybe there is something wrong with arduino code or anything ? Thank you in advanced. All picture I attached in 1 pdf file (Discuss.pdf)
Attachments:
You must be logged in to view attached files. -
30 September 2023 at 06:54 #27715
Using ESP32 DevkitV1 with Micro SD card
using
https://github.com/xreef/SimpleFTPServer/blob/master/examples/Arduino_esp32_SD/Arduino_esp32_SD.inoModify FtpServerKey.h file
#define DEFAULT_STORAGE_TYPE_ESP32 STORAGE_SDmodify Arduino code:
–> change ssid & password
–>and below code
SPI.begin(18, 19, 23, 5); //SCK, MISO, MOSI,SS
if (SD.begin(5, SPI)) {OK for:
–>show SD card all folder and file
–>Download file from ESP32 FTP Server(SD Card) is OKProblem:Upload to ESP32 FTP Server not possible.
Using FileZilla Client (i also use other FTP Client software WinSCP)
FileZilla Client config:
Protocol:FTP
Host:192.168.0.101 Port:21
Encryption:only use plain FTP(insecure)
Login Type:Normal
User:My ESP32 FTP server user
Password:My ESP32 FTP server passwordError for Upload:
Status: Connecting to 192.168.0.101:21…
Status: Connection established, waiting for welcome message…
Status: Plain FTP is insecure. Please switch to FTP over TLS.
Status: Logged in
Status: Retrieving directory listing…
Status: Directory listing of “/” successful
Status: Starting upload of D:\test1.txt
Command: TYPE A
Response: 200 TYPE is now ASCII
Command: PASV
Response: 227 Entering Passive Mode (192,168,0,101,195,89)
Command: STOR test1.txt
Error: Disconnected from server: ECONNABORTED – Connection aborted
Error: File transfer failed
Status: Connecting to 192.168.0.101:21…
Status: Connection established, waiting for welcome message…
Status: Plain FTP is insecure. Please switch to FTP over TLS.
Status: Logged in
Status: Starting upload of D:\test1.txt
Status: Retrieving directory listing of “/”…
Command: TYPE I
Response: 200 TYPE is now 8-bit binary
Command: PASV
Response: 227 Entering Passive Mode (192,168,0,101,195,89)
Command: MLSD
Response: 150 Accepted data connection to port 50009
Response: 226-options: -a -l
Response: 226 5 matches total
Command: TYPE A
Response: 200 TYPE is now ASCII
Command: PASV
Response: 227 Entering Passive Mode (192,168,0,101,195,89)
Command: STOR test1.txt
Error: Disconnected from server: ECONNABORTED – Connection aborted
Error: File transfer failed
Status: Connecting to 192.168.0.101:21…
Status: Connection established, waiting for welcome message…
Status: Plain FTP is insecure. Please switch to FTP over TLS.
Status: Logged in
Status: Starting upload of D:\test1.txt
Status: Retrieving directory listing of “/”…
Command: TYPE I
Response: 200 TYPE is now 8-bit binary
Command: PASV
Response: 227 Entering Passive Mode (192,168,0,101,195,89)
Command: MLSD
Response: 150 Accepted data connection to port 50009
Response: 226-options: -a -l
Response: 226 5 matches total
Command: TYPE A
Response: 200 TYPE is now ASCII
Command: PASV
Response: 227 Entering Passive Mode (192,168,0,101,195,89)
Command: STOR test1.txt
Error: Connection timed out after 20 seconds of inactivity
Error: File transfer failedCan you help me. 6 day lot of thing try but not work. 🙁
-
9 December 2023 at 21:40 #28631
I think I have a similar issue.
mega2560 with w5100 shield.
using the example in simple ftp server, Arduino Ethernet, SD or SDFAT, client: tried everything.
dirlist ok, download ok, upload: nothing. no debug messages, client just disconnects for timeout.
-
11 December 2023 at 16:18 #28638
Hi all,
Do you have to follow the guide to configure the FTP client?
Bye RM -
28 April 2025 at 23:10 #32468
hello,please can you tell me where to add the following lines ie which file do I alter?
SPI.begin(18, 19, 23, 5); //SCK, MISO, MOSI,SS
if (SD.begin(5, SPI)) {Thankyou
-
30 April 2025 at 08:34 #32469
Hi,
you can find an example here.Check also the documentation here.
FTP Server using ESP32 with SD CardBye Renzo
-
30 April 2025 at 14:51 #32470
So do you just add the following section of code…
SPI.begin(18, 19, 23, 5); //SCK, MISO, MOSI,SS
if (SD.begin(5, SPI)) {into the Arduino_esp32_SD.ino file then?
Any particular section?
Many thanks in advance 🙂
-
This reply was modified 2 weeks, 5 days ago by
lordwhiteley.
-
This reply was modified 2 weeks, 5 days ago by
-
2 May 2025 at 17:32 #32478
Put in substitution of the original SD.begin declaration.
Bye Renzo
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.