New issue
Advanced search Search tips

Issue 903638 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

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



 
dfu_web.html
4.6 KB View Download
dfu.js
22.2 KB View Download
crc16.js
2.2 KB View Download
hex2bin.js
7.9 KB View Download
utf8.js
5.1 KB View Download
Components: Blink>Bluetooth
This is happening with a Swiftpoint ProPoint.

Comment 3 Deleted

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
Cc: phanindra.mandapaka@chromium.org
Labels: Needs-Triage-M70 Triaged-ET TE-Hardware-Dependency
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...!!
Thanks, this issue should show up on any BTLE enabled HID Mouse which also has the Battery Service in the list of advertised services.


Status: Available (was: Unconfirmed)
Thanks jracle@ for the advice on a workaround. We will find a BLE mouse and try it out.
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.
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
Hi guys, where are we on this issue?

It is blocking us (HID device makers)..
Gentle reminder..

Comment 12 by reillyg@chromium.org, Jan 16 (6 days ago)

Status: Untriaged (was: Available)
Marking Untriaged so this doesn't fall off our radar again.

Comment 13 by jracl...@gmail.com, 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

Comment 14 by reillyg@chromium.org, Jan 16 (6 days ago)

Owner: mattreynolds@chromium.org
Status: Assigned (was: Untriaged)
Matt is looking at Julien's patch.

Comment 15 by mattreynolds@chromium.org, 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).

Comment 16 by mattreyn...@google.com, 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