Skip to content
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

ConnectToDeviceAsync unable to connect to Bluetooth devices #755

Open
StevenBase opened this issue Oct 13, 2023 · 3 comments
Open

ConnectToDeviceAsync unable to connect to Bluetooth devices #755

StevenBase opened this issue Oct 13, 2023 · 3 comments

Comments

@StevenBase
Copy link

Steps to reproduce

  1. Turn on the Bluetooth switch on your phone
    2.Connect Bluetooth devices using an APP
    3.After the APP is successfully connected, turn off the Bluetooth switch on the phone
    4.Turn on the Bluetooth switch of the phone again
    5.Reconnect the last connected Bluetooth device using the APP

Expected behavior

If you view 'Adapter. Connected Devices', you will find that a previously connected device already exists and cannot be successfully connected again,After waiting for a period of time, an exception 'the task is cancelled' will be reported

@smsissuechecker
Copy link

Hi @StevenBase,

I'm the friendly issue checker.
It seems like (75.00 %) you haven't used our issue template 😢 I think it is very frustrating for the repository owners, if you ignore them.

If you think it's fine to make an exception, just ignore this message.
But if you think it was a mistake to delete the template, please close the issue and create a new one.

Thanks!

@hs8058
Copy link

hs8058 commented Oct 14, 2023

Gents,

I am re-iterating this issue on Android after an upgrade from 2.1.3 to 3. I am creating a different issue around our observations anyways but it is to confirm that the behavior from 2.1.3 to 3 about ConnecToKnownDevice also has changed entirely, which caused us a lot of headache.

@IainS1986
Copy link

Are you caching the Device object after the first connect and trying to reconnect to that?

Turning Bluetooth off will clear the Android ble cache, so you too should clear/null out your Device reference on disconnect and get a new instance if the Device after a new scan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants