Skip to content
This repository has been archived by the owner on Dec 20, 2019. It is now read-only.

Feature/enhance connection to multiple ble devices #89

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/adaptors/ble.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}
});

Expand Down