New issue
Advanced search Search tips

Issue 905667 link

Starred by 1 user

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Unable to register GATT services

Reported by steno...@gmail.com, Nov 15

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Platform: 11021.56.0 (Official Build) stable-channel veyron_minnie

Steps to reproduce the problem:
I'm using the Chrome.bluetoothlowenergy API's to connect to our BLE devices.
1. Connect to BLE device 
2. Connect to second BLE device

What is the expected behavior?
That the api gets notified of discovered GATT services.

What went wrong?
It looks like the device is connected, but the discovery of the services is never notified to the API.

After the first connection, I see the error Unable to register GATT service with handle 0x0008 for device in file:///var/log/messages.  The first connection notifies the API that the services were discovered.  After the attempt to connect to the second BLE device, I see the same error, but the API is never notified that services were discovered.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 70.0.3538.77  Channel: stable
OS Version: 70.0.3538.76
Flash Version: 

I was able to see the services added in the bt_console, but the API still didn't get notified of services added.
 
Could you check if you can discover services when using chrome://bluetooth-internals/#devices?

Also, how do you know that the API got notified of services being discovered? I don't think we have an event for that in the Chrome Apps API.

If possible, you should consider switching to Web Bluetooth[1]. It's much better designed, and works on all platforms.

[1] https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web
Components: -Blink>Bluetooth Platform>Apps>API>Bluetooth
Labels: Needs-Feedback
I can discover the services in chrome://bluetooth-internals.

The api gives you an event, chrome.bluetoothLowEnergy.onServiceAdded.addListener.  I don't get this event ever if the device as been connected to the chromebook previously.  I believe that's because of the caching.  So, in the callback to connect I ask for the services.  This works the first time, but the second time it doesn't.  I had to add a timeout for it to work.

We don't have the resources to switch API's with this legacy code.

Project Member

Comment 5 by sheriffbot@chromium.org, Nov 26

Cc: reillyg@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment