Cannot Access other Bluetooth services if device contains Windows enumeratable HID service
Reported by
adrian....@swiftpoint.net,
Nov 9
|
|||||
Issue description
Chrome Version : 70.0.3538.77
OS Version: 10.0
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari:
Firefox:
IE/Edge:
What steps will reproduce the problem?
1. Bluetooth Device Exposing: HID Mouse Service + Battery Level (or any other exposed service) Service
2. Attempt to read Battery Level from Battery Level Characteristic
3.
What is the expected result?
Windows will enumerate HID Mouse Service. Chrome will resolve the battery level characteristic allowing battery level of mouse to be determined.
What happens instead of that?
Windows will enumerate the HID Mouse Service, Battery Level Service is found, but the battery level characteristic cannot resolve / does not return / stays pending.
After a while it times out.
================================
Getting Battery Service...
connected to device
Getting Primary Service
DFU target issued GAP disconnect and reset into bootloader/DFU mode
Something went wrong: NetworkError: GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.
connect error: NetworkError: GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.
writeMode error: connect error: NetworkError: GATT Server is disconnected. Cannot retrieve services. (Re)connect first with `device.gatt.connect`.
Please provide any additional information below. Attach a screenshot if
possible.
UserAgentString: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
,
Nov 9
This is happening with a Swiftpoint ProPoint.
,
Nov 9
Hi guys, I confirm similar issue with device that exposes HID over GATT service. After some debugging here I've found that code exits in [1]. Error code is GattCommunicationStatus_AccessDenied. That happens because we try to retrieve characteristics on a service that is already used by the OS. Now, a workaround that makes service / characteristic enumeration proceed is to relax this line in case of access denied. Code proceeds and returns an empty list of characteristics [2]. [1] https://cs.chromium.org/chromium/src/device/bluetooth/bluetooth_gatt_discoverer_winrt.cc?g=0&l=236 [2] https://cs.chromium.org/chromium/src/device/bluetooth/bluetooth_gatt_discoverer_winrt.cc?g=0&l=258
,
Nov 12
The issue needs to be tested using a Bluetooth Device. As ET-team doesn't have the above devices to test the issue. Hence, adding label TE-Hardware-Dependency. Thanks...!!
,
Nov 12
Thanks, this issue should show up on any BTLE enabled HID Mouse which also has the Battery Service in the list of advertised services.
,
Nov 15
Thanks jracle@ for the advice on a workaround. We will find a BLE mouse and try it out.
,
Nov 15
I have done more testing and can confirm that the MacOS Chrome and Android Chrome perform as expected. Windows Chrome fails to proceed when there is a HID mouse gatt service as Windows OS will enumerate the device and the JS promise does not resolve.
,
Nov 15
You're welcome guys. Please tell us if you need a device. Your team should have a few MX Master and MX Anywhere with BLE / Unifying connectivity. Cheers
,
Dec 21
Hi guys, where are we on this issue? It is blocking us (HID device makers)..
,
Jan 10
Gentle reminder..
,
Jan 16
(6 days ago)
Marking Untriaged so this doesn't fall off our radar again.
,
Jan 16
(6 days ago)
Thanks Reilly, I've done a CL this morning, but it doesn't show-up here.. Available at https://chromium-review.googlesource.com/c/chromium/src/+/1414850
,
Jan 16
(6 days ago)
Matt is looking at Julien's patch.
,
Jan 17
(6 days ago)
Thanks for the patch! We have an MX Master with dual Unifying/Bluetooth support. (I also have an MX Anywhere on my desk but it seems to be Unifying-only.)
I'm using these commands to request the device and get the battery service:
let dev = await navigator.bluetooth.requestDevice({ filters:[{name:'MX Master'}], optionalServices: ['battery_service'] });
await dev.gatt.connect();
let bs = await dev.gatt.getPrimaryService('battery_service');
On Chrome OS (73.0.3669.0, Pixelbook 'eve') we get the expected BluetoothRemoteGATTService with battery service UUID 0000180f-0000-1000-8000-00805f9b34fb.
On Windows 10 the promise returned by getPrimaryService does not resolve and eventually times out (as described above).
,
Jan 17
(6 days ago)
Tested again on Windows 10 against ToT with the patch provided in #13, the expected BluetoothRemoteGATTService is returned. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by ortuno@chromium.org
, Nov 9