USB: indication of end of transfer

Hello,
I am transferring a file using USB MSD to a device, based on the Keil USB library. Can I know, when the transfer starts, how many bytes to expect? What is the indication in software as to the "end of file"?

Parents
  • "What is the indication in software as to the "end of file"?"

    USB Mass Storage Class (MSC) doesn't directly handle "file" on the media. MSC works in lower-level media access - It handles sectors on the media, requested by the host. On the device side, there is no universal way to tell start and end of "file transfer".

    When you specify the host OS (and its version) and the file system on the media, you may be able to detect the start and end of "file transfer".

    Tsuneo

Reply
  • "What is the indication in software as to the "end of file"?"

    USB Mass Storage Class (MSC) doesn't directly handle "file" on the media. MSC works in lower-level media access - It handles sectors on the media, requested by the host. On the device side, there is no universal way to tell start and end of "file transfer".

    When you specify the host OS (and its version) and the file system on the media, you may be able to detect the start and end of "file transfer".

    Tsuneo

Children
More questions in this forum