Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample gatt client #9

Open
jmc420 opened this issue May 22, 2018 · 0 comments
Open

Sample gatt client #9

jmc420 opened this issue May 22, 2018 · 0 comments

Comments

@jmc420
Copy link

jmc420 commented May 22, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant