I tried to connect bluetooth device directly by passing peripheral id to connect method.But after few seconds it automatically disconnect and catch block execute and show Connection error.
connect(){
BleManager.connect('58:85:e9:5f:5f:82')
.then(() => {
// Success code
console.log('Connected');
})
.catch((error) => {
// Failure code
console.log(error);
});
}
I referred this link: https://github.com/innoveit/react-native-ble-manager