-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LittleFSSample fails to compile #20
Comments
Same here. FTPServerSample/LittleFSSample, gives same error using ESP8266 core 3.0.2 in Arduino IDE 1.8.16. Tested fix by this pull request: #19
|
Glad to know it's not just me, if you find a working fix please post what you did. I dumped FTPClientServer in favour of SimpleFTPserver, that works with littleFS. Originally I was using ESP8266FtpServer but making the switch SPIFFS to LittleFS and SPIFFS is hardwired into ESP8266FtpServer. |
The fix in pull request #19 made the example compile. All that was needed was to use the changed file (or copy the changes). In my ESP8266 project I'm using the excellent WiFiManager library. along with code from the very nice ESP8266Webserver/FSBrowser example and was looking for an easy way to copy multiple files at once from the LittleFS file system to back-up all files that I changed using the fsbrower editor. |
Can you be explicit about what you did? I read the link and couldn't see the fix.
But it didn't mean anything for me.
SimpleFTPserver will not do that for you, you need an FTP client. That is why I was looking at FTPClientServer. For a previous project I wrote one for myself (improving what someone else had done) so I could ftp files from the esp8266 to my NAS. It's in one of my previous posts - not a regular contributor to this forum, so don't know if you can search "user's posts". |
If you look here you can see the .h file needs two changes:
Thank you for your suggestion to make the ESP have an automatic backup feature by using it as an ftp-client. My own thought was to simply make it a server to allow a client on windows to copy (download) a bunch of files. This afternoon I tested the SimpleFtpServer example. Some things worked better, but unfortunately I still had similar issues, making me wonder there's something wrong in my setup. I guess further testing is needed (different clients, other hardware, etc)... |
Did some more testing with SimpleFtpServer and found that in the Windows 7 ftp.exe a directory listing would show incomplete lines. After much debugging I saw that the filename pointer was taken directly as c_str() from dir.fileName(), The buffer of that String apparently would no longer be available after the subsequent call to dir.fileTime(). This caused the generateFileLine() call to use invalid data. After fixing that using an intermediate String variable, the Windows FTP explorer successfully was able to copy a whole folder. I still had problems using FileZilla, but at least it's now easier for me to download a copy of all files on the ESP. BTW. I post this here because those issues may be related to the ones I encountered when testing the LittleFSSample in this library. |
Can't help, six years since I ran win natively, linux user :) For reference, this is the ftpclient I did: |
Title says it all, get exactly the same errors when trying to use FTPClientServer in my own project.
In file included from /home/andy/Arduino/libraries/FTPClientServer-master/FTPServer.h:32, from /home/andy/Arduino/sketches/LittleFSSample/LittleFSSample.ino:24: /home/andy/Arduino/libraries/FTPClientServer-master/FTPCommon.h:11:7: error: 'esp8266Pool' has not been declared 11 | using esp8266Pool::polledTimeout::oneShotMs; // import the type to the local namespace | ^~~~~~~~~~~ In file included from /home/andy/Arduino/libraries/FTPClientServer-master/FTPServer.h:32, from /home/andy/Arduino/sketches/LittleFSSample/LittleFSSample.ino:24: /home/andy/Arduino/libraries/FTPClientServer-master/FTPCommon.h:130:5: error: 'oneShotMs' does not name a type 130 | oneShotMs aTimeout; // timeout from esp8266 core library | ^~~~~~~~~ exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module).
The text was updated successfully, but these errors were encountered: