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

After called Quit(),Can not find any connectedable devices. #39

Open
playg8 opened this issue Dec 15, 2022 · 2 comments
Open

After called Quit(),Can not find any connectedable devices. #39

playg8 opened this issue Dec 15, 2022 · 2 comments

Comments

@playg8
Copy link

playg8 commented Dec 15, 2022

I am doing reconnect works.After called Quit() function, I found the scan func didm't work. I guess it is because the filter in c++ code worked in error.
IVector<hstring> requestedProperties = single_threaded_vector<hstring>({ L"System.Devices.Aep.DeviceAddress", L"System.Devices.Aep.IsConnected", L"System.Devices.Aep.Bluetooth.Le.IsConnectable" });
I need connect and disconnect.So, what can I do?

@playg8 playg8 changed the title After called Quit(),Can not cann't find connectedable devices. After called Quit(),Can not find any connectedable devices. Dec 15, 2022
@adabru
Copy link
Owner

adabru commented Dec 16, 2022

Do you get any error message in the bottom-left corner of the window?
Does a rescan work before calling Quit()?
As an alternative, maybe subscribe and unsubscribe are sufficient?

@playg8
Copy link
Author

playg8 commented Dec 22, 2022

I think there is something wrong with the c# code.

  1. when I want next scan, the cancel flag is still true, I must reset it
  2. when I do scan、connect、disconnect for loops, it crashed after sometime,because you called Quit() in destructor function.
    I fixed it in my own code, now it works all right. C++ code is very good, no error.

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

No branches or pull requests

2 participants