Currently I’m working with glucose meter and communicating with it via BLE. At the moment there are 3 records. The problem is when I’m trying to get only last record stored on the device through RACP all records are returned instead.
I’m using blessed library for managing BLE connection. After connecting with device I’m enabling notifications for measurement characteristic 00002A18-0000-1000-8000-00805f9b34fb
and then writing command to RACP characteristic with UUID 00002a52-0000-1000-8000-00805f9b34fb
Command looks like below (according to racp documentation):
val opCodeReportStoredRecords: Byte = 1
val operatorLastRecord: Byte = 6
val command = byteArrayOf(opCodeReportStoredRecords, operatorLastRecord)
peripheral.writeCharacteristic(characteristic, command, WriteType.WITH_RESPONSE)
I’m expecting one execution of onCharacterisiticUpdate
callback with last result, but getting three instead. Maybe I’m missing something here? Any advice would be much appreciated.