Jeremy Devouassoux
Jeremy Devouassoux

Reputation: 31

BLE Sending Blob request through android device

Is there someone using blob request (long read) from an android device?

We work with a CC2540 from TI, connected to a android 4.4. We try to read a long characteristic value (size more than 23 bytes). In the android API for BLE, we have not seen a readBlob or readLong method.

We expect that the Android BLE Stack do the job for us, by reading a characteristic presentation format (same way has notification), but it doesn't works.

We have no idea how to send Blob Request through Android.

Upvotes: 3

Views: 2478

Answers (2)

Arty
Arty

Reputation: 21

Let me make this clear that Android has only one method to read the value of a characteristic, readCharacteristic(characteristic). You can use this method to get the value of a characteristic of any length. Android takes care of forming a ReadBlob request; it's all in the back end. You'd have to change the code of your CC2540 though, to make it work with ReadBlob request. Once you make all the required changes at your CC2540 end, on calling readCharacteristic() from Android, you'll get the entire value of the characteristic which you can access in the onCharacteristicRead() callback.

Upvotes: 2

JPS
JPS

Reputation: 624

You can´t, BLE characteristic values are limited at 20 bytes. So if you want to send or receive more than 20 bytes, you have to split it into 20 byte chunks. See this topic on the issue.

Upvotes: 0

Related Questions