Everytime I try to connect to an android 7.0 device, I get an error for device is disconnected. Why is this happening?
See original GitHub issue scanAndConnect(){
this.manager.startDeviceScan(null, null, (error, device) => {
if(error){
console.log('Error occurred while scanning');
return;
}
if(device.id === MAC ){
this.manager.stopDeviceScan();
this.manager.connectToDevice(MAC, {autoConnect:false})
.then((device) => {
this.info("Discovering services and characteristics")
console.log('device');
return device.services(device.id);
})
.then((service) => {
this.info("Listening... ")
console.log(services)
})
.catch((error) => {
console.log(error.message);
device.cancelConnection();
this.scanAndConnect();
});
}
})
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
How to Fix Bluetooth Pairing Problems - Techlicious
1. Make sure Bluetooth is turned on ... You should see the little Bluetooth symbol at the top right of the screen if...
Read more >5 Ways to Fix Wi-Fi Authentication Problems on Android
1. Open your Wi-Fi settings in the Settings app, like you did when forgetting the network, tap and hold the network or choose...
Read more >Fix FITPRO Device disconnected Problem - YouTube
Fitpro auto disconnect problem happens when you don't turn ON the ... after watching this video on how to connect smartwatch to fitpro...
Read more >How to Fix Android 7.0 Nougat Bluetooth issues - Nerds Chalk
First up, unpair your Nougat devices with all Bluetooth devices first. Now, turn off Wi-Fi and Bluetooth. Give device a reboot. Make sure...
Read more >The Device Has Either Stopped Responding or Has Been ...
I get an error message “The Device has either stopped responding or has been disconnected” (see photo attached). This has happened recently –...
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
I might help elaborate because I’m having the same problem. I’m using the same code to connect to my bluetooth device, every time, after few seconds from the
connectToDevice
function I get the error “Device [MAC_ADDRESS] was disconnected”.I can’t see any other log (not “Discovering services and characteristics”, not “Listening…”)…the code goes directly in the
catch
clause of the function and print the error. Here’s the stackoverflow question: https://stackoverflow.com/questions/56632350/react-native-bluetooth-device-keep-disconnectingThe problem still exists, any ideas?