Unable to connect to device via react-native-ble-plx

1.2k Views Asked by At

I am trying to connect to a ble device using react-native-ble-plx module and below is my code for creating a connection:-

           console.log("device id is ", device.id) 
          manager.connectToDevice(device.id).then(mydevice=>{
              console.log("connected device is +++++++++++++++++++++",mydevice)
            }).catch(err=>{
              console.log("manager connection err",err)
            })

On executing the code I got below response(catch block is getting excecuted every time):-

device id is  3C:11:92:6B:51:8B
manager connection err [BleError: Device 3C:11:92:6B:51:8B was disconnected]

What should I do to make connection with particular device

0

There are 0 best solutions below