January 13, 2017 1:45 pm

New Bluetooth features in Windows 10 Creators Update (a.k.a. GATT Server and friends)

This release is big on Bluetooth. If you’re familiar with Windows Bluetooth APIs, have been meaning to try them out, or if you’re just starting to dabble in IoT and wearables, this is a great time to take a fresh look at all things Bluetooth. To ensure the APIs we built out are functional and performant, we are working directly with Fitbit, Garmin and other device manufacturers and we would love your feedback as well.

There are three main features in this month’s Insider preview:

  • GATT Server
  • Bluetooth LE Peripheral
  • Unpaired Bluetooth LE device connectivity

A lot of the improvements are focused on Bluetooth LE, but we have improved Bluetooth audio functionality as well. While we made a lot of changes under the hood to ensure that all your devices talk nicely with each other, we also added a couple of new features.

Call Control API support comes to desktop. This means your VoIP apps can natively take advantage of Bluetooth headset functionality like pick up, hang up, hold, call waiting, etc. 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.

Now, let’s break down the LE portions of this feature set.

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.

Diagram 1: Sample Heart Rate GattDeviceService

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):

Diagram 2: Windows operating in all GATT and GAP roles

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.

What you need to get started

It’s all in the release preview Build and SDK, available to download here. Once you install the build, take a look at the classes that were described in the previous sections and have at it. We’re a little light on the documentation right now, but we will remedy that soon.

Does this mean my <insert wearable here> can get notifications?

GATT Server will open up a myriad of Bluetooth LE device-to-device scenarios that we think are super exciting! Why limit yourself to “Notifications”? Think remote authentication, smart locks, proximity and IoT! The world is your (wireless) oyster. But yes, developers can start enabling notifications now. However, consumers will only see this functionality lit up once Windows 10 Creators Update is released and their updated app is in the store.

If you would like us to go deeper on any of the topics in this post, please let us know in the comment sections below.

Updated January 13, 2017 5:41 pm

