Android Question [Wish] BLE2 library to have a ReadComplete event

Would like a simple way to determine when a ReadData on a set of characteristics has sent all its data available events. At present this can only be done by reading specific characteristics and keeping track of which characteristic has been read and ticking it off when it appears in the data available routine.
 
There is no urgency. I solved the problem by incrementing a counter with each ReadData call, then decrementing it in DataAvailable. When zero, all the reads are complete. This also handles overlapping read requests where DataAvailables from a previous read are still going when the next ReadData is called.

This all came from the need to separate reads from writes (which I've posted about elsewhere). On the writing side the WriteComplete event gives a good indication, but there was no equivalent for reading.
 
Upvote 0
Top