- This topic has 0 replies, 1 voice, and was last updated 51 minutes ago by .
- You must be logged in to reply to this topic.
Home › Forums › The libraries hosted on the site › FTP Server (Simple and Multi) › Esp8266 Problem to configure FTP with Sd
Hello, I have serious problem to make the FTP server working on esp8266 with SD, I read the all the topics about it, but i am not able to make it work. I already changed the configuration to:
#ifndef DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP8266
#define DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP8266 NETWORK_ESP8266
#define DEFAULT_STORAGE_TYPE_ESP8266 STORAGE_SD
#endif
when I access with WinSCP it says ” Impossibile ottenere l’elenco delle cartelle
Can’t open directory /”, I added the the function to create a file when the sd is initialized, is working but then i am not able to access, same problem with Android.
I share the sketch.
#include <SPI.h>
#include <SD.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <SimpleFTPServer.h>
#ifndef STASSID
#define STASSID “SC-01——”
#define STAPSK “Samu1984———”
#endif
const char* ssid = STASSID;
const char* password = STAPSK;
FtpServer ftpSrv;
File myFile;
void setup() {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
SD.begin(1);
myFile = SD.open(“prova.txt”, FILE_WRITE);
myFile.close();
ftpSrv.begin(“esp8266″,”esp8266”);
ArduinoOTA.begin();
}
void loop() {
ArduinoOTA.handle();
ftpSrv.handleFTP();
}
Thanks in advance
More
Just like a well-organized workbench, this website uses cookies to function properly and efficiently.
🛠️ The Essentials (Necessary): Some cookies are categorized as necessary and are stored on your browser because they are critical for the basic working of the site.
📊 The Analytics (Third-party): We also use third-party cookies to help us analyze traffic and understand which projects you like the most. These are stored only if you give us the green light.
You can choose to opt-out, but keep in mind that disabling them might make the site experience a bit less "smooth".
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
