Microsoft is redefining the category of Bluetooth APIs with the Windows 10 Creators Update. To accomplish this, Microsoft is working directly with Fitbit, Garmin and other device manufacturers and also would love to hear feedback from the Windows 10 community as a whole.
These are the three main features Microsoft is looking to introduce with Creators Update
- GATT Server
- Bluetooth LE Peripheral
- Unpaired Bluetooth LE device connectivity
Together with the above features, Microsoft is also focussing on improvements with Bluetooth LE, as well as the Bluetooth audio functionality.
With the latest Insider preview, Call Control API support is added to desktop. This implies your VoIP applications can locally exploit Bluetooth headset usefulness like receive, ignore, hold, call waiting, and so forth.
You will also experience higher-quality audio for voice, thanks to Wideband speech – coming soon to desktop. Now, Cortana will sound more lifelike and your Skype sessions will sound better than ever over Bluetooth.
GATT Server
GATT (or Generic ATTribute) logically describes how data is structured and must function in a Bluetooth LE device. The device that has the interesting data is the Server, and the device that uses that data to perform a function is known as the Client. For example, a Windows Phone (Client) reads data from a heart rate monitor (Server) to track that a user is working out optimally. Windows has traditionally been a GATT Client but with the Windows 10 Creators Update, Windows can operate as the Server as well. The hierarchy of classes in the example heart rate service is described below, but you can pick and choose any logical set of characteristics and descriptors to make your custom GATT service.
Your phone or PC has notification/user credential information that a wearable device does not have. For instance, when an incoming text message comes in, Windows can act as the GATT Server and notify a nearby wearable of the text’s arrival. Diagram 1 shows a sample service structure using Bluetooth classes implemented in this release.
For a more thorough discussion of GATT and all of its intricacies, take a look at the Bluetooth SIG page or the GATT tutorial on Adafruit.
Bluetooth LE Peripheral Role
In addition to GATT roles which determine the structure of the data, Bluetooth defines Generic Access Profile (GAP) roles as well.
These GAP roles specify which device advertises as connectable and which device does the connecting. To connect a device, Windows users generally go to the Settings page, find the device they want to connect and tap to connect. This action of connecting to remote devices implies that Windows is operating in the GAP Central role. However, there are often cases where remote devices such as smart locks need to be aware of Windows, or where you’re trying to connect two Windows devices. In such cases, we need to make sure that Windows can advertise as connectable. With the new Insider preview, apps can put the system in a state to advertise support for Bluetooth LE services. With Peripheral role and GATT Server combined, Windows can operate in all four combinations of GATT and GAP roles (color choices arbitrary, of course):
Unpaired Bluetooth LE device connectivity
Traditionally, Bluetooth LE devices needed to be paired with Windows to be accessed. This either forced the user to switch context to the Settings page, or caused developers to implement in-app pairing logic within the app. Unfortunately, there were even devices that didn’t support pairing, which necessitated ugly workarounds for the developer. All that is going to change now with the new Async GATT APIs.
In the new APIs, take a look at BluetoothLEDevice.GetGattServicesAsync(), GattDeviceService.GetCharacteristicsAsync() as well as GattCharacteristic.GetDescriptorsAsync() to get an idea for how to query a remote device without pairing.
If you would like to know more about changes coming to Bluetooth APIs, head to this page here