sample-bluetooth-le-gattserver icon indicating copy to clipboard operation
sample-bluetooth-le-gattserver copied to clipboard

Sample gatt client

Open jmc420 opened this issue 6 years ago • 0 comments

Hi

I have written a simple GATT client that interacts with your server:

https://github.com/jmc420/sample-bluetooth-le-gattclient

I wrote the client because I am getting a connect followed immediately by a disconnect before the client is able to read the time characteristic.

This appears to be caused by this stack trace:

05-22 15:12:32.110 11559-11571/com.example.androidthings.gattserver W/BluetoothGattServer: Unhandled exception in callback java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference at android.os.Parcel.readException(Parcel.java:1699) at android.os.Parcel.readException(Parcel.java:1646) at android.bluetooth.IBluetoothGatt$Stub$Proxy.sendResponse(IBluetoothGatt.java:1424) at android.bluetooth.BluetoothGattServer.sendResponse(BluetoothGattServer.java:599) at com.example.androidthings.gattserver.GattServerActivity$gattServerCallback$1.onDescriptorWriteRequest(GattServerActivity.kt:197) at android.bluetooth.BluetoothGattServer$1.onDescriptorWriteRequest(BluetoothGattServer.java:261) at android.bluetooth.IBluetoothGattServerCallback$Stub.onTransact(IBluetoothGattServerCallback.java:263) at android.os.Binder.execTransact(Binder.java:573)

I wrote a stackoveflow question on this issue:

https://stackoverflow.com/questions/50393196/bluetooth-le-gatt-client-and-server

Does the same thing happen for you?

jmc420 avatar May 22 '18 14:05 jmc420