Network Printer Installation

This section provides design guidelines and requirements for a peripheral device to participate in the Tap and Setup and Tap and Reconnect use cases.

Network Printer Installation

During the tap, Near Field Proximity (NFP) receives pairing information from the connecting device. NFP passes the pairing information to Windows. Network printers describe a custom NDEF record which describes one or more printer addresses. Windows will prompt the user for consent, and if it is given, Windows will attempt to connect to each of the addresses, in order, until one succeeds.

There is no further interaction between an NFP provider in the PC and the connecting device.

Using NFC as an example, unidirectional installation is accomplished by storing the pairing information in a static or passive NFC tag (an active NFC tag in static-emulation mode may also be used). Windows subscribes to this pairing information. An NFC-enabled NFP provider on the PC receives the connection information from the tag and passes this to Windows as a subscriber. Upon receipt of the connection information, Windows performs the actual installation of the device in-band using device class specific techniques.

Interoperability Requirements

To ensure interoperability across NFP providers, the pairing information should be encapsulated in a provider-specific message format.

As described elsewhere in this document, there are no specific requirements for proximity technologies other than for NFC-enabled NFP providers.

For conveying network printer information for unidirectional installation, Windows requires NFC-enabled NFP providers to support the Windows defined NDEF record format.

Unidirectional Network Printer Installation

The next version of Windows will support pairing with network connected printers using NFC. Supported printers must be shared from a Windows print server, support the WS-Print protocol (also known as WSD printers) or support Wi-Fi Direct.

NFP Provider References

Printer installation is accomplished using an NFC Forum standardized Connection Handover Select message type. The below graphic provides an overview of how a Connection Handover Select message is applied for printer installation. The Handover Select record describes one or more “ac” or “Alternate Carrier” records. These records follow the Handover Select record sequentially and each have a well defined type. Finally, the message will contain a device pairing record which provides Windows with information about how to process the pairing operation.

Connection Handover Select Message

Shared Printers

Shared printers are described using an NDEF record which contains information about the printer. The NDEF record format follows the NDEF specification. The TNF and Type fields must be specified according to the NDEF specification. The other fields below will be sequentially listed in the Payload field of the NDEF record.

Field nameValueLength of valueDescription
TNF0x023 bitsFormat of the type field. Media-type as defined in RFC 2046.
Type'Application/vnd.ms-windows.nwprinting.oob'0x29 bytesMIME type for shared printer installation
OOB pairing dataUTF-8 encoded data which describes the UNC path to the printerSize of OOB pairing data

UNC path to the printer encoded in UTF-8. Examples:

\\printServer.contoso.com\printerName

\\printServer\printerName

 

WSD Printers

WSD printers are described using an NDEF record which contains information about the device’s WSD addresses. The NDEF record format follows the NDEF specification. The TNF and Type fields must be specified according to the NDEF specification. The other fields below will be sequentially listed in the Payload field of the NDEF record.

Field nameValueLength of valueDescription
TNF0x023 bitsFormat of the type field. Media-type as defined in RFC 2046.
Type'Application/vnd.ms-windows.wsd.oob'0x22 bytesMIME type for shared printer installation
OOB pairing dataWSD OOB pairing dataSize of OOB pairing data

OOB pairing data format for WSD devices. See below for details.

 

OOB Pairing Data Format

The OOB pairing data for a WSD printer follows the format below.

Field nameValueLength of valueDescription
WsdOobAssociationType0x34 bytesAssociation type indicator. Must be specified as 0x3, encoded big endian, for proximity pairing records. All other values reserved.
Flags0x04 bytesThis value is reserved for future use and must be set to 0x0.
SizeOfConnectionStringSize of the ConnectionString field2 bytesUnsigned, big endian encoded integer which indicates the number of bytes in the ConnectionString.
ConnectionStringThe connection stringSize of the connection stringConnectionString is a UTF-8 encoded, null (U+0000) delimited string which describes a collection of properties. It should be terminated by two null characters.

 

WSD ConnectionString Properties

A WSD ConnectionString must specify the DeviceID (key = id:), followed by one or more host endpoints for directed discovery, or indicate that the client should perform multicast discovery. Starting in Windows 8.1, only the first directed discovery or multicast entry in the ConnectionString will be attempted, so Microsoft recommends that implementers define a directed discovery address including a host name in the first entry.

KeyDescription
id:First entry must be the device ID. For example: urn:uuid:12345678-1234-1234-1234-123456789012.
dd:Key for directed discovery. Value must be specified as a url to the discovery endpoint of a WSD device.
mc:Key for multicast discovery. No value.

 

WSD ConnectionString Example

id:urn:uuid:12345678-1234-1234-1234-123456789012\0
dd:http://printerHostName/StableWSDiscoveryEndpoint/schemas-xmlsoap-org_ws_2005_04_discovery\0
dd:http://129.168.2.230/StableWSDiscoveryEndpoint/schemas-xmlsoap-org_ws_2005_04_discovery\0
mc:\0\0

Note  Carriage returns in the below example are to aid in readability and should not be included in the actual connection string.

Windows Device Pairing Record

The Windows Device Pairing Record follows the NDEF specification. It provides additional information to Windows about how to process the Connection Handover Select message. The TNF and Type fields must be specified according to the NDEF specification. The other fields below will be sequentially listed in the Payload field of the NDEF record.

Field nameValueLength of valueDescription
WsdOobAssociationType0x023 bitsFormat of the Type field that follows. Media-type as defined in RFC 2046.
Type'application/vnd.ms-windows.devicepairing'0x28 bytesNew type string we define for this scenario.
MajorVersion0x12 bytesMajor version is required to be 0x1.
MinorVersion0x02 bytesMinor version is required to be 0x0.
Flags0x0 or 0x11 byte

Set to 0x0 to try all transports

Set to 0x1 to attempt installation sequentially and stop after first success. Preference for transports is indicated by sequence of alternate carrier records.

Note  Values 0x0002 through 0x0064 are reserved.

Note: Values 0x0002 through 0x0064 are reserved.
Length of device friendly nameLength of device friendly name1 byteLength of Device friendly name
Device friendly nameUTF-8 encoded string up to 255 bytesLength of device friendly nameFriendly name for the device which will be shown in consent UI on the client.

 

Printer Connectivity Requirements

Printers and clients must be on a network where the targeted device or print server is visible. If the Printer and client are not on a network which is appropriate, the attempt to connect will fail.

Handling Edge Cases

If a user has previously paired a device, but then manually removes the device from the device list, tapping again will result in an attempt to install or pair.

If a user enters into the range of actuation but then suddenly leaves before the out-of-band (OOB) information is transferred, the device may become connectable but the PC will not look for the device. In this case, there will be no consent UI from the PC and the user will need to tap again. If the device is already discoverable when it is tapped again, it should remain discoverable and should reset the timeout period.

For network printers, if a connection to infrastructure network is lost, the installation will not be successful. The PC and connecting device must be connected to the same network.

If a user taps two devices at approximately the same time, only the pairing for the first received OOB information will be attempted.

Any attempt to tap the device on a system running an operating system that doesn’t support Tap to Setup or Tap to Reconnect may result in the device going into connectable mode but pairing will not take place. Users will need to use a pairing UI provided for Bluetooth and use the pairing button to initiate pairing.

 

 

Send comments about this topic to Microsoft

表示:
© 2014 Microsoft