react-native-ble-manager icon indicating copy to clipboard operation
react-native-ble-manager copied to clipboard

Connection error on every single device using the example code

Open RM-Eric opened this issue 6 years ago • 1 comments

Version

Tell us which versions you are using:

  • react-native-ble-manager v7.1.0
  • react-native v0.61.5
  • iOS/Android v.5.1.1

Expected behaviour

connect(peripheralId) should connect to a device

Actual behaviour

Every device I select returns, "Connection error Connection error" in the console, using the example code verbatim from https://github.com/innoveit/react-native-ble-manager/blob/master/example/App.js

(The only change I made was that I added {reportDelay: 0} as the options argument to avoid getting a null error)

After getting a very long list of devices from scanning, on every single item i tap on to retrieve each peripheral's data i get a connection error

Steps to reproduce

  1. Build a RN app using the repo's example code
  2. Scan devices
  3. Attempt to connect to any device

Stack trace and console log

The only console data is:

"Connection error Connection error" upon trying to connect to a device. Is it possible to get a more verbose error description of why it did not connect? Could I be doing anything else wrong?

Hint: it would help a lot if you enable the debugger ("Pause on exceptions" in the "Source" panel of Chrome dev tools) and spot the place where the error is thrown

RM-Eric avatar Jan 30 '20 01:01 RM-Eric

I am having the same issue.. if you found the solution kindly update here as well. I hard coded my own android phone's Bluetooth address and still getting the same error.

Sibtain-Shah avatar Feb 15 '20 17:02 Sibtain-Shah