Closed davidallenmann closed 8 years ago
Diagnosed... and narrowed a bit: suspect Windows 10 formatted fs hidden/system files are giving sdreaper trouble.
TODO: instead of always downloading the whole FAT filesystem, allow choosing of a directory, for example /data
. This also makes it easier to deal with Mac OS hidden system file cruft.
TODOs:
ReadWrite.ino
example from SdFat lib to see if it also gets stuckI can repro with FS formatted on Mac. Not related to hidden files or Windows formatting.
Suspecting that it is card speed issue. Previously I was testing with older/slower card. New Samsung card shows problem. dm: your card is newer/fastish, yes?
No need to test ReadWrite.ino
Setting
#define USE_MULTI_BLOCK_IO 0
at bottom SdFatConfig.h
fixes the problem. Don't see a clean way to do that (yet) as USE_MULTIBLOCK_IO is not wrapped with an #ifndef
.
f622996306fd45b971be1591336ed2afc660756f avoids hangs when the error occurs so it will allow the download to proceed even if some files error. But it does not fix the underlying problem.
#define USE_MULTI_BLOCK_IO 0
in the 2015 version of SdFat-Beta fixes the problem.
The problem also appears to be fixed in this version of SdFat-Beta
:
https://github.com/greiman/SdFat-beta/commit/36d5c97e243832574be134a00675fa8c2d2380ae
Updating my SdFat-Beta
install to the above solved it for me.
The commit history shows that multi block io was reworked, so using the latest SdFat-Beta is probably the way to go.
dm: please confirm everything works with latest SdFat and reaper code and close.
using old version of reaper (from when first posted bug) and setting
#define USE_MULTI_BLOCK_IO 0 in the 2015 version of SdFat-Beta
does not fix problem
installing latest version of reaper does fix problem
Getting 91KB/s for a 4MB file with latest code.
dm confirmed works.