SimpleFtpServer con esp32 o esp8266 e w5500
Ciao Renzo,
riprendo il commento postato sul sito:
Vorrei creare un server ftp con un esp32 o un esp8266 utilizzando la connessione cablata con un w5500 ma non riesco a venirne a capo.
Uso una Lolin32 lite e una scheda di rete w5500 collegata in SPI standard con cs su gpio5.
Parto dall'esempio incluso con la libreria "ESP32_FFAT_enc28j60.ino" simile in tutto ma con la enc28j60 invece della w5500.
Il codice è quello riportato nell'esempio in cui sostituisco le libreria ethernet :
//#include <EthernetENC.h>
#include <Ethernet.h>
e nel file FtpServerKey.h la configurazione per esp32 è la seguente:
// esp32 configuration
#ifndef DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP32
#define DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP32 NETWORK_W5100
#define DEFAULT_STORAGE_TYPE_ESP32 STORAGE_FFAT
#endif
il problema è che la compilazione non va a buon fine con il seguente errore:
In file included from Documenti\Arduino\libraries\SimpleFTPServer/SimpleFTPServer.h:14:0,
from Documenti\Arduino\TEST-w5500 era FTPServer_ESP32_FFAT_enc28j60\TEST-w5500 era FTPServer_ESP32_FFAT_enc28j60.ino:39:
Documenti\Arduino\libraries\SimpleFTPServer/FtpServer.h:704:36: error: cannot declare field 'FtpServer::ftpServer' to be of abstract type 'EthernetServer'
FTP_SERVER_NETWORK_SERVER_CLASS ftpServer;
^
In file included from Documenti\Arduino\TEST-w5500 era FTPServer_ESP32_FFAT_enc28j60\TEST-w5500 era FTPServer_ESP32_FFAT_enc28j60.ino:34:0:
Documenti\Arduino\libraries\Ethernet\src/Ethernet.h:254:7: note: because the following virtual functions are pure within 'EthernetServer':
class EthernetServer : public Server {
^
In file included from C:\Users\floriof\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:152:0,
from Documenti\Arduino\TEST-w5500 era FTPServer_ESP32_FFAT_enc28j60\TEST-w5500 era FTPServer_ESP32_FFAT_enc28j60.ino:31:
C:\Users\floriof\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Server.h:28:18: note: virtual void Server::begin(uint16_t)
virtual void begin(uint16_t port=0) =0;
^
In file included from Documenti\Arduino\libraries\SimpleFTPServer/SimpleFTPServer.h:14:0,
from Documenti\Arduino\TEST-w5500 era FTPServer_ESP32_FFAT_enc28j60\TEST-w5500 era FTPServer_ESP32_FFAT_enc28j60.ino:39:
Documenti\Arduino\libraries\SimpleFTPServer/FtpServer.h:705:36: error: cannot declare field 'FtpServer::dataServer' to be of abstract type 'EthernetServer'
FTP_SERVER_NETWORK_SERVER_CLASS dataServer;
^
Più di una libreria trovata per "Ethernet.h"
Usata: Documenti\Arduino\libraries\Ethernet
Non usata: C:\Users\floriof\AppData\Local\Arduino15\libraries\Ethernet
Non usata: Documenti\Arduino\libraries\EthernetENC
exit status 1
Compilation error: exit status 1
dove sto sbagliando?
Grazie
Francesco