cordova-plugin-ble-central: iOS - startNotification callback not raised after disconnection from the peripheral

Hi !

I’m having this issue only on iOS with cordova-plugin-ble-central 1.1.9.

I’m connecting to a peripheral and listens to its notifications. Everything works fine.

Now, if I:

  • disconnect from the iOS app and reconnect to the peripheral, everything is OK, I start notifications and receive them.
  • turn off the peripheral and turn it on again. The app is able to find the peripheral, connect to it but the start notification callback will never be raised.

Can you please fix it?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Yeah, I wasn’t sure if it was the same because we were not disconnecting first.

I’ve noticed that if the startNotification fails during setup on iOS that the error is never passed back to the javascript layer. I’m not sure why reconnecting would impact this or make it more likely to fail however, unless the peripheral is rejecting the request to activate notifications for some reason.

There’s an obvious bug to fix at least, so I’ll put up a PR for this.