Reference Code Release Notes

Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 7

Windows 7 Portable Device

Enabling Kit for MTP Reference


Code
Release Notes

June 2009

Version 7R2

The Windows 7 Portable Device Enabling Kit for MTP Reference Code is intended
to help a company prototype and evaluate Microsoft's Media Transfer Protocol (MTP)
extensions to Picture Transfer Protocol (PTP). MTP has been developed by Microsoft
to meet the broader requirements of transferring a variety of file types to portable
devices with storage, especially media types used in portable media devices. With
Windows 7 the concept of MTP Device Services is introduced, which is defined in the
vendor extension space and has been specifically designed to be backwards
compatible with existing Initiators in the market. This package provides reference
source code illustrating how these features have been developed by Microsoft.
Windows 7 Portable Device Enabling Kit Reference Code

Legal Notice

Copyright (c) 2009 Microsoft Corporation

All rights reserved.

Redistribution and use in source and binary forms, with or without


modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice,


this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
Neither the name of the Microsoft Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY MICROSOFT CORPORATION AND CONTRIBUTORS ''AS IS''


AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE MICROSOFT CORPORATION OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

2009 Microsoft Corporation. All rights reserved. 2


Windows 7 Portable Device Enabling Kit Reference Code

Contents
Legal Notice................................................................................................................ 2
Document History....................................................................................................... 4
Overview.................................................................................................................... 5
Minimum system requirements.................................................................................. 5
Operating system................................................................................................. 5

Frequently Asked Questions....................................................................................... 6


References.................................................................................................................. 7
Resources................................................................................................................ 7

Documentation........................................................................................................ 7

Support.................................................................................................................... 7

Document History
Date Change

2009 Microsoft Corporation. All rights reserved. 3


Windows 7 Portable Device Enabling Kit Reference Code

June 23, 2009 First publication

2009 Microsoft Corporation. All rights reserved. 4


Windows 7 Portable Device Enabling Kit Reference Code

Overview
This release of the Windows 7 Portable Device Enabling Kit for MTP Reference Code is provided under
license for device firmware development purposes. The Devices and Media team at Microsoft is excited
to provide this reference code as Open Source use.

The code includes samples of newly released features that are supported natively in Windows 7. The MTP
Device Services Extension to the Media Transport Protocol (MTP) enables an MTP initiator to locate and
use various services and content types located on a device. The following device services are supported:

MTP Devices Services


Contact Service
Calendar Service
Notes Service
Task Service
Status Service
Hints Service
Ringtone Service
Synchronization Service (Enumeration and Anchor Sync)

Links to the specification for MTP Device Services can found in the References section.

Microsoft also expanded support for MTP over the Bluetooth protocol in Windows 7; which is included in
the reference code for review.

Minimum system requirements


The following hardware and software are recommended to view the reference code:

Operating system
The following operating systems may be used to view the reference source code.

Microsoft Windows 7
Windows Vista
Windows XP SP2

2009 Microsoft Corporation. All rights reserved. 5


Windows 7 Portable Device Enabling Kit Reference Code

Frequently Asked Questions


What is the canonical name for a device?
The WMDM canonical name is based on the PnP device path. See this article for more information. The
composition of a PnP device path is bus-specific. For the USB bus the values of VID&PID + device serial number +
class interface are used.

Can I develop a Windows Vista MTP/IP device?


Windows Vista includes native support for MTP/IP devices. MTP Porting Kit 12.0 includes a version of a MTP/IP
responder as well as WpdMon with MTP/IP monitoring capabilities. The Media Transfer Protocol Porting Kit,
version 12, was released on April 30, 2007, and still applies to developing MTP-based devices on Windows Vista
and Windows XP. For additional information, refer to this kit at http://www.microsoft.com/whdc/device/media/mtp-
builddevices.mspx.

What MTP properties and operations should I support?


Please refer to the Portable Media Player Implementation Guideline document that ships in the Windows 7 Portable
Device Enabling Kit Tools package; this is a good reference even for devices that are not portable media players.
You should also consider the Windows Logo Program requirements for your device class. More information is
available at http://www.microsoft.com/whdc/winlogo/default.mspx.

How should I test my MTP implementation?


Please download the Windows Logo Kit. You can use the MTP Compliance Test to conduct thorough tests of your
MTP implementation. The kit also includes WPD Compliance tests to validate MTP Device Services
implementations. These tests are available at http://www.microsoft.com/whdc/winlogo/wlk/WLKpkg.mspx.

How can my device be detected as an MTP device?


Windows detects devices as MTP class devices using three methods. For Windows XP and Windows Vista, you
should use the OS Descriptor as described in the Portable Devices Installation Guidelines document (provided in the
\Documents folder). For Windows Vista, you may also use the former PTP USB Still Image device class (Class 6,
Subclass 1, Protocol 1).
For devices that cannot support the USB Class ID or the OS Descriptor, a custom .INF file should be used. For
systems with Windows Media Player 10, you should customize the .INF file supplied in the \Redist directory. For
systems using Windows Media Player 11 for Windows XP or Windows Vista, you should use a customized version
of the .inf located here:
c:\windows\inf\WPDMTPHW.INF.

How can I store long file names if my device doesnt support long file names?
If your device doesnt support long file name a work around can be to use the objectID as the file name and store the
actual file name in metadata.

References
Resources
For access to relevant specifications and additional information on Portable Devices provided by
Microsoft, refer to WHDC at:

2009 Microsoft Corporation. All rights reserved. 6


Windows 7 Portable Device Enabling Kit Reference Code

http://www.microsoft.com/whdc/device/wpd/default.mspx

The Microsoft Developer Network includes documentation on Portable Devices development with
Windows, refer to MSDN at:

http://msdn.microsoft.com/en-us/library/bb870491.aspx

Documentation
The reference code includes multiple header files in the Inc directory that include descriptions of use.

The following documents are available for download from the Windows Hardware Developer Central
website at http://www.microsoft.com/whdc/device/wpd/default.mspx:

Guidelines for Picture and Video Import in Windows 7


MTP Device Services for Windows 7
MTP Device Services Extensions

For more information on the Windows Device Experience, see


http://www.microsoft.com/whdc/device/DeviceExperience/default.mspx.

For more information on Container IDs for Multi-Function devices refer to the Multifunction Device
Support and Device Container Groupings in Windows 7 whitepaper at:

http://www.microsoft.com/whdc/Device/DeviceExperience/ContainerIDs.mspx

Note that the MTP Responder file has been removed from this kit, it will be re-introduced in the next
release.

Support
The Windows 7 Portable Device Enabling Kit for MTP is provided without technical support from Microsoft. For more
information about the kit, send e-mail to [email protected].

2009 Microsoft Corporation. All rights reserved. 7

You might also like