1

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                                            
Phuc Nguyen
  • 25
  • 2
  • 8
  • 1
    Does this answer your question? [Android 10: GATT error with 133 - how fix?](https://stackoverflow.com/questions/60810522/android-10-gatt-error-with-133-how-fix) – Eric May 18 '23 at 17:48
  • The scanning and connecting works except reading data from its service FF01/characteristics FF02. – Phuc Nguyen May 18 '23 at 23:26
  • As the answerer in Erics link stated it is a generic Android error. You can find many questions regarding this error on here with multiple possible solutions for it here for example: https://stackoverflow.com/questions/25330938/android-bluetoothgatt-status-133-register-callback Not everything works for everybody though – Michael Kotzjan May 19 '23 at 18:59

0 Answers0