-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Connect to Paired Device #17
Comments
@timscott Hey, that is very weird, I didn't have this issue before, but maybe the connection isn't terminated properly, can you try calling disconnect in componentWillUnmount or somewhere similar ? ... Also do you just reload the app or you shut it down completely and then run again ? |
@rusel1989 I have narrowed this down a little. It only happens upon pressing I wonder if there is any way to handle it in this module? Perhaps the fact that is does not happen when the app closes, but does happen when JS is reloaded offers some clue? I suppose it's development-only problem, however, it's a quite painful one. |
Hey this seems to me same as @waltermacambira describes in #15 so i will close this, the fix is almost ready :-) |
@rusel1989 I am facing similar problems. I discover the paired devices in the useEffect() and store the paired devices. Then I have a button that when I press should connect to the device that I want to connect to. Sometimes when I re-run the app, it is suddenly not able to connect to the device. It happens at random times. I was wondering if you could help with this. |
Hello guys, |
Not sure if this is a bug or I am doing something wrong. Basically I am unable to connect with an already paired device.
I have code like this:
The first time this code runs
connect
is called, and the (Android) phone prompts me to accept the pairing. I accept. Connect succeeds. I am able towrite
andread
. All is well.Upon subsequent passed through this code,
isConnected
is true. I can stillwrite
andread
. Again, all is well.Then I close and restart the app. After that when this code runs, I get an error on
connect
: "Error: Unable to connect to device"Then I on the phone go to Settings > Bluetooth and Unpair from the device. Now when this code runs
connect
succeeds again.I tried skipping
connect
if the device is already paired and just proceed towrite
. I did not expect that to work, and it does not.The text was updated successfully, but these errors were encountered: