New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 851402 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

Frequent failure in (dis)connecting with a BLE Peripheral device

Reported by brouns.w...@gmail.com, Jun 11 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36
Platform: 10718.13

Steps to reproduce the problem:
Dear all,

I hoped to report this issue to the component OS>System>Bluetooth but could not seem to select it from the 'New Issue' list.

I'm working in a development team at a multinational medical device company, extending our existing range of Android applications for professional use, to ChromeOS devices.

Our app in development relies on BLE to connect to peripherals. Yet, we're experiencing various BLE issues with ChromeOS. I have attempted to search for similar issues in the Chromium Issues list as we have, but could not find a direct match. I apologize nontheless if this issue would otherwise be reported duplicate.

Test scenario:
We tested the following scenario on three devices,  two Android tablets (Pixel C & Samsung Tab S3) and one Asus Chromebook C302C, running the aforementioned ChromeOS version.

Setup:
- Our setup consist of a Windows PC running a BLE application (BLE Peripheral Role, GATT server) and
- Our Android app, built for targetSDK 27, minSDK 24. This app connects over BLE to this Windows PC BLE application. 
In our commercial solution, this Windows BLE application is actually an embedded solution (a wearable device).

We noticed various connection issues with the Chromebook, which didn't occur on both tablets, while running the same implementation. As a consequence we decided to develop a simple application which performs a basic operation: Only connect and disconnect with the Windows BLE GATT server.
- For both tablets, this was no problem at all. It failed typically once per 50 attempts. 
- However, running the same application on the Chromebook result in only two, may three successful attempts in total. After each attempt, we were also no longer able to connect anymore to the Windows BLE Application. A Chromebook reboot was required.

We can sent you the sample application we used, but we also tested with existing apps available in Play:
- BLE SCANNER byBluepixel Technologies LLP
- Bluetooth LE Scanner app
You may use these apps as well.

Please let me know if you need more details, I will do my best to provide you with the requested information. 
I hope you are able to reproduce this issue and find out what is exactly the problem.

What is the expected behavior?

What went wrong?
Connecting / disconnecting with a BLE Peripheral

Did this work before? No 

Chrome version: 68.0.3440.15  Channel: dev
OS Version: 68.0.3440.15
Flash Version: 30.0.0.113

We have currently tested with an Asus C302C. Would it make sense to test with a Pixelbook instead (we have none in the office though). Please indicate if you believe this may be hardware related.
 
What is the expected behavior?
We would expect that the same stability exists when running the App on Android (the 2 tablets) as compared to on ChromeOS (the Asus C302C).

Also, I'd like to add the following about the test scenario and configuration of the Chromebook in our environment:
- Bluetooth: Enabled (as shown by system tray in ChromeOS)
- Developer mode enabled
- Tested on the stable build (66) and on the developer build (68)
- Tested with Chromebook plugged in, and on battery.
- Physical properties and variables are equal between Tablets and Chromebook (the distance from the BLE Peripheral for example)

Comment 2 by kozy@chromium.org, Jun 11 2018

Components: -Platform>DevTools OS>Hardware
Components: OS>Systems>Bluetooth
Added more information:

We have received a Pixelbook and tested it with the Stable and Developer channel (67 and 69 respectively). The same problem occurs.

Our lead developer has also informed this that our problem is very likely the same as is reported here: https://stackoverflow.com/questions/41972045/android-app-which-interacts-with-ble-devices-not-working-on-chromebook 
Cc: mcchou@chromium.org sonnysasaka@chromium.org josephsih@chromium.org pbath...@chromium.org dmitrygr@chromium.org rjahagir@chromium.org

Comment 6 Deleted

All,

The issue is still present in the latest dev and beta builds.
We use the following operations in our App that lead to ChromeOS's failure to retrieve services:

We perform a scan to find a device with a specific name, which we find properly
We connect to this device (using the Android Native BluetoothDevice class: mBluetoothDevice.connectGatt();)
We request the services: (using the Android Native BluetoothGatt class: mBluetoothGatt.discoverServices();) <--- this crashes


The following exception is thrown that identifies this issue:

08-17 10:46:52.751 3827-3846/com.(ournamespace) W/BluetoothGatt: Unhandled exception in callback
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.bluetooth.BluetoothGattCharacteristic android.bluetooth.BluetoothGattService.getCharacteristic(java.util.UUID)' on a null object reference
        at com.(ournamespace).communication.bluetooth.lowenergy.BleGattHandler.onServicesDiscovered(BleGattHandler.java:90)
        at android.bluetooth.BluetoothGatt$1.onSearchComplete(BluetoothGatt.java:237)
        at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:103)
        at android.os.Binder.execTransact(Binder.java:565)


The issue is still present in the following ChromeOS builds:
ChromeOS 68.0.3440.87 (from beta channel)
ChromeOS 69.0.3497.21 (from dev channel)
Cc: shijinabraham@chromium.org

Sign in to add a comment