1

In a small team we're developing an application that is deployed to both Android (Tablets) and ChromeOS devices. For this, we have a couple build targets such as Pixel C's, Galaxy Tabs, an Asus C302 Chromebook and a Pixelbook.

The App we're developing interfaces over BLE with a Windows 10 system that runs an application that accepts incoming BLE connections. What we perform in our App:

  • We perform a scan to find a device with a specific name
  • 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();

When our App is deployed to Android targets, it successfully connects to the W10 app and retrieves its services (onServicesDiscovered). However, when the same builds of the App are ran on ChromeOS, the following exception is thrown for retrieving services:

08-17 10:46:52.750 3827-3846/com.(our namespace) D/TheApp: BleGattHandler | onServicesDiscovered() called with: gatt = [android.bluetooth.BluetoothGatt@baff2ee], status = [0]

08-17 10:46:52.751 3827-3846/com.(our namespace) 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.(our namespace).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)

Our conclusion is that for some reason, ChromeOS fails to retrieve the services of a BLE device. We're at a loss here and hope to hear if anyone of you knows the cause or possible resolution (we're also open to professional help)

What ChromeOS version are we using

Our most recent test (today) was on the Pixelbook with:

  • ChromeOS 68.0.3440.87 (from beta channel)
  • ChromeOS 69.0.3497.21 (from dev channel)

What we have found up till now

Why are we not using 'normal' Bluetooth (classic)?

We're currently using a C# W10 App to connect to using the App. However, this application serves as a Stub for now and will in the near future be replaced by a low-power embedded solution (wearable product) we are developing that requires operation over BLE. We're therefore bound to use BLE.

Grassant
  • 111
  • 5

0 Answers0