UWP C# Bluetooth Low Energy: Multiple conncurrent connections not working

Amir Amin 96 Reputation points
2021-06-02T10:19:37.487+00:00

Hi,

In my UWP Windows 10 App, I am using Window.Devices.Bluetooth to scan and connect to in-house Bluetooth Low Energy devices. Below is the code sample used for connecting (The mac addresses are known for in-house devices)
The test application using following two APIs:

using Windows.Devices.Bluetooth;  
using Windows.Devices.Bluetooth.GenericAttributeProfile;  

var bleDevice = BluetoothLEDevice.FromBluetoothAddressAsync  
var services = bleDevice.GetGattServicesAsync  

With multiple devices advertising, the API GetGattServicesAsync works fine for the first device but return 'Unreachable' status when connection is attempted while first device is still connected. We see same behavior for either of the devices connected first.

101615-mainpagexamlcs.txt

Similar functionality was working fine in the past but isn't working with recent version of windows and SDK (Windows 10 21H1, SDK target 19041, SDK min 17134).

Am I missing some configuration or this functionality isn't supported anymore. I have attached the source code file of a minimal example (changed extension to txt to allow the attachment)

Thanks

Developer technologies | Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Amir Amin 96 Reputation points
    2021-06-17T09:43:54.38+00:00

    It turned out to be issue with BT's driver on lenovo P52 laptop. The issue initially resolved by using external dongle instead of internal BT. And after recent windows update to Intel Wireless Bluetooth driver v22.50.0.4, the multiple connections are working again with internet BT as well.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Peter Smith 581 Reputation points Microsoft Employee
    2021-06-02T21:53:25.187+00:00

    The good news is that what you're doing is intended to work, and that we don't know of any bugs in the Bluetooth stack that would fail. Connecting to multiple devices is definitely supported -- indeed, as my Bluetooth dev lead points out, if you've got a Bluetooth mouse and keyboard, that's two connections right there. We also have extensive tests (both internal and with partners) to ensure that multiple connections should work.

    We have a Bluetooth Virtual Sniffer that might help you track down the problem:

    We also have instructions on taking Bluetooth traces for a more detailed investigation.

    Peter Smith
    PM, Windows Bluetooth team


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.