PnP-X: Plug and Play Extensions for Windows
?A WINDOWS? RALLY SPECIFICATION
PnP-X: Plug and Play Extensions for Windows
Abstract
This specification describes the Plug and Play Extensions (PnP-X) for the Windows Vista? and Microsoft? Windows Server? Code Name “Longhorn”
operating systems. It provides requirements and guidelines for hardware manufacturers to create devices that are installable with PnP-X. PnP-X is a key component of the Microsoft Windows? Rally? set of technologies.
Version 1.0c – January 11, 2007
LICENSE NOTICE. Access to and viewing and implementation of the technology
described in this document is granted under the Microsoft Windows Rally Program License Agreement (“License Agreement”). If you want a license from Microsoft to access, view or implement one or more Licensed Technologies, you must complete
the designated information in the License Agreement and return a signed copy to Microsoft. The License Agreement is provided at the end of this document. If the License Agreement is not available with this document, you can download a copy
from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 2
Disclaimer
This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein. The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, email address, logo, person, place or event is intended or should be inferred. ? 2006-2007 Microsoft Corporation. All rights reserved. Microsoft, Rally, Windows, Windows Mobile, Windows Server, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.
The current version of this specification is maintained on the Web at:
Revision History
Date Revision
2005 Portions previously published as “Introduction to PnP-X”
May 2006 Revision as part of specifications for Windows Rally technologies. July 2006 Additional service detail.
December 2006 Corrected WSD metadata elements. Added Network Explorer
device discovery information.
January 2007 Corrected SSDP and WSD namespace references.
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 3
Contents
Introduction to PnP-X ......................................................................................................... 4 PnP-X Services............................................................................................................. 4 Default Startup Type for PnP-X Services ....................................................................... 5
Windows Vista ....................................................................................................... 5
Windows Server ..................................................................................................... 5 Network Explorer Device Discovery and PnP-X .............................................................. 5
Windows Vista ....................................................................................................... 5
Windows Server ..................................................................................................... 5 WSD Device Installation Process ................................................................................... 5 Using PnP-X ..................................................................................................................... 6 Creating a PnP-X Device............................................................................................... 6 Creating a WSD-Compliant Device ........................................................................... 7
WSD Device Metadata Requirements ..................................................................... 7
Sample INF File for WSD Devices .......................................................................... 9
Sample Metadata Message for WSD Devices ....................................................... 11 Creating a SSDP-Compliant Device ........................................................................ 12
SSDP Device Metadata Requirements .................................................................. 13
Sample SSDP Discovery Response Message ....................................................... 15
Sample INF File for SSDP Devices ....................................................................... 15
Sample Device Description File for SSDP Devices ................................................ 17 Querying Device Metadata .......................................................................................... 18 PnP-X Reference ............................................................................................................ 19 PnP-X Category Definitions ......................................................................................... 19 pnpx-ssdp Schema Reference ..................................................................................... 21 pnpx-ssdp Schema Elements.................................................................................. 21
X_compatibleId (X_PnpXType) Element ............................................................... 21
X_deviceCategory (X_PnpXType) Element ........................................................... 21
X_hardwareId (X_PnpXType) Element .................................................................. 22
X_PnpX Element .................................................................................................. 22 pnpx-ssdp Schema Complex Types ........................................................................ 22
X_PnpXType Complex Type ................................................................................. 23 pnpx-wsd Schema Reference ...................................................................................... 23 pnpx-wsd Schema Elements ................................................................................... 24
CompatibleId Element .......................................................................................... 24
DeviceCategory Element ...................................................................................... 24
HardwareId Element............................................................................................. 25 pnpx-wsd Schema Simple Types ............................................................................ 25
CompatibleIdType Simple Type ............................................................................ 25
DeviceCategoryType Simple Type ........................................................................ 25
HardwareIdType Simple Type............................................................................... 26 References...................................................................................................................... 26
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 4
Introduction to PnP-X
This guide provides information about the Plug and Play Extensions (PnP-X) component of the Microsoft? Windows? Rally? set of technologies. This document
provides guidelines for creating devices that are installable with PnP-X for Windows Vista?.
PnP-X is an extension of Plug and Play (PnP) in Windows Vista that integrates network-connected devices into the Windows PnP subsystem. PnP-X allows network-connected devices to appear as devices inside Windows and provides an installation experience that is similar to attaching a physically connected device. Just as PnP in Windows operates over a specific set of buses, PnP-X in Windows Vista has been defined to operate over network protocols for virtually connected devices. This includes:
, Universal Plug and Play (UPnP)–capable devices
, Device Profile for Web Services (DPWS))–capable devices (see
)
For more information about Windows Rally technologies and other resources discussed here, see
PnP-X discovers devices attached to a virtual PnP-X network bus. The IP bus enumerator is used to discover PnP-X devices. This enumerator discovers DPWS-capable devices and UPnP devices connected to a LAN.
Device discovery takes place when Network Explorer is launched. The user must explicitly choose to install the device. The Found New Hardware Wizard appears if user intervention is required to install a device driver.
Devices appear in Device Manager after discovery and installation. The devices can then be enumerated for use by other Windows applications by calling the Function Discovery API to query the PnP subsystem. Each device is associated with a function instance. These function instances can be queried by using the IFunctionDiscovery::CreateInstanceQuery and the
IFunctionDiscovery::CreateInstanceCollectionQuery methods.
See also on the MSDN Web site:
, Function Discovery
PnP-X Services
PnP-X uses two services to enable device discovery: PnP installation and device presence management. These services are the following:
, IP Bus Enumerator. The IP Bus Enumerator (IPBusEnum) is a Windows
service that handles the installation of PnP-X devices.
IPBusEnum monitors a list of devices currently present on the system. When a
device is installed, IPBusEnum sends a request to the PnP component to
create the device devnode. When a device is removed, IPBusEnum receives a
notification message from the PnP component and then sends a request to
remove the device from the list of present devices.
PnP-X devices can be installed only when the IPBusEnum service is running. Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 5
, Function Discovery Provider Host. The Function Discovery Provider Host
(FDPHost) service hosts the discovery providers for PnP-X. This includes the
built-in discovery providers for the Simple Services Discovery Protocol (SSDP)
and Web Services on Devices (WSD) WS-Discovery protocol.
Default Startup Type for PnP-X Services
The default start type for the PnP-X services differs for the Windows client and server operating systems.
Windows Vista
The IPBusEnum and FDPHost services are set to Manual start on the Windows Vista client operating systems. These services will start and stop automatically as the operating system needs them.
Windows Server
The IPBusEnum service is set to Disabled on the Microsoft Windows Server? operating systems. Server administrators wanting to enable PnP-X on Windows Server must start the IPBusEnum service. This can be done through the Services control panel application or on the command line via the following:
C:\>net start IPBusEnum
The FDPHost service is set to Manual start on the Windows Server operating systems. This service starts and stops automatically as the operating system needs it.
Network Explorer Device Discovery and PnP-X
Network Explorer displays the list of discovered devices to the user. Which devices are discovered by default differs based on whether the operating system is Windows Vista or Windows Server.
Windows Vista
In Windows Vista, both WSD- and UPnP-based PnP-X devices are discovered and displayed in Network Explorer.
Windows Server
In Windows Server, only WSD-based PnP-X devices are discovered and displayed in Network Explorer. The UPnP discovery service (SSDPSrv) does not run by default in Windows Server. Server administrators wanting to enable discovery of UPnP-based PnP-X devices must start the SSDPSrv service. This can be done through the Control Panel Services application or on the command line via the
following:
C:\>net start SSDPSrv
WSD Device Installation Process
The following procedure describes the WSD device installation process: 1. The user launches the Network Explorer.
2. The Network Explorer queries the WSD Provider (and other providers) for a
list of devices and displays the devices to the user.
3. The user chooses to install the device.
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 6
4. The IPBusEnum service is notified of the new device installation request and
queries the WSD Provider for device metadata.
5. The WSD Provider queries the device for metadata.
6. The device sends a metadata message to the WSD Provider in response. 7. The WSD Provider parses the metadata message and returns the results to
IPBusEnum.
8. Based on the metadata, IPBusEnum creates a physical device object (PDO) for
the device and passes the PDO to the PnP component.
9. PnP searches for the INF file associated with the device.
10. Based on the data in the INF file, PnP attempts to select a compatible device
driver.
11. If a compatible device driver is available on the system, the driver is loaded and
the device is installed. Otherwise, the Found New Hardware Wizard appears
and the user must locate and install the driver manually.
See also in this document:
, Creating a WSD-Compliant Device
Using PnP-X
Independent hardware vendors (IHVs) can create devices that are compatible with the PnP-X architecture.
Application developers can query PnP-X device metadata by using the Function Discovery API. For more information, see “Querying Device Metadata” later in this section
Creating a PnP-X Device
A PnP-X device is a device that can be discovered by one of the following Function Discovery providers:
, The WSD Provider
, The SSDP Provider
, A custom provider developed to discover the PnP-X device
In most cases, the built-in WSD and SSDP providers can be used for device discovery, which simplifies development. If the device communicates by using a custom protocol, then a custom provider is required. For more information about writing a custom provider, see “Function Discovery Providers” at MSDN ().
The Web Services protocol offers two advantages. First, the WSD provider can discover devices on multiple subnets. Second, the WS device description document has more elements for a more detailed device description.
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 7
Creating a WSD-Compliant Device
Device manufacturers must implement the following, in addition to base device functionality:
, Device Profile for Web Services (DPWS) support. To view the DPWS
specification, see
, pnpx-wsd schema support. Specifically, the device must read metadata from
a SOAP message containing pnpx-wsd schema elements and create a set of
hardware IDs and compatible IDs from the XML. The device must send SOAP messages containing device metadata. The required elements are described in “WSD Device Metadata Requirements” in this document.
This file includes both WSD and pnpx-wsd schema elements. The device must implement all WSD messages as described in the DPWS specification. These messages are required for device discovery.
WSD devices can be installed only if the HWID or Compatible ID specified in the device's INF file begins with the prefix UMB\. For a correctly formatted HWID, see
“Sample INF File for WSD Devices” in this document.
WSD devices are installed silently (without prompting the user) if a signed driver package is installed on the computer performing device discovery. If no signed driver package is available, the user is prompted to install the device. See also in this document:
, pnpx-wsd Schema Reference
WSD Device Metadata Requirements
Metadata is supplied in a metadata message. This message is a SOAP message that is sent by a WSD device that contains the DPWS elements. These elements represent the device metadata. The WSD Provider reads the metadata from the message. Metadata is stored in property keys (PKEYs), and can be queried as described in “Querying Device Metadata” in this document. For an example, see “Sample Metadata Message for WSD Devices” in this document.
For a complete description of the metadata elements listed below, see the DPWS specification at *
property keys are described in “Key Definitions” on MSDN. Other property keys are defined in propkey.h.
The following table shows the namespace prefixes that are used by metadata elements.
Prefix Namespace
wsa
wsd
wsdisco
pnpx 's property store is cached from installation to installation, so the device metadata is refreshed only when the
element has changed. Only the
element (and its corresponding PKEY,
PKEY_PNPX_DeviceCategory) are not persisted.
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 8
Metadata Elements Required by PnP-X
The following table shows the metadata elements that must be included in the metadata message for device installation. The table also shows the mapping from metadata elements to PKEYs.
Element Device PKEY Service PKEY
wsa:Address PKEY_PNPX_GlobalIdentity PKEY_PNPX_GlobalIdentity
PKEY_PNPX_ID n/a
wsd:ThisModel/pnpx:DeviceCategory PKEY_PNPX_DeviceCategory n/a
wsd:Hosted/pnpx:hardwareID n/a PKEY_PNPX_CompatibleTypes
wsd:Hosted/pnpx:compatibleID n/a PKEY_PNPX_CompatibleTypes The address (PKEY_PNPX_GlobalIdentity), the hardware identifier(s), and compatible identifier(s) (PKEY_PNPX_CompatibleTypes) are used by PnP to identify the device and to locate compatible drivers. The wsd:Hosted/pnpx:hardwareID and wsd:Hosted/pnpx:compatibleID elements
are used to populate the PKEY_PNPX_CompatibleTypes key only if the device is installable, that is, if PKEY_PNPX_Installable is TRUE.
Note The device identifier must be unique. Devices cannot share an identifier,
even if the devices use different protocols. If a device implements more than
one protocol, the device must have a unique identifier for each protocol. Metadata Elements Required by DPWS
The following table shows the metadata elements required by the DPWS specification. The table also shows the mapping from metadata elements to PKEYs. Element Device PKEY Service PKEY
wsdisco:MetadataVersion PKEY_PNPX_MetadataVersion PKEY_PNPX_MetadataVersion
wsd:ThisModel/wsd:Manufacturer PKEY_PNPX_Manufacturer PKEY_PNPX_Manufacturer
PKEY_Device_Manufacturer PKEY_Device_Manufacturer
PKEY_PNPX_CompatibleTypes PKEY_PNPX_CompatibleTypes
wsd:ThisModel/wsd:ManufacturerURL PKEY_PNPX_ManufacturerUrl PKEY_PNPX_ManufacturerUrl
PKEY_DriverPackage_VendorWebSite PKEY_DriverPackage_VendorWebSite
wsd:ThisModel/wsd:ModelName PKEY_PNPX_ModelName PKEY_PNPX_ModelName
PKEY_Device_Model PKEY_Device_Model
PKEY_Device_DeviceDesc PKEY_Device_DeviceDesc
PKEY_PNPX_CompatibleTypes PKEY_PNPX_CompatibleTypes
wsd:ThisModel/wsd:ModelNumber PKEY_PNPX_ModelNumber PKEY_PNPX_ModelNumber
PKEY_PNPX_CompatibleTypes PKEY_PNPX_CompatibleTypes
wsd:ThisModel/wsd:ModelURL PKEY_PNPX_ModelUrl PKEY_PNPX_ModelUrl
wsd:ThisModel/wsd:PresentationURL PKEY_PNPX_PresentationUrl PKEY_PNPX_PresentationUrl
wsd:ThisDevice/wsd:FriendlyName PKEY_PNPX_FriendlyName PKEY_PNPX_FriendlyName
PKEY_Device_FriendlyName PKEY_Device_FriendlyName
wsd:ThisDevice/wsd:FirmwareVersion PKEY_PNPX_FirmwareVersion PKEY_PNPX_FirmwareVersion
PKEY_Device_BIOSVersion PKEY_Device_BIOSVersion
wsd:ThisDevice/wsd:SerialNumber PKEY_PNPX_SerialNumber PKEY_PNPX_SerialNumber
wsd:Hosted/wsd:ServiceId n/a PKEY_PNPX_ID
wsd:ServiceId n/a PKEY_PNPX_ServiceId
wsd:Hosted/wsd:ServiceAddress n/a PKEY_PNPX_ServiceAddress
wsd:Hosted/wsdp:Types n/a PKEY_PNPX_Types
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 9
Note The wsd:ThisModel/wsd:Manufacturer,
wsd:ThisModel/wsd:ModelName, and wsd:ThisModel/wsd:ModelNumber
elements are used to populate the PKEY_PNPX_CompatibleTypes key only if
the device is not installable, that is, if PKEY_PNPX_Installable is FALSE.
Note The total combined length of PKEY_PNPX_GlobalIdentity and
PKEY_PNPX_ServiceId cannot exceed 167 characters (not including the NULL
terminator). If this limit is exceeded the installation of the device will fail. Optional Metadata
The following table shows optional metadata elements that can be included in the metadata message. The table also shows the mapping from metadata elements to PKEYs.
Element Device PKEY Service PKEY
wsdisco:Types PKEY_PNPX_Types n/a
PKEY_PNPX_CompatibleTyn/a
pes
wsdisco:Scopes PKEY_PNPX_Scopes PKEY_PNPX_Scopes
wsdisco:XAddrs PKEY_PNPX_XAddrs PKEY_PNPX_XAddrs
PKEY_Device_LocationInfo PKEY_Device_LocationInfo Note The wsdisco:Types element is used to populate the
PKEY_PNPX_CompatibleTypes key only if the device is not installable, that is,
if PKEY_PNPX_Installable is FALSE.
See also in this document:
, Querying Device Metadata
, pnpx-wsd Schema
Sample INF File for WSD Devices
The following INF file provides driver-matching information for the device using the hardware identifier PnPX_SampleService1_HWID.
Note When adapting this sample for use with your device, you must maintain
the UMB\ prefix on the device HWID or compatible ID. If you fail to do so, the
device will not be recognized by PnP-X and therefore the device will not be
installed.
;/*++
;
;Copyright )) Microsoft Corporation. All rights reserved.
;
;Module Name:
;
; pnpxsample.inf
;
;Abstract:
; Sample PnP-X INF file
;
;--*/
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 10 [Version]
Signature="$WINDOWS NT$"
Class=system
Class=PNPX
Provider=%MSFT%
ClassGuid={46162fd1-d6ed-4a13-8cae-273b9498c251} DriverVer=4/8/2005,1.00.0000
[DestinationDirs]
DefaultDestDir = 12
[ClassInstall32]
Addreg=PNPXDevices_ClassReg
[PNPXDevices_ClassReg]
HKR,,,,%ClassName%
HKR,,SilentInstall,,1
HKR,,Icon,,"-52"
[Manufacturer]
%MSFT%=PnpxDevice, ntamd64, ntia64
[PnpxDevice]
; Model Device Description Install Section HWIDs, Compatible IDs
; ----------- ------- --------
%PnpxDevice.DeviceDesc1%=PnpxDevice_Install,
UMB\PnPX_SampleService1_HWID
[PnpxDevice.ntamd64]
%PnpxDevice.DeviceDesc1%=PnpxDevice_Install,
UMB\PnPX_SampleService1_HWID
[PnpxDevice.ia64]
%PnpxDevice.DeviceDesc1%=PnpxDevice_Install,
UMB\PnPX_SampleService1_HWID
[PnpxDevice_Install]
[PnpxDevice_Install.HW]
AddReg=PnpxDevice_Install.HW.AddReg
[PnpxDevice_Install.HW.AddReg]
HKR,,InterfaceGUIDs,0x10000, "{6639fe91-e2e7-4bed-a066-8ddfcf64049d}"
[PnpxDevice_Install.Services] ; Setup the UMPass service for our device
AddService = UMPass, %SPSVCINST_ASSOCSERVICE%, UMPassService_Install
[UMPassService_Install]
DisplayName = %umpass.SVCDESC% ; Friendly Name of the Service ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\umpass.sys
LoadOrderGroup = Extended Base
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 11
[Strings] ; Strings that are referenced throughout the INF
MSFT = "Microsoft"
ClassName = "PNP-X Devices"
SPSVCINST_ASSOCSERVICE= 0x00000002
umpass.SVCDESC = "Microsoft UMPass Driver"
PnpxDevice.DeviceDesc1 = "PNP-X Example Device INF"
Sample Metadata Message for WSD Devices
The following SOAP message specifies metadata for a device (printer/scanner) that
offers two hosted services, identified by PnPX_SampleService1_HWID and
PnPX_SampleService2_HWID.
Printers Scanners
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 12
PnPX_SampleService1_HWID
PnPX_SampleService1_CPID
PnPX_SampleService2_HWID
PnPX_SampleService2_CPID
Creating a SSDP-Compliant Device
Device manufacturers must implement the following, in addition to base device
functionality:
, UPnP 1.0 device architecture support. To view the UPnP device architecture
specification, visit
, pnpx-ssdp schema support.
The device must completely implement the UPnP device architecture, including the
SSDP discovery response message and the device description file. The device
description file must include all elements specified in “SSDP Device Metadata
Requirements” in this document. This file includes both UPnP and pnpx-ssdp
schema elements.
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 13
SSDP devices can be installed only if the following criteria are met: , The HWID or Compatible ID specified in the device's INF file begins with the
prefix UMB\. For a correctly formatted HWID, see “Sample INF File for SSDP
Devices” in this document.
, The device is on the same subnet as the computer performing device discovery. SSDP devices are installed silently (without prompting the user) if a signed driver package is installed on the computer performing device discovery. If no signed driver package is available, the user is prompted to install the device. SSDP Device Metadata Requirements
Device metadata is supplied in an SSDP discovery response message and in a device description file.
Metadata is stored in property keys (PKEYs), and can be queried as described in “Querying Device Metadata” in this document.
The PKEY_PNPX_* property keys are described in “Key Definitions” at MSDN. Other property keys are defined in propkey.h.
Most properties are persisted when the device is installed. Only the pnpx:X_DeviceCategory element (and its corresponding PKEY,
PKEY_PNPX_DeviceCategory) are not persisted.
SSDP Discovery Response Metadata
The following table shows the metadata elements that must be specified in the SSDP discovery response message. The table also shows the mapping from headers to PKEYs.
Header Device PKEY
USN PKEY_PNPX_GlobalIdentity
PKEY_PNPX_ID
LOCATION PKEY_PNPX_XAddrs
PKEY_Device_LocationInfo
The USN is a UUID used by PnP to identify the device on the network. The location specifies the URL of the device description file.
Note The device identifier must be unique. Devices cannot share an identifier,
even if the devices use different protocols. If a device implements more than
one protocol, the device must have a unique identifier for each protocol.
Note The total combined length of PKEY_PNPX_GlobalIdentity and
PKEY_PNPX_Id cannot exceed 167 characters (not including the NULL
terminator). If this limit is exceeded the installation of the device will fail. Metadata Elements Required by PnP-X
The following table shows the namespace prefix that is used by PnP-X metadata elements in UPnP devices.
Prefix Namespace
pnpx
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 14
The following table shows the metadata elements that must be included in the description file for device installation. The table also shows the mapping from metadata elements to PKEYs.
Element Device PKEY
pnpx:X_DeviceCategory PKEY_PNPX_DeviceCategory
pnpx:X_hardwareID PKEY_PNPX_HardwareIds
PKEY_Device_HardwareIds
PKEY_PNPX_CompatibleTypes
pnpx:X_compatibleID PKEY_PNPX_CompatibleIds
PKEY_Device_CompatibleIds
PKEY_PNPX_CompatibleTypes Note The pnpx:X_hardwareID and pnpx:X_compatibleID elements are used
to populate the PKEY_PNPX_CompatibleTypes key only if the device is
installable, that is, if PKEY_PNPX_Installable is TRUE. Metadata Elements Required by UPnP Architecture
The following table shows the metadata elements that are required by the UPnP architecture specification. Elements are defined in the namespace urn:schemas-
upnp-org:device-1-0. The table also shows the mapping from metadata elements to PKEYs.
Element Device PKEY
friendlyName PKEY_PNPX_FriendlyName
PKEY_Device_FriendlyName
manufacturer PKEY_PNPX_Manufacturer
PKEY_Device_Manufacturer
PKEY_PNPX_CompatibleTypes
modelName PKEY_PNPX_ModelName
PKEY_Device_Model
PKEY_PNPX_CompatibleTypes
deviceType PKEY_PNPX_DeviceType
PKEY_PNPX_CompatibleTypes Note The manufacturer, modelName, and deviceType elements are used to
populate the PKEY_PNPX_CompatibleTypes key only if the device is not
installable, that is, if PKEY_PNPX_Installable is FALSE. Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 15
Optional Metadata
The following table shows optional metadata elements that can be included in the metadata message. Elements are defined in the namespace urn:schemas-upnp-
org:device-1-0. The table also shows the mapping from metadata elements to PKEYs.
Element Device PKEY
manufacturerURL PKEY_PNPX_ManufacturerUrl
PKEY_DriverPackage_VendorWebSite
modelNumber PKEY_PNPX_ModelNumber
PKEY_PNPX_CompatibleTypes
modelDescription PKEY_Device_DeviceDesc
presentationURL PKEY_PNPX_PresentationUrl
serialNumber PKEY_PNPX_SerialNumber
UPC PKEY_PNPX_Upc Note The modelNumber element is used to populate the
PKEY_PNPX_CompatibleTypes key only if the device is not installable, that is,
if PKEY_PNPX_Installable is FALSE.
See also in this document:
, Querying Device Metadata
Sample SSDP Discovery Response Message
The SSDP discovery response message contains device metadata that is required to identify the device on the network. The unique service name (USN) is used as the device identifier.
The format of the response message is specified by the UPnP device architecture specification. For more information about the specification, see
The following example shows an SSDP discovery response message. HTTP/1.1 200 OK
Location: :1234/upnphost/udhisapi.dll?
content=uuid:7364efab-76ed-39bd-bde9-1837415aeb93
Ext:
USN: uuid:7364efab-76ed-39bd-bde9-1837415aeb93:
:urn:schemas-upnp-org:device:Printer:1
Server: Microsoft-Windows-NT/5.1 UPnP/1.0
UPnP-Device-Host/1.0
Cache-Control: max-age=1800
ST: urn:schemas-upnp-org:device:Printer:1
Content-Length:0
Sample INF File for SSDP Devices
The following INF file provides driver matching information for the device using the hardware identifier PnPX SampleDevice_HWID.
Note When adapting this sample for use with your device, you must maintain
the UMB\ prefix on the device HWID or compatible ID. If you fail to do so, the
device will not be recognized by PnP-X and therefore the device will not be
installed.
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 16 ;/*++
;
;Copyright )) Microsoft Corporation. All rights reserved. ;
;Module Name:
;
; pnpxsample.inf
;
;Abstract:
; Sample PnP-X INF file
;
;--*/
[Version]
Signature="$WINDOWS NT$"
Class=system
Class=PNPX
Provider=%MSFT%
ClassGuid={46162fd1-d6ed-4a13-8cae-273b9498c251}
DriverVer=4/8/2005,1.00.0000
[DestinationDirs]
DefaultDestDir = 12
[ClassInstall32]
Addreg=PNPXDevices_ClassReg
[PNPXDevices_ClassReg]
HKR,,,,%ClassName%
HKR,,SilentInstall,,1
HKR,,Icon,,"-52"
[Manufacturer]
%MSFT%=PnpxDevice, ntamd64, ntia64
[PnpxDevice]
; Model Device Description Install Section HWIDs, Compatible IDs ; ----------- ------- --------
%PnpxDevice.DeviceDesc1%=PnpxDevice_Install, UMB\PnPX_SampleDevice_HWID
[PnpxDevice.ntamd64]
%PnpxDevice.DeviceDesc1%=PnpxDevice_Install, UMB\PnPX_SampleDevice_HWID
[PnpxDevice.ia64]
%PnpxDevice.DeviceDesc1%=PnpxDevice_Install, UMB\PnPX_SampleDevice_HWID
[PnpxDevice_Install]
[PnpxDevice_Install.HW]
AddReg=PnpxDevice_Install.HW.AddReg
[PnpxDevice_Install.HW.AddReg]
HKR,,InterfaceGUIDs,0x10000, "{6639fe91-e2e7-4bed-a066-8ddfcf64049d}"
[PnpxDevice_Install.Services] ; Setup the UMPass service for our device
AddService = UMPass, %SPSVCINST_ASSOCSERVICE%, UMPassService_Install
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 17 [UMPassService_Install]
DisplayName = %umpass.SVCDESC% ; Friendly Name of the Service ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\umpass.sys
LoadOrderGroup = Extended Base
[Strings] ; Strings that are referenced throughout the INF MSFT = "Microsoft"
ClassName = "PNP-X Devices"
SPSVCINST_ASSOCSERVICE= 0x00000002
umpass.SVCDESC = "Microsoft UMPass Driver"
PnpxDevice.DeviceDesc1 = "PNP-X - Example Device INF"
Sample Device Description File for SSDP Devices
The following XML file specifies metadata for a printer identified by
PnPX_SampleDevice_HWID.
major version number
minor version number
device URL
Version 1.0c – January 11, 2007 - ? 2006-2007 Microsoft Corporation. All rights reserved. Access to and viewing and implementation of the technology described in this document is covered under the Microsoft Windows Rally Program License Agreement, provided at the end of this document and also available from the Windows Rally Web site at
PnP-X: Plug and Play Extensions for Windows - 18
PnPX_SampleDevice_HWID
PnPX_SampleDevice_CPID
Printers.Printer
UPnP device type
friendly name
manufacturer
manufacturer URL
model description
model name
model number
URL to model site
manufacturer's serial number
device UDN
universal product code
image/format
horizontal pixels
vertical pixels
color depth
URL to icon
本文档为【PnP-X: Plug and Play Extensions for Windows】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。