Code Monkey home page Code Monkey logo

esp32_ftpserver_sd_mmc's Introduction

ESP32_FTPServer_SD

This code based from ESP32_FTPServer_SD from user robo8080 https://github.com/robo8080/ESP32_FTPServer_SD and Simple FTP Server for using esp8266 SPIFFs This version used ESP32 and SD card in SD_MMC mode (No SD lib, SD_MMC lib) and more than 3MB/s SD read/write speed. Added ful fuctional passive mode ftp server, browse dir, change dir, rename dir/file, delete dir/file, upload and download files, dir's. On esp32 wroom i can take up to 1050 KB/s downloading speed(need tune esp arduino SD_MMC lib)

esp32_ftpserver_sd_mmc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

esp32_ftpserver_sd_mmc's Issues

Upload data from ESP to FTP server

Hello @fa1ke5 just searching solution how to get data from SD card to FTP server (pc etc.).

I have data logging routines which save data into SD card (SDfat library) and would like to have 2 features:

  1. ability to access SD card from client (local server / pc) and download / upload or delete files
  2. ability to send files once per day to local FTP server (data backup)

Is this feasible with your library also upload data to FTP server ?

Thanks

error in main code

error in wifi.begin line as:invalid conversion from 'const char*' to 'char*' [-fpermissive]

error compiling for ESP32

When compiling I receive the below error:

'FtpServer' does not name a type; did you mean 'Server'?

making "ESP32_FTPServer_SD_MMC" working with the ESP32-CAM

Dear fa1ke5,

Thanks for your great code. I succeeded to make it works with the ESP32-CAM but with a small (and ugly modification) because it failed without it.

I easily succeeded to connect to the esp32-CAM with filezilla and observe the content of the directory of the sd card (pictures in my case). However, i failed to download the pictures or to upload any files on the sd card. I got the error : "501 No file name"

I check the ESP32FtpServer.cpp and try a "ugly trick" to see what happens. I simply comment the if (haveParameter()) and write something ugly to be sure to DO NOT enter in the "if" leading to the '501 No file name" error.

    // if (haveParameter())
    int x = 1;
    if (x == 2)
    {
      client.println("501 No file name");
    }

I did that for the RETR command and also for the STOR command and then I could magically download and upload my pictures without problem.

I have no idea about the reason for this behaviour but i suggest, if you are still maintaining this code, to rewrite / propose a patch so users using ESP32-CAM can directly use your code without this ugly modification.

Thanks again and all the best,

Viafx24

Error in main code

error in wifi.begin line as:invalid conversion from 'const char*' to 'char*' [-fpermissive]

MLSD command

