bluetooth icon indicating copy to clipboard operation
bluetooth copied to clipboard

How to read an entire characteristic (and allocate sufficient memory)?

Open dmjones opened this issue 1 year ago • 0 comments

I want to read a device characteristic that could be split into multiple records. I have two inter-related questions:

Am I responsible for calling DeviceCharacteristic.Read() multiple times, according to the "more data" bit, or is this handled by lower-level libraries?

Assuming I have to call multiple times, can I assume the results from DeviceCharacteristic.Read() will not be larger than DeviceCharacteristic.GetMTU()?

Finally, if the lower-level libraries handle multiple reads, how do I know how much data to allocate?

dmjones avatar Apr 25 '24 11:04 dmjones