BleWinrtDll icon indicating copy to clipboard operation
BleWinrtDll copied to clipboard

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

Open playg8 opened this issue 3 years ago • 2 comments

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 avatar Dec 15 '22 06:12 playg8

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?

adabru avatar Dec 16 '22 20:12 adabru

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.

playg8 avatar Dec 22 '22 08:12 playg8