Unable to connect to multiple devices
See original GitHub issueHi,
I have 5 devices and most of the time it will only connect to 1 or 2 devices. Sometimes 3, but rarely more. I’m running ubuntu 14.04 TLS.
Here is my code if it can help:
var noble = require('noble');
var os = require('os');
noble.on('stateChange', function(state) {
console.log(state);
if (state === 'poweredOn') {
noble.startScanning();
} else {
}
});
noble.on('scanStart', function() {
console.log('scanStart');
});
noble.on('scanStop', function() {
console.log('scanStop');
});
noble.on('discover', function(peripheral) {
var localName = peripheral.advertisement.localName;
console.log("discover ", localName);
if(localName !== undefined && localName !== "" && localName.substring(0, "MY".length) === "MY") {
console.log("Connecting ", localName);
peripheral.on('connect', function() {
console.log(localName, 'connected');
});
peripheral.on('disconnect', function() {
console.log(localName, 'disconnected');
});
peripheral.connect(function(error) {
if(error) {
console.log(error);
return;
}
console.log(localName, 'connected!');
return;
});
}
});
When all 5 devices are power on, it will connect to maximum 3, I haven’t seen it connect to all 5. When all devices are off, the I switch one on, it will connect to it. But then when I turn on all the other 4 devices, it will never discover any of them. Thus not making an attempt to connect.
Also, would it work with bluez 5.xx?
Issue Analytics
- State:
- Created 8 years ago
- Comments:9
Top Results From Across the Web
Some (but not all) of my devices cannot connect to Wi-Fi ... - Fizz
Some (but not all) of my devices cannot connect to Wi-Fi. How do I fix this? · Make sure Wi-Fi is activated on...
Read more >How to Fix Bluetooth Pairing Problems - Techlicious
Can't connect two devices? Try these 16 tips to solve your Bluetooth pairing problems.
Read more >Why can't I connect more than one device to my WiFi? - Quora
If you are unable to connect more than 1 devices on your mobile, then it is possible that there is a device limit...
Read more >Unable to connect multiple devices… | Apple Developer Forums
Hi, I am implementing an iPhone/iPad and mac app that allows users to send each other messages using the bonjour protocol. Basically, a...
Read more >Unable to connect the headphones or speaker to a device ...
Hint: If a connection still can't be established, check the Bluetooth setting on other paired devices to find the device currently connected ......
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 Free
Top 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
@pdaddy26 try adding a
noble.startScanning();
inside the `peripheral.connect(function(error) {`` callback.This might be related to https://github.com/sandeepmistry/node-sensortag/issues/37.
@pdaddy26 thanks, unfortunately it looks the same to me.