SimpleFTPServer

所属分类:处理器开发
开发工具:C++
文件大小:54KB
下载次数:1
上传日期:2023-02-07 16:22:26
上 传 者sh-1993
说明:  用于Arduino、ArduinoSAMD WiFiNINA、esp8266、esp32、stm32和Raspberry Pi Pico W的简单FTP服务器
(A simple FTP server for Arduino, ArduinoSAMD WiFiNINA, esp8266, esp32, stm32 and Raspberry Pi Pico W)

文件列表:
.project (208, 2023-08-28)
FtpServer.cpp (65206, 2023-08-28)
FtpServer.h (25114, 2023-08-28)
FtpServerKey.h (4938, 2023-08-28)
LICENSE.md (1281, 2023-08-28)
SimpleFTPServer.h (347, 2023-08-28)
examples (0, 2023-08-28)
examples\Arduino_Ethernet (0, 2023-08-28)
examples\Arduino_Ethernet\Arduino_Ethernet.ino (1716, 2023-08-28)
examples\Arduino_Ethernet_SdFat2 (0, 2023-08-28)
examples\Arduino_Ethernet_SdFat2\Arduino_Ethernet_SdFat2.ino (4017, 2023-08-28)
examples\Arduino_esp32_SD (0, 2023-08-28)
examples\Arduino_esp32_SD\Arduino_esp32_SD.ino (2463, 2023-08-28)
examples\ESP32_AP_FFAT_WiFi (0, 2023-08-28)
examples\ESP32_AP_FFAT_WiFi\ESP32_AP_FFAT_WiFi.ino (3179, 2023-08-28)
examples\ESP32_FFAT_WiFi (0, 2023-08-28)
examples\ESP32_FFAT_WiFi\ESP32_FFAT_WiFi.ino (2640, 2023-08-28)
examples\ESP32_FFAT_enc28j60 (0, 2023-08-28)
examples\ESP32_FFAT_enc28j60\ESP32_FFAT_enc28j60.ino (3600, 2023-08-28)
examples\ESP32_SPIFM_WiFi (0, 2023-08-28)
examples\ESP32_SPIFM_WiFi\ESP32_SPIFM_WiFi.ino (4052, 2023-08-28)
examples\RaspberryPiPicoW_LittleFS_WiFi (0, 2023-08-28)
examples\RaspberryPiPicoW_LittleFS_WiFi\RaspberryPiPicoW_LittleFS_WiFi.ino (2574, 2023-08-28)
examples\STM32_SPIFlash_enc28j60 (0, 2023-08-28)
examples\STM32_SPIFlash_enc28j60\STM32_SPIFlash_enc28j60.ino (3977, 2023-08-28)
examples\STM32_SdFat_enc28j60 (0, 2023-08-28)
examples\STM32_SdFat_enc28j60\STM32_SdFat_enc28j60.ino (3985, 2023-08-28)
examples\STM32_SdFat_w5500 (0, 2023-08-28)
examples\STM32_SdFat_w5500\STM32_SdFat_w5500.ino (3758, 2023-08-28)
examples\Wio_terminal (0, 2023-08-28)
examples\Wio_terminal\Wio_terminal.ino (2364, 2023-08-28)
examples\Wio_terminal_SdFat (0, 2023-08-28)
examples\Wio_terminal_SdFat\Wio_terminal_SdFat.ino (2184, 2023-08-28)
examples\Wio_terminal_SdFat_TFT_monitor (0, 2023-08-28)
examples\Wio_terminal_SdFat_TFT_monitor\Wio_terminal_SdFat_TFT_monitor.ino (9945, 2023-08-28)
examples\esp8266_esp32_LittleFS (0, 2023-08-28)
examples\esp8266_esp32_LittleFS\esp8266_esp32_LittleFS.ino (2774, 2023-08-28)
examples\esp8266_esp32_SPIFFS (0, 2023-08-28)
... ...

# SimpleFTPServer [Instruction on FTP server on esp8266 and esp32](https://www.mischianti.org/2020/02/08/ftp-server-on-esp8266-and-esp32) [Simple FTP Server library now with support for Wio Terminal and SD](https://www.mischianti.org/2021/07/01/simple-ftp-server-library-now-with-support-for-wio-terminal-and-sd/) #### Simple FTP Server for - Raspberry Pi Pico W (Flash: LittleFS) (To test SD and SdFat) - esp8266 (Flash: SPIFFs, LittleFS. SD: SD, SdFat 2) - esp32 (SPIFFS, LITTLEFS, FFAT, SD: SD, SdFat) - stm32 (SdFat, SPI flash) - Arduino (SD with 8.3 file format, SD: SD, SdFat 2) - Wio Terminal (SdFat 2, Seed SD, and native FAT) #### Changelog - 2022-02-02 2.1.6 Fix esp8266 Ethernet (w5x00) issue and explain solution for ESP32 Ethernet (w5x00), add new Networks management - 2022-01-13 2.1.5 Fix SPIFM external SPI Flash date management (add SPIFM esp32 example) - 2022-09-21 2.1.4 Add support for Raspberry Pi Pico W and rp2040 boards, Fix SD card config - 2022-09-20 2.1.3 Soft AP IP management, more disconnect event and SD_MCC - 2022-05-21 2.1.2 Fix SD path (#19) - 2022-05-21 2.1.1 Minor fix - 2022-03-30 2.1.0 Add UTF8 support and enabled It by default (Thanks to @plaber) - 2022-03-30 2.0.0 Complete support for STM32 with SD and SPI Flash minor bux fix and HELP command support - 2022-03-17 1.3.0 Fix enc28j60 and w5500 support and restructuring for local settings - 2022-02-25 1.2.1 Fix anonymous user begin and fix SPIFFS wrong display - 2022-02-22 1.2.0 Add anonymous user and implement correct RFC (#9 now work correctly with File Explorer) - 2022-02-01 1.1.1 Add workaround to start FTP server before connection, add end and setLocalIP method.

When I develop a new solution I'd like to divide the application in layer, and so I'd like focus my attention in only one aspect at time.

In detail I separate the REST layer (written inside the microcontroller) and the Front-End (written in Angular, React/Redux or vanilla JS), so I'd like to upload new web interface directly to the microcontroller via FTP.

For static information (Web pages for examples), that not change frequently, esp8266 or esp32 have internal SPIFFS (SPI Flash File System) and you can upload data via Arduino IDE as explained in the article "WeMos D1 mini (esp8266), integrated SPIFFS Filesystem" for esp8266 or "ESP32: integrated SPIFFS FileSystem" for esp32 or with LittleFS "WeMos D1 mini (esp8266), integrated LittleFS Filesystem" but for fast operation and future support It's usefully use FTP.

```cpp /* * FtpServer esp8266 and esp32 with SPIFFS * * AUTHOR: Renzo Mischianti * * https://www.mischianti.org/2020/02/08/ftp-server-on-esp8266-and-esp32 * */ #ifdef ESP8266 #include #elif defined ESP32 #include #include "SPIFFS.h" #endif #include const char* ssid = "YOUR_SSID"; const char* password = "YOUR_PASS"; FtpServer ftpSrv; //set #define FTP_DEBUG in ESP8266FtpServer.h to see ftp verbose on serial void setup(void){ Serial.begin(115200); WiFi.begin(ssid, password); Serial.println(""); // Wait for connection while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.print("Connected to "); Serial.println(ssid); Serial.print("IP address: "); Serial.println(WiFi.localIP()); /////FTP Setup, ensure SPIFFS is started before ftp; ///////// /////FTP Setup, ensure SPIFFS is started before ftp; ///////// #ifdef ESP32 //esp32 we send true to format spiffs if cannot mount if (SPIFFS.begin(true)) { #elif defined ESP8266 if (SPIFFS.begin()) { #endif Serial.println("SPIFFS opened!"); ftpSrv.begin("esp8266","esp8266"); //username, password for ftp. set ports in ESP8266FtpServer.h (default 21, 50009 for PASV) } } void loop(void){ ftpSrv.handleFTP(); //make sure in loop you call handleFTP()!! // server.handleClient(); //example if running a webserver you still need to call .handleClient(); } ``` https://downloads.arduino.cc/libraries/logs/github.com/xreef/SimpleFTPServer/

近期下载者

相关文件


收藏者