Join the conversation

  1. Fitbit and Garmin has been mentioned. Please also try to get Polar onboard so that they can bring out proper Win10 apps for their devices?

    • Thanks Marais. Duly noted. We engage w/ a broad range of companies and often the same company has different teams working on different apps. Which app in particular is not available?

    • Yes, there should be no gap (if there’s functionality you depend on that’s not available after this update please let us know).

  2. I am having a difficult time setting up the GattServiceProvider. I get invalid pointer exceptions. Server side documentation would be of tremendous help.

    Is the GattServer role supported on IOT?

    Great article.

    • Yes, we’re still working on rolling out some more detailed server documentation. GattServer *should* be supported but we’re definitely still working out some kinks. I’ll get back to you on IoT support.

  3. I heard and saw a lot about creaters update but fond nobody said in developing countries we have printers camras etc that are expensive to buy for people here , were compatible with Windows 7 but after upgrading to Windows 10 all these machines or gadgets do not compatible with Windows 10 and their manufacturers also did not updated their drivers or softwares. I request to creators update team please do something in Windows 10 all gadgets which were compatible with Windows 7 now after creators update of 10 they all become compatible and start working. Thank

  4. Thank you for the update.

    Is the connecting process the same as before for Unpaired Bluetooth LE device connectivity?

    Before I used
    BluetoothLEDevice bleDevice = await BluetoothLEDevice.FromIdAsync(deviceInformation.Id);
    or BluetoothLEDevice.FromBluetoothAddressAsync

    to connect to my device. With this version the connection is not established anymore. I do get the BluetoothLeDevice object but it is not connected.

    Is there a new way to connect to the device?

    Also after this if I do >> await bleDevice.GetGattServicesAsync(); I get 0 results. I guess that is expected if no connection is established..

    • More information on this:
      I get the advertisements from the device, so BLE is working.
      I also tried to pair(this was as a test, because in real situation I would just like to connect). “await deviceInformation.Pairing.PairAsync();”
      connects to the device and starts the pairing process. The settings app also starts the pairing process.
      After the pairing is complete and I disconnect from the settings, the app still does not connect.

      I’m using the ble dongle http://www.ccandc.com.tw/products_2.php?prod=99 and the BLE device is a broadcasting iPhone app with its services and characteristics.
      I’m using a Bluetooth dongle: http://www.ccandc.com.tw/products_2.php?prod=99

      • Hey I have the same issues like Tõnis Tiganik. Tõnis I think we need to connect (Not pair) the BLE device, but I don’t know, how I can do this. I use the OLP425 BLE-Module, which works fine with pairing.

          • Yes connecting should occur when you create a BluetoothLEDevice object. The call to GetGattServicesAsync() is intended to query the remote device for supported services. This is not a known issue at this time and the currently released builds have this working so please try this again and report back. If you continue to have issues, please report it to support.microsoft.com.

  5. This is some awesome news. Can’t wait discover some interesting stuff with various LE devices. Thanks.

  6. Hi Kiran.

    Is there any sample for BTLE Server?
    I was able to register GattServiceProviderTrigger. It is fired upon wearable device request.
    Also, I can successfully get ‘Read’ event. But, than I try to respond with ‘request.RespondWithValue’ it sends a response but do not return and hang up forever (until background task is killed by the system).

    Could you please give any idea how to use it.

    Thanks.

    • This was a known issue that we fixed recently and should be available in the latest Insider Preview builds. Let us know if you see any more trouble with the requests not completing. We should have samples and documentation available soon.

  7. Hi there,
    I’m currently working on a project where I want Windows 10 to work as a Bluetooth GAP Peripheral acting as a GATT Server. Since these features are available in the latests Windows 10 Insider Previews (see: http://bit.ly/2kUGV0R) I was wondering why the latest Bluetooth drivers of my Surface Book i7 do not support the Bluetooth Peripheral mode.

    So here comes my question: Does anybody know a Bluetooth adapter which properly supports the Bluetooth Peripheral mode within the latest Windows 10 Insider Preview builds?

    Thanks.

    • This is a hardware capability that needs to be supported at the controller level. We have provided an API (BluetoothAdapter.IsPeripheralRoleSupported) to enable developers to discover which devices support the feature at runtime. We have confirmation that Windows Phone’s based on 8992 and later support this feature as well as Windows IoT on RPi3

  8. Do i have to update my raspberry pi 3 build to the Windows 10 IoT Core build 15043, in order to test these new libraries?

    Many Thanks.

  9. Thanks Kiran for post, Is this feature (GATT Server) fully support in windows 10 iot core build 15026 or 15043 ?

    i want to communicate windows iot core with Android and iOS App , can i do it without pairing ?

  10. Currently I see, that there is no chance to change the GAP for advertisement. Are there any plans for the future to get an access to the GAP? For development we would like to implement a BLE device emulator, for which we need to change the GAP (Shortened Local Name and Complete Local Name for example)

  11. Good day.
    After installing the SDK (15052), I am still not seeing the BluetoothLEDevice.GetGattServicesAsync(), GattDeviceService.GetCharacteristicsAsync() as well as the GattCharacteristic.GetDescriptorsAsync() functions to make an unpaired connection with my BLE device. I am using VS2015, but have temporarily tried VS2017 to see if it might be a requirement, yet it didn’t yield any results.
    The download page indicate that it might be necessary to install the Insider Preview version of Windows 10. Is this required, or am I missing something else?
    Looking forward to your response and I’m glad to see Microsoft’s development in this field.

    • I fired up a VM with Win 10 Insider build 15058, installed the SDK build 15052 and installed VS17, and I still can’t call these functions.

      Creating a device like so
      Windows.Devices.Bluetooth.BluetoothLEDevice bleDevice = await Windows.Devices.Bluetooth.BluetoothLEDevice.FromBluetoothAddressAsync(bleDeviceAddress);
      only yields .GattServices, .GattServicesChanged and .GetGattService when I type
      bleDevice.
      after creating the device.

      Any assistance would be appreciated. It feels like I’m missing something small, like pointing VS to the correct SDK or something. (I actually live in the embedded world, so it’s quite possible I’m missing something up here.)