bluetooth
bluetooth copied to clipboard
How to read an entire characteristic (and allocate sufficient memory)?
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?