Don Coleman
Don Coleman
@doug-a-brunner that's not good news. I'll look through this and talk to Ionic to see if they have ideas. Maybe there's another way to do this in the Ionic wrapper?
> It seems like the easiest way out, however, is to change the plugin to conform to the existing documentation You're mis-interpreting my documentation. :) I only want the connect...
@Domvel you need to startNotification again when you reconnect. I haven't seen anything to adjust the disconnect detection on Android.
@doug-a-brunner I verified that your description of the cancelFunction behavior is what's happening. The Ionic documentation for the plugin needs to be updated to make this clearer. When I unsubscribe...
Reading and writing (See #111) descriptors would be a good enhancement. I'm not planning on adding this until I need it for a client or someone hires me to do...
It's possible you're writing the new values to the characteristic before the ESP can send the notification. It's possible your phone can't handle all the notifications. 1) try using indications...
@JohnMcLear you need to pass an ArrayBuffer to write. Assuming you wanted to pass 17 to the service: ``` var data = new Uint8Array(1); data[0] = 17; ble.write(deviceId, service, characteristic,...
Generally BLE is limited to 20 bytes. You can send more data but the server needs to handle the offset properly. Theoretically iOS and Android should chunk this data, but...
@JohnMcLear for Android, 6 is [GATT_REQUEST_NOT_SUPPORTED](https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_REQUEST_NOT_SUPPORTED), probably from trying to write to a characteristic that only supports writeWithoutResponse. A translation of status to String could be added here https://github.com/don/cordova-plugin-ble-central/blob/c8a33a374508c5820d2147f60841e7e19077c7f4/src/android/Peripheral.java#L250
It looks like the user denied permission. https://github.com/don/cordova-plugin-ble-central/blob/master/src/android/BLECentralPlugin.java#L692 Maybe the callback is null? Any idea how to reproduce? I suppose it could fail more gracefully on the null pointer.