MTP & PTP

5,608 views

Published on

Introduction to MTP (Media Transfer Protocol) and PTP (Picture Transfer Protocol)

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,608
On SlideShare
0
From Embeds
0
Number of Embeds
38
Actions
Shares
0
Downloads
118
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

MTP & PTP

  1. 1. MTP & PTP William.L wiliwe@gmail.com 2011-10-13
  2. 2. Outline Overview Protocol Intro MTP & DRM MTP & UMS MTP/PTP in Android
  3. 3. Overview
  4. 4. PTP / MTP (1/2) Picture Transfer Protocol Define a common protocol of controlling and transferring files (photographs) for digital still image devices (ex: cameras) PIMA / ISO 15740 Commonly implemented over the USB and FireWire Media Transfer Protocol An extension of PTP USB-IF MTP 1.0 Target primarily at Digital Still Cameras Portable Media Players Cellular phones Support DRM
  5. 5. PTP / MTP (2/2) PTP and MTP are application layer protocols The term ”media” in MTP Used to identify any binary data Not restricted to audio/video formats Non-audio/video objects include contacts, schedules and text files
  6. 6. PTP/MTP Supported by OS (1/2) Microsoft Windows WIA (Windows Image Acquisition/Architecture) A driver model and API for Windows Me and later Windows operating systems Enables software to communicate with imaging device such as scanners, digital cameras and digital video equipments Still Image Connectivity for Windows http://msdn.microsoft.com/en-us/windows/hardware/gg463507.aspx MTP is part of the "Windows Media" framework and thus closely related to Windows Media Player Built-in support : Windows Visa and Win7 WinXP with Windows-Media-Player 10 or higher PlayForSure certification for devices
  7. 7. PTP/MTP Supported by OS (2/2) Linux mtpfs libptp2 libgphoto2 libmtps Tools : gMTP(GUI), mtptools(CLI), etc
  8. 8. MTP v.s PTP MTP permits transfer of large(>4GByte) items MTP allows the data to be broken into different USB packets This allows USB chips to process the packets more efficiently
  9. 9. MTP Enhanced From Microsoft Based on MTP 1.0 Contains additional operations, events and responses to enable more advanced functionality specific to particular device classes, media types and application scenarios Devices designed for Windows should implement MTP Enhanced Specification http://www.microsoft.com/download/en/details.aspx?id=196 78
  10. 10. Protocol Intro
  11. 11. Layered Protocol Physical layer : USB protocol Transport layer is taken directly from PTP (USB Still Image Class, class ID is 6) Command layer PTP/MTP treat most things on devices as Objects Most of PTP/MTP commands deal with Objects, ex:GetObjectInfo, GetNumObjects
  12. 12. Device Roles in Protocol Initiator - Responder Initiator Send operations/requests Responder Responds for requests Fires events Connect, identifies as using MTPConnect, identifies as using MTP Device capabilityDevice capability Request device informationRequest device information Request list of contentsRequest list of contents Request metadata describing contentRequest metadata describing content Array of handles to contentArray of handles to content Send metadataSend metadata Object exchangeObject exchange Responder Initiator
  13. 13. Other Transport Media (1/2) Transport-Independent MTP/PTP were originally implemented for use across USB but extended for use across TCP/IP and Bluetooth Over TCP/IP PTP-IP, "Picture Transfer Protocol" over TCP/IP networks CIPA DC-005-2005 standard Windows 7 and Windows Vista support Ideal for devices with WiFi that can be connected and synchronized anywhere in the home
  14. 14. Other Transport Media (2/2) Over Bluetooth Over the L2CAP (Logical Link Control and Adaptation Protocol) The specification is available in the Windows Portable Device Enabling Kit Windows 7 and Windows Vista (with the Platform Update) support Requires Bluetooth 1.2 or higher with the Microsoft Bluetooth stack installed Great for low power, low speed scenarios like synchronizing PIM data or a quick file transfer
  15. 15. MTP & DRM
  16. 16. DRM Digital Rights Management The protection of licensed or purchased audio or video content, is extemely important in the handheld consumer market DRM prevents a copyrighted file from being played in another player than the one it was originally downloaded to But, if one place where has DRM-Unlock tools, it can play file normally With uncontrolled ability to transport digital content, content provider will remain reluctant to release digital material such as movies
  17. 17. DRM Support In MTP MTP provide DRM specific properties DRM status Determine if an object has DRM protection To expose whether an object will be playable after being transferred to a different device URL To allow DRM to ask for money when the license rights expire (link to the payment site) Use count The number of times of an object has been played or viewed
  18. 18. MTP & UMS
  19. 19. USB Mass Storage (1/2) USB Mass Storage Also called USB MSC(Mass Storage Class) An USB device that can store data Most portable media players and still image devices have adopted for their internal memory where users save their media files Lack DRM support
  20. 20. USB Mass Storage (2/2) Can not be accessed by the PC and device itself at the same time Device Storage USB/ATAPI Bridge Driver Framework USBStor Device Player CPU Automatic Switch MSC PCPC DeviceDevice With MSC, content Storage is managed by the PC “switch” means “mount/unmount”. When the device storage is used by the PC, the storage will be unmounted from the device. Otherwise, it is mounted to the device.
  21. 21. MTP v.s UMS YESNONeed specific driver to access device’s storage on Microsoft Windows 7/Vista/XP YESNOCan do common disk recovery MoreLessAmount of Devices Ready to Support YES MTP NODRM Support UMS
  22. 22. MTP/PTP in Android
  23. 23. Support MTP/PTP file transfer since Android 3.0(Honeycomb) MTP programming APIs are provided from Android 3.1 MtpObjectInfo::getProtectionStatus() To retrieve the DRM protection status

×