Hi , just gave the example a test run.
couldn't drag'n drop a file into chrome , so connected with winscp
upload was fine at about 380kb/s
when I refreshed the DIR in winscp it was empty.
reloaded the ftp in chrome and the file listed ok.
added some folders with winscp but they show up as files in winscp .
winscp doesn't show the folder name "New Folder" perhaps because of the white space ?
here is some of the console.
28/06/20 18:29:06.741 Ftp server waiting for connection on port 21
28/06/20 18:29:06.747 Client connected!
28/06/20 18:29:06.801 USER esp32
28/06/20 18:29:06.856 PASS esp32
28/06/20 18:29:06.856 OK. Waiting for commands.
28/06/20 18:29:06.912 SYST
28/06/20 18:29:06.965 PWD
28/06/20 18:29:07.018 TYPE I
28/06/20 18:29:07.072 SIZE /
28/06/20 18:29:07.196 CWD /
28/06/20 18:29:07.253 PASV
28/06/20 18:29:07.253 Connection management set to passive
28/06/20 18:29:07.261 Data port set to 50009
28/06/20 18:29:07.316 LIST -l
28/06/20 18:29:07.324 ftpdataserver client....
28/06/20 18:29:07.324 File Name = babynames-gendered-2015.db
28/06/20 18:29:07.332 File Name = census2000names.db
28/06/20 18:29:07.332 File Name = mdr512.db
28/06/20 18:29:07.332 File Name = Data
28/06/20 18:29:07.373 QUIT
28/06/20 18:29:07.373 Disconnecting client
28/06/20 18:29:07.381 Ftp server waiting for connection on port 21
28/06/20 19:00:36.509 Client connected!
28/06/20 19:00:36.619 USER esp32
28/06/20 19:00:36.666 PASS esp32
28/06/20 19:00:36.666 OK. Waiting for commands.
28/06/20 19:00:36.822 SYST
28/06/20 19:00:36.916 FEAT
28/06/20 19:00:37.043 PWD
28/06/20 19:00:37.122 CWD /
28/06/20 19:00:37.231 PWD
28/06/20 19:00:37.325 TYPE A
28/06/20 19:00:37.434 PASV
28/06/20 19:00:37.434 Connection management set to passive
28/06/20 19:00:37.450 Data port set to 50009
28/06/20 19:00:37.543 MLSD
28/06/20 19:00:37.559 ftpdataserver client....
28/06/20 19:00:51.153 TYPE A
28/06/20 19:00:51.200 PASV
28/06/20 19:00:51.200 Connection management set to passive
28/06/20 19:00:51.216 Data port set to 50009
28/06/20 19:00:51.357 RETR Data
28/06/20 19:00:51.388 ftpdataserver client....
28/06/20 19:00:51.388 Sending Data
28/06/20 19:01:21.570 TYPE A
28/06/20 19:01:51.585 REST 0
28/06/20 19:02:21.476 PWD
28/06/20 19:02:51.477 TYPE I
28/06/20 19:02:51.618 TYPE A
28/06/20 19:02:51.665 PASV
28/06/20 19:02:51.665 Connection management set to passive
28/06/20 19:02:51.680 Data port set to 50009
28/06/20 19:02:51.727 MLSD
28/06/20 19:02:51.743 ftpdataserver client....
28/06/20 19:03:21.483 TYPE A
28/06/20 19:03:51.476 REST 0
28/06/20 19:04:21.493 TYPE I
28/06/20 19:04:51.492 TYPE A
28/06/20 19:04:52.214 TYPE A
28/06/20 19:04:52.261 PASV
28/06/20 19:04:52.261 Connection management set to passive
28/06/20 19:04:52.276 Data port set to 50009
28/06/20 19:04:52.417 MLSD
28/06/20 19:04:52.448 ftpdataserver client....
28/06/20 19:05:22.526 TYPE I
28/06/20 19:05:52.530 REST 0
28/06/20 19:06:22.524 TYPE I
28/06/20 19:06:52.537 TYPE I
28/06/20 19:06:52.749 TYPE A
28/06/20 19:06:52.800 PASV
28/06/20 19:06:52.800 Connection management set to passive
28/06/20 19:06:52.810 Data port set to 50009
28/06/20 19:06:52.850 MLSD
28/06/20 19:06:52.857 ftpdataserver client....
28/06/20 19:07:22.542 TYPE A
28/06/20 19:07:52.545 TYPE I
28/06/20 19:08:22.551 TYPE I
28/06/20 19:08:52.558 TYPE A
28/06/20 19:08:53.368 TYPE A
28/06/20 19:08:53.477 PASV
28/06/20 19:08:53.477 Connection management set to passive
28/06/20 19:08:53.493 Data port set to 50009
28/06/20 19:08:53.524 MLSD
28/06/20 19:08:53.539 ftpdataserver client....
28/06/20 19:08:53.649 CWD /
28/06/20 19:08:53.711 MKD New folder
28/06/20 19:08:53.852 TYPE A
28/06/20 19:08:53.914 PASV
28/06/20 19:08:53.914 Connection management set to passive
28/06/20 19:08:53.930 Data port set to 50009
28/06/20 19:08:53.989 MLSD
28/06/20 19:08:53.989 ftpdataserver client....
28/06/20 19:09:10.976 CWD /
28/06/20 19:09:11.085 MKD TestFolder
28/06/20 19:09:11.226 TYPE A
28/06/20 19:09:11.398 PASV
28/06/20 19:09:11.398 Connection management set to passive
28/06/20 19:09:11.398 Data port set to 50009
28/06/20 19:09:11.445 MLSD
28/06/20 19:09:11.445 ftpdataserver client....
28/06/20 19:09:41.501 REST 0
28/06/20 19:10:11.602 REST 0
28/06/20 19:10:41.533 REST 0
28/06/20 19:11:11.514 PWD
28/06/20 19:11:11.913 TYPE A
28/06/20 19:11:12.038 PASV
28/06/20 19:11:12.038 Connection management set to passive
28/06/20 19:11:12.054 Data port set to 50009
28/06/20 19:11:12.117 MLSD
28/06/20 19:11:12.132 ftpdataserver client....
28/06/20 19:11:42.547 TYPE I

WINSCP View (MLSD)
winscp_MLSD

Chrome View (LIST)
chrome_LIST

Might get an opportunity to debug this so will keep ya posted.
Regards
Barry

There are some bugs

Thank you for sharing this project.
However, some shortcomings were found during my analysis of the source code of this project.

Line 125
else if (!client.connected() || !client)
Methods "client.connected()" and methods "client::bool()" have the same effect

Line 338
char * p = strchr( parameters, ',' );
If parameters is empty, function strchr( const char* str, int ch ) will return NULL
If p = NULL, "++p" will throw an exception

Line 567
There is a invalid branch, which conflicts with Line565

Line 402
Line 404
There is an if-else-if construct which can replaced by "if (haveParameter() && makePath(path))"
The latter is safer
Same for Line 560, Line 590, Line 691, Line 742

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.