-
Notifications
You must be signed in to change notification settings - Fork 53
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
Write to FTMS Device #26
Comments
Hi @serramat , you could try the things mentioned in #20 (comment) . |
Hi adabru, thanks for your great work on this BLE.dll! By the way I have the similar problem as @serramat had. The whole DLL worked very well since I use it, and since October the write value is down. There's no errors but only the FTMS indoorbike doesn't react to the value it received. Specifically I want to change 2 Bytes ('0x11, 0x00, 0x00, Byte1, Byte2, 0x00, 0x00'). I tried changing GattWriteOption::WriteWithoutResponse to GattWriteOption::WriteWithResponse at https://github.com/adabru/BleWinrtDll/blob/main/BleWinrtDll/BleWinrtDll.cpp#L536 . , this doesn't work in my case, but I tried with nRF Connect on iOS system. Where I write '110000DC050000' would make the FTMS indoorbike change its inclination grade to '15' correctly. I even wrote a UWP application to test the function, and surprisingly it works. But as I use the UWP specific API, I cannot make it into a dll and import to Unity. And I'm stucking to this problem for a month but I still cannot figure out where's the problem. Could u please help me out ? |
Hi @ShuohengZhang , You can compare the UWP function calls from https://github.com/adabru/BleWinrtDll/blob/main/BleWinrtDll/BleWinrtDll.cpp with your UWP app. If your UWP app uses another API-call, you can change that in BleWinrtDll.cpp. Or you can change the API-call in your UWP app to the same as in BleWinrtDll.cpp. As reference for converting UWP code to c++ winrt and vice versa, you can use |
Hi @adabru, Best regards! |
I'm not quite sure what the reason for the DllNotFoundException is. You can try to look at Unity's import settings for that file. You can also try to change the 32-bit or 64-bit setting in VS. And maybe try to ask ChatGPT. Is your repository private? I can't access the link. |
@adabru sorry I didn’t notice that was private now u may have the access. And thanks again that you still concern about my case ! |
Hi,
I am using your library to read the data from the BLE sensors and I was able to receive the information correctly.
Now I would also need to write data on some devices (such as assigning the friction to a roller). I am using the WritePackage but I can never write! I also tried your example but without any success.
To be precise I'm trying to write on the 00002ad9-0000-1000-8000-00805f9b34fb characteristics of the 00001826-0000-1000-8000-00805f9b34fb service
Thank you so much.
Matteo.
The text was updated successfully, but these errors were encountered: