The Media Transfer Protocol (MTP) is a USB class protocol which can be used to transfer files to and from storage devices.
Check out our Wiki article on MTP: https://wiki.segger.com/MTP
Application Samples emUSB-Host MTP
MTP is an alternative to Mass Storage Device (MSD)
It operates on the file level in contrast to MSD which reads and writes sector data. This type of operation gives MTP some advantages over MSD:
- The cable can be safely removed during the data transfer without damaging the file system.
- The file system does not have to be FAT (EFS or any other proprietary file system can be used).
- The application has full control as to which files are visible to the user. Selected files or directories can be hidden.
- Virtual files can be presented.
- Host and target can access storage simultaneously without conflicts.
MTP is natively supported by Windows and Linux "out-of-the-box" and the installation of additional drivers is not required. macOS supports MTP only by using third party tools such as:
Getting Access to Files
An MTP device will be displayed under the "Portable Devices" section of the "Computer" window when connected to a PC running the Microsoft Windows operating system. On other operating systems which support MTP the data stored on MTP devices can be accessed similarly.