tinyb icon indicating copy to clipboard operation
tinyb copied to clipboard

std::exception happens when I tries to use getValue() from descriptor.

Open ghost opened this issue 7 years ago • 0 comments

Hello, I want to use this library to connect my wearable device. I started with the HelloTinyB.java in Eclipse. I successfully got the services, characteristics and descriptors. When I tried to get data from one specific descriptor by means of descriptor.getValue() method, exception happened and the details are retailed below. Part of code: byte[] tempRaw = descriptor.getValue(); System.out.print("data raw = {"); for (byte b : tempRaw) { System.out.print(String.format("%02x,", b)); } System.out.print("}");

Exception: Exception in thread "main" java.lang.Error: std::exception at tinyb.BluetoothGattDescriptor.getValue(Native Method) at test.HelloTinyB.main(HelloTinyB.java:212)

How can I solve this problem?

ghost avatar Apr 05 '18 18:04 ghost