Trying to connect to 2 tags at once
See original GitHub issueAs 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");
});
})
});
});
Issue Analytics
- State:
- Created 8 years ago
- Comments:43 (28 by maintainers)
Top Results From Across the Web
How to connect multiple tags to block out interface? - 226387
To summarize, I'm trying to connect the two tags/outputs (next to blue arrow), to the out (next to the red arrow) of the...
Read more >How to Combine Tags In Minecraft - YouTube
This video will show you how to combine tags such as the display tag and the enchantments tag into one item. Plus how...
Read more >Can I select multiple tags using getElementsByTagName?
No, you can't select multiple tags with a single call to getElementsByTagName . You can either do two queries using getElementsByTagName or use ......
Read more >Wrap multiple tags at once - Display & Video 360 Help
Step 1: Export the display creatives you want to wrap. Open Display & Video 360. ... Step 2: Send the tag wrapping spreadsheet...
Read more >Send to Tags
Use an automated email to send a campaign when you add a specific tag to a contact. The message can be anything you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What I found is that discovering stops when some data is sent. This the case when you do
connectAndSetUp
. In order to fix that I do the following:You can find a test script at https://github.com/martin-doyle/SensorTagMQTT/blob/master/testSensorTag.js.
I could connect up to 5 SensorTags so far. Please let me know if that works for you.
Hi, I have two noble listeners one is listening only and another one is scan and connect. If Noble is scanning and then connect after that 1 connection attempts never automatically start scanning. I have to start scanning manually “Noble.startScanning()” after every broadcast. Is there any solution to prevent them. Thanks in advance.