humulabs / reaper

Arduino library and command line utility to download and delete SD card files
MIT License
0 stars 1 forks source link

downloading from PC formatted card gets hung on IndexerVolumeGUID #22

Closed davidallenmann closed 8 years ago

davidallenmann commented 8 years ago

screen shot 2016-03-29 at 8 50 00 am

mgk commented 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.

mgk commented 8 years ago

TODOs:

mgk commented 8 years ago

I 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?

mgk commented 8 years ago

No need to test ReadWrite.ino

mgk commented 8 years ago

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.

mgk commented 8 years ago

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.

davidallenmann commented 8 years ago

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

mgk commented 8 years ago

Getting 91KB/s for a 4MB file with latest code.

mgk commented 8 years ago

dm confirmed works.