luc-github / ESP3D

FW for ESP8266/ESP8285/ESP32 used with 3D printer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] FTP not showing full directory listings on SD storage on Fysetc SD-WIFI-PRO

y2kdread opened this issue · comments

Describe the bug

When I access esp3d through FTP, I am unable to list the full list of files/directories on the SD portion of the storage.

To Reproduce

  1. Connect to FTP using FTP client
  2. Browse to the "SD" folder
  3. Full list of files/folders are not shown

Expected behavior

I should be able to see all files and directories on the SD card

Screenshots

https://imgur.com/YGLZEmg
https://imgur.com/0UFANrS

ESP3D Firmware:

  • ESP3D FW version: 3.0.0.a225
  • ESP3D-WebUI Version: 3.0.0-a40.M2.1
  • Wifi mode: Client Mode
  • Flash method: PlatformIO

Board used (please complete the following information):

  • MCU: ESP32
  • Name: Fysetc SD-WIFI-Pro
  • Flash size: 8M

Thank your for submiting, please be sure you followed template or your issue may be dismissed. if you deleted the template it is here

commented

Did you configured your ftp client properly for esp3d ?

https://esp3d.io/esp3d/v3.x/documentation/ftp/index.html

image

commented

I cannot duplicate your issue using the setting as above
image

That setting was incorrect in FileZilla, but I am still seeing the same thing with it set to only 1 connection.

Screenshot 2023-10-25 131150

commented

this issue is different than webdav one ? even on limited number of file you have issue ?

It is on the entire SD file system, I don't see any of the files or folders in the root apart from the "System Volume Information"

I have a feeling it may be related, but it is just a hunch.

commented

looks like more the fat file system is corrupted in that case
like not clean eject from pc

I've actually tried testing this out by performing a full reflash of ESP and formatting the card with the SD formatting tool. I can try again just to be safe.

commented

after formating the SD how did you uploaded files ?

I just copied the data from the original SD card.

commented

my question was : HOW ?
Windows File manager ?
Your OS file manager ?
WebDav ?
FTP?
your CPAP machine ?

Oh ok.

I copied using Windows file explorer from the original card to the esp card.

commented

I did same and I reproduce your issue
image
which is weird is that webdav is able to see the content
image
So it is not question of SD formating but another issue in code for sure
It has been years that I did not looked at this part of code, so I will dig in 😓

commented

Ok I am solving the bug - looks like the SD access was not well handled and sometimes even handled upside down...
So only first file/dir was listed on SD, no issue on FS because the FS is never released.

Listing 1000 files take around 4min in debug mode but so far it is working on my devt branch - I will continue to to review ftp code today and push the fix if no blocking point

commented

Fix is now available - please give a try

The fix you put in place resolved the issue. Thanks a ton!

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.