I am working on an embedded device that uses an SD-Card for storage and needs to allow a PC to access that SD-Card over USB.
The best approach I could come up with is virtualizing the disk and presenting that virtualized picture to the PC. That would allow the PC to read and write files, while my device is also reading and writing.
The problem comes up when you consider that the PC may have cached reads, so it becomes impossible for the PC user to see new files as the device creates them -- The PC will only see files that existed at the time it was connected.
Another drawback is that it is not safe to remove the flash card until the PC has been disconnected.
Are there any workarounds for this? How do modern cameras handle it? I believe that media transfer protocol was created for just this purpose, however it is not widely supported in a transparent manner. And I'm not dealing with "media" files, although I assume that doesn't matter.
Is there some commonly used clever workaround that I am missing?
Thank you