-
Notifications
You must be signed in to change notification settings - Fork 109
Open
Description
As mentioned over in the Node-Red side of things, I'm having issues connecting to multiple tags at once.
The second discover never happens. I'm wondering if the discovery phase is shutdown by the connect call. If so I guess the only way to do it is to call discover all, save the list of discovered tags and then connect after a suitable time out period?
var SensorTag = require('sensortag');
SensorTag.discoverByUuid("34b1f7d136b9",function(tag){
console.log("found " + tag.uuid);
tag.connect(function(){
tag.discoverServicesAndCharacteristics(function(){
tag.notifySimpleKey(function(err){
console.log(err);
});
tag.on('simpleKeyChange', function(left, right){
console.log("button " + left + " 34b");
});
})
});
});
SensorTag.discoverByUuid('1cba8c20caf3',function(tag){
console.log("found " + tag.uuid);
tag.connect(function(){
tag.discoverServicesAndCharacteristics(function(){
tag.notifySimpleKey(function(err){
console.log(err);
});
tag.on('simpleKeyChange', function(left, right){
console.log("button " + left + " 1cb");
});
})
});
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels