Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6889455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:09:30+00:00 2026-05-27T06:09:30+00:00

I am working on an embedded device that uses an SD-Card for storage and

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:09:31+00:00Added an answer on May 27, 2026 at 6:09 am

    As far as I know, there is no way for two devices to cooperatively share a block device using common file systems such as FAT. (unless perhaps it’s a read-only file system)

    The solution is for only one device (i.e. the camera) to own the file system at the low level (block level). Then that device can share files using a higher-level protocol (higher than raw block operations). As you said, the USB Media Transfer Protocol is an example of that. Other examples of a higher-level file sharing protocol are NFS and SMB, although I don’t think those would be applicable in this scenario.

    Quoting from Media Transfer Protocol on Wikipedia:

    A main reason for using MTP rather than for example the USB mass-storage device class (MSC) is that the latter operates at the granularity of a mass storage device block (usually in practice, a FAT block), rather than at the logical file level. In other words, the USB mass storage class is designed to give a host computer undifferentiated access to bulk mass storage, such as compact flash, rather than to a file system, which might be safely shared with the target device (except for specific files which the host might be modifying/accessing). In practice, therefore, when a USB host computer has mounted an MSC partition, it assumes absolute control of the storage, which then may not be safely modified by the device without risk of data corruption until the host computer has severed the connection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on some firmware for an embedded device that uses a 16
I am working on an embedded application that uses NAND flash for storage. As
I'm working on an embedded device that does not support unaligned memory accesses. For
I am working on an embedded linux device that requires custom java code to
I am working on development of an embedded Linux device which needs to exchange
I am new at embedded system programming. I am working on a device that
I'm working on an embedded device that connects on local network with RJ45 and
I am working on an embedded Linux device that has only qt. For some
I am working on embedded device with 266 Mhz processor and 32 Bit bus
I am working on an embedded application where the device is controlled through a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.