last day (16 days later) » 

11:27 PM
0
A: Reading stream data from Bluetooth Low Energy device

Linard ArquintYou can iterate over all found characteristics and get the BluetoothGattCharacteristic object with UUID1 and UUID2. Use "UUID.fromString()" to convert a string representing the UUID to a UUID object, which than can be used with ".equals" to compare with "characteristic.getUuid()". If I've unders...

 
Calling readCharacteristic(characteristic), the onCharacteristicRead()-callback is unfortunately not called.
 
@jdepypere could you test if the callback is still not called when you call readCharacteristic(...) on the main thread? There are quite a few issues with calling BLE methods on background threads... stackoverflow.com/a/20507449/1990080
 
I used this method to run mBluetoothGatt.readCharacteristic(characteristic), but the callback is still not called...
 
Hmm strange, does readCharacteristic() return true?
 
Good catch - it return false. What could cause this?
 
11:27 PM
I've never seen that and the documentation is as always quite sparse... Have you checked, whether the characteristic allows reading? It might be useful to double check with the nRF Master Control Panel app: play.google.com/store/apps/…
 
Thanks I'll test that out! This topic stackoverflow.com/questions/25865587/… sais if the type of characteristic is different from read the callback won't be called
 
okay that makes sense
 
Using the app you provided doing the RX characteristic it does read in some chars
 
in this case you might want to read a different characteristic (which is readable) or you have to change the characteristic's definition in the peripheral
 
and also notes that the properties are NOTIFY, checked that myself as well
 
11:36 PM
is it only notify?
this means that you can register yourself and then you will receive a notification every time the value of that characteristic changes
 
And how do I then read the data?
 

  last day (16 days later) »