I'm building a cordova app for Android with cordova-plugin-ble-central for reading data from device BLE-9909 Meter Powered by YINMIK. The scanning and connecting with plugin are fine except the reading data. I'm getting the following error. Could you please provide a direction? Thanks.
Notes: Reading battery service 0x180F/characteristics 0x2A19 works on Android except the service FF01/characteristics FF02. The issue doesn't happen on BLE browser.
D/BLEPlugin: action = isConnected
D/BLEPlugin: action = read
D/Peripheral: Queuing Command com.megster.cordova.ble.central.BLECommand@ca43bed
D/Peripheral: Processing Commands
D/Peripheral: Read 0000ff02-0000-1000-8000-00805f9b34fb
D/Peripheral: onCharacteristicRead android.bluetooth.BluetoothGattCharacteristic@cb961e5
D/Peripheral: Processing Complete
D/Peripheral: Processing Commands
D/Peripheral: Command Queue is empty.
I/chromium: [INFO:CONSOLE(478)] "Error reading 0000ff02-0000-1000-8000-00805f9b34fb status=133"
Here is the code snippet:
let intervalId = setInterval(function () {
ble.isConnected(
deviceId,
function() {
ble.read(
deviceId,
'FF01',
'FF02',
//'180A', //battery service
//'2A25', // battery characteristics
(buffer) => {
console.log('Got BLE-9909 data');
},
(err) => {
console.error(err);
}
);
},
function() {
console.log("Sensor already disconnected. Stop reading");
clearInterval(intervalId);
}
);
}, 505);
And device document:
Bluetooth communication protocol
Basic Information
1 Bluetooth name: BLE-9100 i.e. product name(BLE-9100,BLE-Ph01,BLE-9909,…)
2 Service UUID FF01
3 Feature UUID FF02 read and write
read data
1 After the Bluetooth connection is successful, subscribe to the characteristic UUID FF02,
2 Read the characteristic UUID FF02 to return the data