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

Connect 2 DLLs to one BLE IndoorBike #63

Open
ShuohengZhang opened this issue Jan 23, 2024 · 3 comments
Open

Connect 2 DLLs to one BLE IndoorBike #63

ShuohengZhang opened this issue Jan 23, 2024 · 3 comments

Comments

@ShuohengZhang
Copy link

#26 Hi @adabru, I have fixed the DllNotFoundException by downloading the dlls that are missing. As only the write functions in BleWinrtDll do not work in my project, I want to use my DLL as a substitute. As I tested them separately, they worked well. However, when I use BleWinrtDll to subscribe to the 2ad2 (and ignore the 2ad9), I still cannot subscribe to the write function through my DLL.

Captur1e
Capt2ure
Capt3ure
As the screenshot shows, it goes from line 218 to 220 and does not go in.

At this position, I would like to know if there are any locks in your functions that prevent another app or program from subscribing to the same service? Thank you.

Best regards,
Shuoheng

@adabru
Copy link
Owner

adabru commented Jan 24, 2024

Are you using both dll's simultaneously? Do you get an exception? If not, maybe the service has zero characteristics?

I had problems on getting a BLEDevice or Service multiple times from Windows and had to cache them in BleWinrtDll.cpp. Maybe caching the device/services will help?

@ShuohengZhang
Copy link
Author

Yes I'm using them simultaneously, and I got no exception. I think ur right, the second dll subscribed to the service but has no characteristics to find and subscribe ( like blocked by the other one).

Maybe I can try to cache them, but as I have seldom experience with build and test dlls, could you please explain with more detail so that I can have a try.

Thank you !

@adabru
Copy link
Owner

adabru commented Feb 2, 2024

In line 211, instead of calling device.GetGattServicesAsync()), can you store the service from step 3.1 in a variable and reuse that variable here?

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