none
BluetoothLE GATT service DeviceWatcher behavior is not right on Windows 10.0.15063 RRS feed

  • Question

  • I have a code that creates a DeviceWatcher for Bluetooth GATT Service and watch for device add/removal like below. (following pseudo code is written in C++/WinRT)

    auto selector = GattDeviceService::GatDeviceSelectorFromUuid(...GATT service UUID...);
    auto watcher = DeviceInformation::CreateWatcher(selector);
    watcher.Added([](const auto&, const DeviceInformation& devInfo) {
      auto id = devInfo.Id();
      ....
    }
    watcher.Removed([](const auto& const DeviceInformationUpdate& devInfoUpdate) {
      auto id = devInfoUpdate.Id();
      ....
    }

    This code was working as I expected until Windows 10.0.14393 and I got the same ID for Added and Removed events .

    With Windows 10.0.15063, these two events give different IDs.  Removed event's ID looks like "\\\\?\\BTHLEDevice#{...GATT Service UUID...}_..." (this is same as 10.0.14393).

    But, Added event's ID looks like "BluetoothLE#BluetoothLExx:xx:xx:xx:xx:xx-xx:xx:xx:xx:xx:xx"  and this is different from 10.0.14393.  Because of this behavior change, I cannot match the Removed event to the corresponding Added event.

    I'd like to know if this is a bug of 10.0.15063, and if so, what does Microsoft recommend us to do (for short term workaround, and long term fix).

    Thanks.

    Wednesday, June 28, 2017 12:27 AM

Answers

  • Hi,

    Are you still seeing this issue? For us to better understand the DeviceWatcher issue you are facing, please collect Bluetooth traces using Feedback Hub and send them to us.

    To submit feedback, please follow these steps:

    1.      Search for “Feedback Hub” in Cortana search, then launch the app.

    2.      Navigate to Feedback in the left menu, then press + Add new feedback.

    3.      Select the Problem button, share any details you think are relevant, and choose an appropriate category and subcategory. (For proper Bluetooth logs to be captured it must be one of the Bluetooth context paths, e.g. Hardware, Devices, and Drivers -> Bluetooth – Discovery, Pairing, and Connectivity)

    4.      Important: If possible, reproduce the problem(s) after clicking Begin monitoring (or Start capture) near the end of the form; Stop monitoring when you’re done.

    5.      Once you’ve completed the form and monitoring, click Submit.

    6.      Click Continue using Feedback Hub.

    7.      Click My feedback at the top, then find the item you submitted (it may take a while to appear).

    8.      Open the item you submitted, then click Share.

    9.      Click Copy link, then paste the link here in your response.  (It will look like https://aka.ms/<unique link>.)

    • Marked as answer by sarai2 Tuesday, August 1, 2017 6:24 PM
    Friday, July 28, 2017 9:10 PM

All replies

  • Any response from MSFT?

    This problem is killing my application and I'd like to know if there's any workaround.

    Wednesday, July 12, 2017 3:24 PM
  • Hi,

    Are you still seeing this issue? For us to better understand the DeviceWatcher issue you are facing, please collect Bluetooth traces using Feedback Hub and send them to us.

    To submit feedback, please follow these steps:

    1.      Search for “Feedback Hub” in Cortana search, then launch the app.

    2.      Navigate to Feedback in the left menu, then press + Add new feedback.

    3.      Select the Problem button, share any details you think are relevant, and choose an appropriate category and subcategory. (For proper Bluetooth logs to be captured it must be one of the Bluetooth context paths, e.g. Hardware, Devices, and Drivers -> Bluetooth – Discovery, Pairing, and Connectivity)

    4.      Important: If possible, reproduce the problem(s) after clicking Begin monitoring (or Start capture) near the end of the form; Stop monitoring when you’re done.

    5.      Once you’ve completed the form and monitoring, click Submit.

    6.      Click Continue using Feedback Hub.

    7.      Click My feedback at the top, then find the item you submitted (it may take a while to appear).

    8.      Open the item you submitted, then click Share.

    9.      Click Copy link, then paste the link here in your response.  (It will look like https://aka.ms/<unique link>.)

    • Marked as answer by sarai2 Tuesday, August 1, 2017 6:24 PM
    Friday, July 28, 2017 9:10 PM
  • Thanks for following up.  It seems the problem was fixed in the latest build (15063.447?).
    Tuesday, August 1, 2017 6:24 PM