diff --git a/src/io/ble.js b/src/io/ble.js index 74fded844..e2ead7454 100644 --- a/src/io/ble.js +++ b/src/io/ble.js @@ -126,7 +126,9 @@ class BLE extends JSONRPCWebSocket { if (optStartNotifications) { params.startNotifications = true; } - this._characteristicDidChangeCallback = onCharacteristicChanged; + if (onCharacteristicChanged) { + this._characteristicDidChangeCallback = onCharacteristicChanged; + } return this.sendRemoteRequest('read', params) .catch(e => { this.handleDisconnectError(e);