Freigeben über


New Features for Windows 7

In Windows 7 we introduced several new features that improve how users discover and use devices connected to their PC. These new features simplify how device manufacturers present their devices, applications, and services in Windows. This behavior is exposed in the new Device Stage™ experience (see Better Device Management here).

In the Windows Portable Device (WPD) space the Windows team made significant investments to address concerns raised by device manufacturers. One of the key improvements was the addition of the Device Service. A Device Service is an extension of the functional object that was supported in prior versions of WPD. Applications can use Device Services to discover device capabilities and to interact more efficiently with content.

In addition to the Device Service, WPD was further improved by investing in additional transports: support for MTP over Bluetooth has been added. With multiple transports (USB, IP, and Bluetooth) now available, the next step was to enable a seamless data transfer scenario when the device supports more than one transport.

Now that we have introduced some of the key Windows 7 features for WPD, we’ll take a closer look.

MTP Device Services for Windows 7

MTP has proven to be an excellent protocol for exchanging files and performing device command and control. However, it is not well-suited for newer, more advanced scenarios.  These scenarios are now supported with the introduction of the Device Services architecture. This architecture allows applications to locate and use various services and content types on a device. 

The new Device Services architecture allows applications to locate, consume, and interact with both content and functionality on the device.  Our flagship use of Device Services in Windows 7 is to support Personal Information Management (PIM) data, settings, and restricted-capabilities content types on a device. The resulting architecture is also the means for future extensibility by 3rd parties: An IHV can implement an application (or web script) and a custom service that interoperate (without having to wait for new functionality in the next OS release).

Device Services are identified by Globally Unique Identifiers (GUIDS). These GUIDS allow hardware vendors to specify new device services independently of each other without the risk of conflicts.

The native Windows 7 supported services defined for portable devices are:

Calendar Service - The calendar service contains the data for a calendar, and uses a synchronization service to facilitate synchronization with the PC. 

Contact Service - The contact service contains the data for contacts, and can optionally use a synchronization service to facilitate synchronization with the PC. 

Notes Service - The notes service uses a synchronization service to sync notes to and from the device. 

Task Service - The task service uses a synchronization service to synchronize tasks to and from the device. 
 
Status Service - The status service reports various status properties about the device to the PC.

Hints Service - The hints service enables the device to select preferred storage locations for various content types in legacy storages.

Device Metadata Service - The device metadata service permits the delivery of Device Stage™ metadata by the device during device installation.

Ringtone Service - The ringtone service provides a method to copy ringtones from the PC to the target ringtone storage on the device.   

Enumeration Synchronization Service - The enumeration synchronization service describes basic synchronization capabilities for a storage-based device. This is an “abstract” Device Service, which, analogous to an interface in C++, describes the capabilities of a “data” service that supports basic synchronization.  For example, a device that supports basic synchronization of contacts will contain a Contacts Service that implements the Enumeration Synchronization Service.

Anchor Synchronization Service - The anchor sync service is another abstract MTP Device Service defined to enable other services to opt in to a sync relationship using anchor-based synchronization semantics.  Anchor-based synchronization uses a simple tick-count based mechanism for change detection (e.g. timestamp, tick counts).

Sample implementations of some of these services along with device simulation software is provided in the 7R2 version of the Windows 7 Portable Device Enabling Kit and is now available here.  

MTP Device Services Extension

In addition to the pre-defined device services mentioned above, Windows is also capable of supported custom device services that use the newly defined MTP Device Services Extension to MTP. The MTP Device Services Extension enables Windows to locate and use various services and content types located on a device.

In the recent applications of MTP without device services, content is distributed throughout a device, which makes it difficult for the operating system to determine where the useful assets are and how to deploy them. With the creation of the Device Services extension to the MTP protocol, Windows now has the ability to locate, consume, and interact with this content in practical ways based on Microsoft and manufacturer defined services. This feature is particularly useful in accessing device content that is not based on file system data, accessing settings, or that has restricted capabilities. For example, a device manufacturer could define a custom SMS service.

While MTP already supports enumeration by format, it is cumbersome when applying rich semantics to simple hierarchical storage. With Device Services, content and functionality can be combined under a single functional object, resulting in well-scoped access to only the content and functions specific to that service.

Windows Portable Devices (WPD) Platform Enhancements

For Windows 7, in addition to the legacy behavior, Windows Portable Devices (WPD) supports a new Device Services model. A Device Service is an extension of the functional object supported in prior versions of WPD. Applications will use service objects to discover device capabilities and to interact more efficiently with content.
 
