React-native-ble-plx: iOS 11.1.x specific connection issues.

Created on 19 Nov 2018  路  4Comments  路  Source: Polidea/react-native-ble-plx

Hello there! We have been using react-native-ble-plx for quite some time now, we recently upgraded from 0.10.0 to 1.0.0, but ever since we're having issues connecting to our bluetooth peripheral with iOS devices on iOS 11.1 & iOS 11.1.x

Further testing has shown that connecting with iOS 10.x and iOS 12.x is still working as before without any issues. As we're currently still investigating what the actual issue is, I wanted to reach out to anyone experiencing any issues on iOS 11.1 & iOS 11.1.x

I will update this ticket as we gather more info.

-> downgrading to 0.10.0 fixed the issue for now.
-> we're on "react-native": "^0.57.5"

_connectWithDevice(options) {
    return this._connect(this.device)
      .then(() => this.device.discoverAllServicesAndCharacteristics())
      .then(() => validateUUIDS(this.device))
      .then(() => this._bondDevice(options))

The error we're getting occurs when we're trying to bond.

  /**
   * Operation failed because device has to be connected to perform it.
   */
  DeviceNotConnected: 205,

Most helpful comment

Workaround was merged and released in 1.0.1. Please check if it works for you.

All 4 comments

I found a discussion about this issue on the Apple Developer Forum: https://forums.developer.apple.com/thread/80376#239909

We found out that the issue is related to the thread @bitcrumb mentioned above. And is a specific bug with iOS versions 11.x

When the restored peripheral's state is 'connected', canSendWriteWithoutResponse always returns false.

We will be making a pull request to resolve this shortly.

Workaround was merged and released in 1.0.1. Please check if it works for you.

Lost track of this issue, so I am a bit late to confirm. But yes, all good now :)

Issue can be closed.

Was this page helpful?
0 / 5 - 0 ratings