-
Notifications
You must be signed in to change notification settings - Fork 54
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
Disconnected peripherals, Reading specific characteristics. #6
Comments
Hi @Quget, checking the connection status and requesting a value from the device is not implemented as I didn't had the need for that yet. For the connection status, I guess you can try using a GattSession with Reading/Requesting a specific characteristic value from the device can be done with the ReadValueAsync function . You can use the code of |
Thanks for the quick reply! I did try to go trough the source code. |
You can checkout the Microsoft sample (C# and equivalent C++ code) as reference for ReadValueAsync. In my case I first got it to work in C# UWP, then in a C++ winrt console program and then in the dll. If you'll have specific questions regarding the code, feel free to ask. |
I think I manage to get the read one in. Just got to test it out. Connection status will be a bit of a problem but I will get there I think :) |
As reference for reading specific characteristics: tufeixp's ReadDataAsync function: #30 (comment) SendData code as comparison if you want to add error handling or blocking read: BleWinrtDll/BleWinrtDll/BleWinrtDll.cpp Lines 528 to 561 in f2635b7
|
Hello!
I started using this library today in my Unity Project, seems nice to use so far.
I am able to scan, connect(trough 'polling' services), subscribe and write to specific characteristics 👍
But I did end up with 2 problems.
I can't figure out how to see if my peripheral got disconnected.
This is quite handy to know if I want to automaticly reconnect to the device.
I also can't figure out how to read a specific characteristic.
The text was updated successfully, but these errors were encountered: