Share via


Seamless Pairing for Windows Pens Implementation Guide

Note

This document details the protocol implementation to enable seamless Bluetooth pairing for compatible transducers via a Pen digitizer on Windows 11. This implementation guidance is agnostic of the pen protocol used between the pen transducer and pen digitizer however an implementation may elect to use any pen protocol with an uplink capability to facilitate the exchange of the relevant parameters herein described.

Device Class

Seamless Bluetooth pairing support is an extension of the Pen Device class on Windows. This implementation guide adds to the existing Pen Devices implementation guide and focuses on implementing necessary parameters exchange between the host and pen transducer.

Device Bus Connectivity

Please consult the prerequisite guidance here: Protocol Implementation (pen-protocol-implementation) | Microsoft Docs

A good understanding of the HID protocol is needed to be able to understand the information presented here. See the following resources for information about the HID protocol:

Windows includes a HID class driver and corresponding miniport drivers HID I²C, HID SPI, HID USB and HID BTH miniport drivers, therefore there is no need for any third-party mini-port drivers.

The pen digitizer firmware only needs to report the usages described in this topic. Windows will leverage compatible firmware and its own inbox drivers to support the seamless pairing experience.

A sample descriptor is provided in the Sample Report Descriptors section below.

Required Top Level HID Collections

Required top level HID collection for seamless pairing

A pen digitizer capable of supporting seamless pairing shall provide a top-level collection (TLC) that appears as vendor specific (Page 0xFFF4, Usage 0x01). This shall be a sibling TLC to the Integrated Windows Pen Collection.

INF Decorations for Digitizer Opt-in to Seamless Pairing

Given the use of Microsoft vendor specific HID usages in this implementation guide, it is a prerequisite for a pen digitizer to explicitly opt-in to allowing the OS to communicate with the corresponding TLC exposing them. The below should be furnished in an equivalent extension INF corresponding to the pen digitizer device. The presence of the device property below will signal that opt-in.

[Digitizer_Device.NT.Interfaces] AddInterface = {4D1E55B2-F16F-11CF-88CB-001111000030},,Digitizer_Device.AddInterface

[Digitizer_Device.AddInterface] AddProperty = Digitizer_Device.AddProperty

[Digitizer_Device.AddProperty] ; DEVPKEY_BluetoothOobCouplingChannel_OptInForUse {FE683ED0-DE80-4766-B422-4195993F4330}, 2, 0x11, , 1

Device Capability Report (Usage 0x16)

This is a bidirectional feature report meaning the host shall convey its capability to the digitizer on enumeration and subsequently query the digitizer’s capability. The following usage shall be present in the Device Capability Report to convey that the digitizer or host is able to support seamless pair capable pen transducers.

This feature report will be sent and subsequently retrieved upon enumeration.

Member Description Page ID Mandatory/Optional
Seamless Pair Capable Indicates whether the digitizer is able to support seamless pair capable pen transducers (bit flag where 1 indicates capability) 0xFFF4 0x10 Mandatory

Device Bluetooth Report (Usage 0x13)

The following usages shall be present in the Device Bluetooth Report which conveys relevant parameters about the Bluetooth radio integrated with the pen transducer.

This input report is only sent one time after a seamless pair capable transducer is in-range and verification of whether an existing pairing relationship with the host has been completed.

Member Description Page ID Mandatory/Optional
Device Bluetooth Address The 48-bit Bluetooth MAC address associated with the radio in the transducer 0xFFF4 0x02 Mandatory
Device Bluetooth Address Type Indicates whether the Device Bluetooth Address is not public 0xFFF4 0x08 Mandatory
Host Pairing Exists Indicates whether the transducer already has an existing pairing with this host 0xFFF4 0x11 Mandatory

Mandatory Usages

Device Bluetooth Address

This usage is expected to be 6 bytes containing the 48-bit MAC address associated with the Bluetooth radio integrated into the pen transducer. i.e. 11:22:33:44:55:66

Device Bluetooth Address Type

This usage is expected to be a flag indicating whether the Device Bluetooth Address usage should be interpreted by the host as public indicated by the flag clear = 0 or random indicated by the flag set = 1.

Seamless Pair Capable Transducer In-Range

This usage is expected to be a flag indicating whether a transducer capable of seamless pairing is now in range of the pen digitizer indicated TRUE by the flag set = 1. If the transducer is out-of-range or the transducer that is in-range isn’t capable of seamless pairing the entire input report should not be generated.

Host Pairing Exists

This usage is expected to be a flag indicating whether the seamless capable transducer which is in-range already has a paring relationship with this host. This is indicated to be TRUE by the flag set = 1. If there is no pairing relationship with this host this flag should be clear = 0.

Host Bluetooth Report (Usage 0x06)

The following usages shall be present in the Host Bluetooth Report which conveys relevant parameters about the hosts Bluetooth radio.

Member Description Page ID Mandatory/Optional
Host Bluetooth Address The 48-bit Bluetooth MAC address associated with the radio of the host 0xFFF4 0x03 Mandatory
Host Bluetooth Address Type Indicates whether the Host Bluetooth Address is public 0xFFF4 0x09 Mandatory

Mandatory Usages

Host Bluetooth Address

This usage is expected to be 6 bytes containing the 48-bit MAC address associated with the Bluetooth radio of the host. i.e. 11:22:33:44:55:66

Host Bluetooth Address Type

This usage is expected to be a flag indicating whether the Host Bluetooth Address usage should be interpreted by the digitizer and transducer as public indicated by the flag clear = 0 or random indicated by the flag set = 1. Note: On Windows, this shall always be of type public with the flag clear = 0.

Pairing Key Report (Usage 0x15)

Member Description Page ID Mandatory/Optional
Host Pairing Key The 128-bit pairing key provided by the host 0xFFF4 0x14 Mandatory
Device Bluetooth Address The 48-bit Bluetooth MAC address associated with the radio in the transducer 0xFFF4 0x02 Mandatory
Device Bluetooth Address Type Indicates whether the Device Bluetooth Address is not public 0xFFF4 0x08 Mandatory

Mandatory Usages

Host Pairing Key

This usage is expected to be 16 bytes containing the 128-bit temporary pairing key issued by the host to facilitate the seamless pairing of the previously reported capable transducer. If the host is locked/secured or isn’t seamless pairing capable, the pairing key report shall never be issued by the host.

Device Bluetooth Address

This is the same usage per the Device Bluetooth Report above, however this is used by the host to indicate which Bluetooth device the Host Pairing Key in this report is associated with in the scenarios where a digitizer supports multiple Bluetooth capable pens simultaneously.

Device Bluetooth Address Type

This is the same usage per the Device Bluetooth Report above and used in conjunction with Device Bluetooth Address as part of the indexing for the Host Pairing Key.

Expected Sequence

1. Enumeration

On a Windows 10 or Windows 11 OS, the Microsoft [Vendor Specific] Bluetooth Out-of-band Collection will be opened by a built in OS service once enumerated. The host will then issue a SET FEATURE for the Host Bluetooth Report with the Host Bluetooth Address and Host Bluetooth Address Type. The host will then also issue a GET FEATURE for the Device Capability Report. If the digitizer doesn’t return this report or returns 0, no further actions related to seamless pairing shall occur.

2. Seamless Capable Pen In-Range

Once a seamless capable pen has come in-range of the digitizer and whether any existing pairing relationship with the Host Bluetooth address has been ascertained then a Device Bluetooth input report shall be issued one time with all mandatory usages.

Note

If the pen which has come in-range of the digitizer is not seamless capable, no input report shall be issued. If the seamless pair capable pen goes out-of-range, there is no expectation of an out-of-range indication via this report. The state machine for a given seamless capable device shall reset upon each receipt of an input report with its Bluetooth address.

The mechanism for how the digitizer firmware obtains the parameters involving the Device Bluetooth Address from the transducer is pen protocol specific and intrinsically defined by the respective specification (i.e. MPP 2.6, AES 2.1)

3. Host Pairing Key Generation

If the Device Bluetooth report indicates that the pen in-range doesn’t have an existing pairing relationship with this host then provided that the host is not locked/secure, a temporary pairing key shall be generated per the Device Bluetooth Address. The host shall then issue the Pairing Key output report that contains the Host Pairing Key.

Note

On Windows 10, the OS service does not support seamless pairing and therefore will never provide a Host Pairing Key and will therefore never issue this output report.

The mechanism for how the digitizer firmware provides the temporary pairing key to the transducer’s Bluetooth radio is pen protocol specific and intrinsically defined by the respective specification (i.e. MPP 2.6, AES 2.1)

4. Pairing

Once the host has issued the output report with the pairing key, it will be waiting up to 30 seconds for advertisement. The pen’s Bluetooth connection shall then send a connectable Directed Advertisement to the host Bluetooth radio to form a connection which will then allow the host to initiate the pairing ceremony specifying the OOB (out-of-band) method. At this point the pen’s Bluetooth radio will verify the host address was the same it received (via the SET FEATURE report) and then provide the appropriate pairing response including the temporary key. The host Bluetooth radio will verify the temporary key and upon success the pen and host will exchange session encryption keys and complete the pairing ceremony.

If the pairing is successful, the next time the pen comes back into range, the Device Bluetooth input report shall indicate that Host Pairing Exists = 1 (TRUE).

Sample Report Descriptor

//Microsoft Bluetooth Out-of-Band TLC
0x06, 0xF4, 0xFF, // Usage Page (Vendor Defined 0xFFF4)
0x09, 0x01, // Usage (0x01)
0xA1, 0x01, // Collection (Application)
		
0x09, 0x16, // USAGE (Device Capability Report)
0xA1, 0x02, // COLLECTION (Logical)
0x85, 0x70, // REPORT_ID (0x70)
0x09, 0x10, // USAGE (Seamless Pair Capable) 
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x01, // REPORT_COUNT (1)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0xB1, 0x02, // FEATURE (Data,Var,Abs)
0x75, 0x07, // REPORT_SIZE (7)
0x95, 0x01, // REPORT_COUNT (1)
0xB1, 0x01, // FEATURE (Const,Var,Abs)
0xC0, // END_COLLECTION
		
0x09, 0x06, // USAGE (Host Bluetooth Report)
0xA1, 0x02, // COLLECTION (Logical)
0x85, 0x56, // REPORT_ID (0x56)
0x09, 0x03, // USAGE (Host Bluetooth Address)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0xFF, // LOGICAL_MAXIMUM (255)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x06, // REPORT_COUNT (6)
0xB2, 0x02, 0x01, // FEATURE (Data,Var,Abs,Buf) 
0x09, 0x09, // USAGE (Host Bluetooth Address Type) 
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x01, // REPORT_COUNT (1)
0xB1, 0x02, // FEATURE (Data,Var,Abs)
0x75, 0x07, // REPORT_SIZE (7)
0x95, 0x01, // REPORT_COUNT (1)
0xB1, 0x01, // FEATURE (Cnst,Ary,Abs)	 
0xC0, // END_COLLECTION
		
0x09, 0x13, // USAGE (Device Bluetooth Report)
0xA1, 0x02, // COLLECTION (Logical)
0x85, 0x6E, // REPORT_ID (0X6E)
0x09, 0x02, // USAGE (Device Bluetooth Address)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0xFF, // LOGICAL_MAXIMUM (255)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x06, // REPORT_COUNT (6)
0x82, 0x02, 0x01, // INPUT (Data,Var,Abs,Buf)
0x09, 0x08, // USAGE (Device Bluetooth Address Type) 
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x01, // REPORT_COUNT (1) 
0x81, 0x02, // INPUT (Data,Var,Abs) 
0x09, 0x11, // USAGE (Host Pairing Exists)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x01, // REPORT_COUNT (1) 
0x81, 0x02, // INPUT (Data,Var,Abs)
0x75, 0x06, // REPORT_SIZE (6) [PADDING]
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x01 // INPUT (Cnst,Ary,Abs)
0xC0, // END_COLLECTION
		

0x09, 0x15, // USAGE (Pairing Key Report) 
0xA1, 0x02, // COLLECTION (Logical)
0x85, 0x6f, // REPORT_ID (0X6F)
0x09, 0x02, // USAGE (Device Bluetooth Address)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0xff, 0x00, // LOGICAL_MAXIMUM (255)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x06, // REPORT_COUNT (6)
0x92, 0x02, 0x01, // OUTPUT (Data,Var,Abs,Buf)
0x09, 0x08, // USAGE (Device Bluetooth Address Type)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x01, // REPORT_COUNT (1)
0x91, 0x02, // OUTPUT (Data,Var,Abs)
0x75, 0x07, // REPORT_SIZE (7)
0x95, 0x01, // REPORT_COUNT (1)
0x91, 0x01, // OUTPUT (Cnst,Ary,Abs)
0x09, 0x14, // USAGE (Temporary Key)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0xFF, // LOGICAL_MAXIMUM (255)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x10, // REPORT_COUNT (16)
0x92, 0x02, 0x01, // OUTPUT (Data,Var,Abs,Buf)
0xC0, // END_COLLECTION