diff --git a/lib/adaptors/ble.js b/lib/adaptors/ble.js index b67d97e..a1aae53 100644 --- a/lib/adaptors/ble.js +++ b/lib/adaptors/ble.js @@ -85,8 +85,12 @@ Adaptor.prototype.open = function open(callback) { // connect to peripheral using noble ble.on("discover", function(peripheral) { if (peripheral.id === self.uuid) { + ble.stopScanning(); - self._connectPeripheral(peripheral, callback); + self._connectPeripheral(peripheral, function() { + ble.startScanning(); + callback(); + }); } });