BLE Sending Blob request via Android device

Is there anyone using a blob (long read) request from an Android device?

We are working with a CC2540 from TI connected to Android 4.4. We are trying to read a long characteristic value (over 23 bytes in size). We haven't seen readBlob or readLong method in Android API for BLE.

We expect the Android BLE Stack to do this task for us by reading the generic presentation format (as well as the notification), but it doesn't work.

We don't know how to send a Blob request through Android.

+3


source to share


2 answers


Let me be clear that Android only has one method for reading a characteristic value, readCharacteristic (character). You can use this method to get a characteristic value of any length. Android takes care of forming the ReadBlob request; all in the back. However, you will have to change your CC2540 code to make it work with the ReadBlob request. After you have made all the necessary changes on your CC2540, when you call the readCharacteristic () function from Android, you will get all the value of the characteristic that you can access in the onCharacteristicRead () callback.



+2


source


You can't, BLE feature values ​​are limited to 20 bytes. So if you want to send or receive more than 20 bytes, you need to split it into 20 byte blocks. See this section on this issue.



0


source







All Articles