Device Services are available to applications as part of the WPD API. Some Device Services include built-in support by Windows 7. Two examples of operating-system components that use Device Services are the Windows Portable Devices Sync Provider and the Windows Portable Device Status Provider. 

The Windows Portable Devices Sync Provider determines whether a cellular phone supports basic contacts synchronization by querying for its implementation of the Enumeration Sync device service on the device. The provider then uses this service to locate all contacts stored on the device without having to search the entire storage hierarchy.  

The Windows Portable Device Status Provider retrieves real-time status information from a cellular phone that supports the Status device service, and relays information including battery life, signal strength, unread text messages, and number of missed calls to Device Stage™.

Note that although cellular phones are featured in both sceanrios above, Device Services are not limited to a specific WPD device class. Further examples of Device Services will be covered in a later post.

Device Stage™

Device Stage provides additional customization of the user’s device experience by providing a new way for users to interact with their cell phones, cameras, printers, and portable media players. Device Stage provides a visual interface that makes it easy for users to find and use applications and services for a given device.

Through a new set of XML schemas supported in Windows 7, device makers can:

  • Provide rich branding and customization for their device
  • Define applications and services that are specific to each device

Device Stage can be accessed by double clicking a supported device from within the Devices and Printers folder, or for portable devices, by clicking the device icon which appears on the taskbar when the device is connected.

The Device Stage user interface follows the model of any shell view in Windows, and Device Stage devices appear on the Windows taskbar whenever the Device Stage is open.

Device makers may enable additional features by supporting standard and vendor-unique Device Services, and authoring Device Stage tasks that make use of the service. When a device is connected which supports the any of the authored tasks, the tasks will appear within the Device Stage experience. Optionally, additional Partner applications and hosted web tasks may be specified within the Device Stage XML without modifications to device firmware.  These custom device experiences (via Hosted Site with Device option) within Device Stage are made possible by enhancements to the WPD API (mentioned above) and driver model which may now be extended via scripting and custom MTP Device Service extensions on the device. To assist device makers in all of this work, Microsoft has released a Portable Device Enabling Kit with documentation and device code samples. The 7R2 version of the kit is now available here.  

In the Windows 7 Control Panel, there is a new experience known as the Devices and Printers folder through which users can see all the devices that are connected to their PC. The devices in this folder are physically connected via USB or paired via Wi-Fi or Bluetooth interfaces.  (As a general rule, internal PC devices or device functions will not be exposed in this folder.)

Using a new set of XML schemas, device makers can customize how their device is described and presented within the Devices and Printers folder. For more information on developing metadata packages for both the Devices and Printers folder and Device Stage in Windows 7, see the Windows Device Experience topic on WHDC.

Extended Transport Support

In Windows 7 we have expanded support with WPD over other transports. A new class driverhas been introduced to enable MTP over Bluetooth.  With the support in Windows 7 for multiple transports the next step was to make Windows multi-transport aware, and the addition of the WPD composite driver provides the bridge between a logical device and the transports it simultaneously supports. The new features and functionality mentioned above are supported across all three of the MTP transports (Bluetooth, IP, and USB).

Resources:

Information on MTP can be found at https://www.usb.org/developers/devclass_docs/MTP_1.0.zip

Details on MTP over Bluetooth and MTP over IP are provided in the documentation that ship in the Windows 7 Portable Device Enabling Kit for MTP and on MSDN. The kit can be downloaded from https://www.microsoft.com/whdc/device/wpd/MTP-DEK_Win7.mspx.

Information on the WPD APIs can also be found on MSDN.

That’s it for now. Stay tuned for more posts diving into the details of the new Windows 7 WPD features.

 

This posting is provided "AS IS" with no warranties, and confers no rights.

Comments

  • Anonymous
    September 30, 2012
    Still don't know what this means and how it will affect my ereader.

  • Anonymous
    December 04, 2012
    ok,  so basically by opening up a usb device as a portable device, i might some extra features such as being able to download my contacts (if its a phone ive plugged in).  

  • Anonymous
    April 04, 2013
    ?? So I may make a USB stick behave and look like it was a smartphone for storage purposes but without having to have the smartphone functionality/interface/API/data structures/apps? Or a WPD with a specific API/interface/app can use the next WPF stick as if it was an extension to its memory or cache or storage... Am I right?

  • Anonymous
    December 20, 2015
    What do you mean by "open as a portable device" which is there in the context menu of a removable storage device. What does it do? Why should we use it?