This blog is to describe the Swift Pair on the Windows 10 particular it was introduced version 1803. I would like to collect all the information about this feature and how to enable on the Nordic SDK to support this. Most of the materials are referred to Microsoft documentation as below.
Introduced in Windows 10, version 1803, Swift Pair is the newest way to pair your Bluetooth peripherals to Windows 10 PCs. This topic describes the feature, requirements about how peripherals can support Swift Pair, frequently asked questions about how this quick and convenient feature works.
As the next evolution of pairing, users no longer need to navigate the Settings App and find their peripheral to pair. Windows can now do this for them by popping a notification when a new peripheral is nearby and ready. The steps to use and benefit from this feature are simple:
- Put the Bluetooth peripheral in pairing mode
- When the peripheral is close by, Windows will show a notification to the user
- Selecting “Connect” starts pairing the peripheral
- When the peripheral is no longer in pairing mode or is no longer nearby, Windows will remove the notification from the Action Center
If at any time, a user wishes to turn Swift Pair on or off, they can do so in the “Bluetooth & other devices” page. Enterprises will also be able to control this feature through the Bluetooth\AllowPromptedProximalConnections in the Policy CSP and with any existing Mobile Device Management solution.
Building a Swift Pair peripheral
There are two sets of requirements to ensure your peripheral works with Swift Pair.
- The peripheral’s behavior
- The structure and values in a Microsoft defined vendor advertisement section.
These are the set of requirements:
Peripheral Behavior (Required)
Discovery of Swift Pair peripherals happens over the Bluetooth Low Energy (LE) protocol and requires the use of LE advertisements. Windows uses this advertisement to identify a peripheral as Swift Pair capable. This advertisement must contain one of the Microsoft defined vendor sections (shown in Fig 2-4) in the advertisement while in pairing mode.
In order for Windows to identify a peripheral shortly after it enters pairing mode, peripherals should beacon for Swift Pair at a faster cadence than normal for quick discovery. The faster a peripheral advertises; the less time Windows needs to listen. This helps with Bluetooth & Wi-Fi coexistence on the same radio. After a short period of time, the peripheral can fall back to a lower but consistent advertising cadence.
- For quickest discovery: Beacon consistently every 30 ms for >= 30 seconds then fall back to a normal cadence.
- For normal cadence: Beacon consistently every 100 ms or 152.5 ms during a Swift Pair session.
- To keep this experience predictable for our users, the user should not have to try to pair to a peripheral that is no longer available. Remove the vendor section >30 seconds before exiting pairing mode.
If the peripheral is out of available pairings, remove the one with the longest time since last connect first.
BLE Payload Structures
Bluetooth LE is required, other BR/EDR peripherals can benefit from Swift Pair. There are three payloads which will trigger Swift Pair; one for solely Bluetooth LE peripherals, and two for dual mode peripherals. The dual mode payloads help address whether the peripheral pairs over both Bluetooth LE and BR/EDR using secure connections or is leveraging this Bluetooth LE advertisement to pair over only BR/EDR.
Nordic nRF5 SDK 16.0
Inside the release note of the SDK 16.0, it improved the dynamic advertising data update.
- Added a new library GATT Queue which can be used for buffering GATT procedures when
the SoftDevice cannot process them immediately. It can be used with, for example,
Indications, Read or Write Requests etc. The queued procedure is automatically
retried when events from the SoftDevice indicate that it can be processed.
Most of the GATT Client libraries use this module.
- Added support for the new SoftDevice S113 in selected BLE examples.
- Improved Database Discovery Module design to enable multiple instances,
for example to perform independent discovery on each connection.
- BLE Interactive CLI Example: added discovery of 128-bit UUID Services and
Characteristics at the first attempt.
- Advertising Module: improved dynamic advertising data update, no additional buffer is needed now – swap buffer was introduced within the module implementation.
- Added a new external BLE library: Tile, and a corresponding example: ble_app_tile.
The project implements proprietary GATT services for demonstrating the
“find me” feature.
The integrated modules include source code as well as a precompiled linkable library.
BLE Mouse / Keyoboard Example
It has supported the SWIFT Pair (SWIFT_PAIR_SUPPORTED = 1). It is target for the Windows 10 (default is enabled).
Change the Advertising Init to include the manufacturer specific data