Open vinothkumartyson opened 4 years ago
This is probably and app or device issue. The plugin works well with iOS. Maybe the connection is waiting for a timeout? Try resetting the peripheral. Turn Bluetooth on and off on the iOS device or reboot it. I recommend that you write a simple app the scans and connects to help debug this.
I'm seeing the same issue too, building a basic scan & connect app to test the plugin out.
Scanning works great but when I call connect with the UUID of a device the callback is never fired.
I've tried cycling the bluetooth & power-cycling the device with no luck, I've also set an interval to call isConnected
every second & its returning as not connected.
Interestingly, I also tried autoConnect
instead of connect
and that seems to work fine. I noticed in the xcode logger that when I call connect
no call to the Native Cordova bridge gets logged (when I call other methods I see something similar to: "To Native Cordova -> BLE
Hi, I have the same issue with iOS. I can see the connection is made, but the callback is never called :-(. Did you find a reason or a fix ?
Ok, this is a device bug, not iOS. But still.. would have been fun for iOS to flag a mistake. My device didn't adv any services... Thanks for the great work !
ble.connect(myDeviceID, function(device) { alert("Successfully connected to device"); console.log("Send Data method success call back called"); var success = function() { alert("Write Successfully"); }; var failure = function(err) { alert("Failed writing data : "+JSON.stringify(err)); };