BLE plugin "Write failed" (Android 10)

I try to send commands to a BLE device from an Android phone, after connecting to the device, I call the write function and it always returns “Write failed”, any suggestions?

this.utils.isConnected(this.deviceId).then(() => {
        let data = new Uint8Array(3);
        data[0] = 0x24; 
        data[1] = 0x0B;
        data[2] = 0x23;
        this.utils.writeToDevice(data).then((response) => {
          alert('Send data ok!');
        }).catch((error) => {
          alert('Error! \n' + JSON.stringify(error));
        });
      }).catch(() => {
        //no conected
        alert(`device: ${this.deviceId}, not conected!`);
      });

     public writeToDevice(data): Promise<any> {
             return this.ble.writeWithoutResponse(this.DEVICE_CURRENT, this.SERVICE_UID,    this.CHARACTERISTIC_UID, data.buffer);
     }


Are you sure that you’re using the right service UUID and characteristic UUID? And is it a characteristic that is actually writable? (The nRF connect app might be useful to test that.)

I would also suggest to add types to all your functions (no any), e.g. to writeToDevice(data).

Hi pwespi,
Thank you very much for your reply, indeed the UUID service was wrong, maybe there is a way to know which one is correct?