Comments (6)
Hi @serramat , you could try the things mentioned in #20 (comment) .
from blewinrtdll.
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 ?
from blewinrtdll.
Hi @ShuohengZhang ,
it's good that your UWP application works. The dll in this repository is a c++ winrt wrapper for UWP code so the step from your UWP app to the dll should be small.
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
https://github.com/microsoft/Windows-universal-samples/blob/main/Samples/BluetoothLE/cppwinrt/Scenario2_Client.cpp
and
https://github.com/microsoft/Windows-universal-samples/blob/main/Samples/BluetoothLE/cs/Scenario2_Client.xaml.cs
Those are functionally the same.
from blewinrtdll.
Hi @adabru,
Thanks for your reply!! And yeah, I was a bit afraid to write a C++ DLL by myself because I don't really understand the C++ codes that well. However, I tried it with your suggestions today and looked into your codes and the samples I made (Dll_BLE.cpp). When I import this DLL into the Unity project, there is a DllNotFoundException when I already put it in the same folder as your BLEWinrtDll (I assume when this DLL can be used, so should mine). I would so appreciate hearing your suggestions!!
Best regards!
from blewinrtdll.
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.
from blewinrtdll.
@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 !
from blewinrtdll.
Related Issues (20)
- Connecting and Subscribing to heart sensor HOT 3
- Unable to write attribute HOT 5
- Suddenly unable to subscribe to notifications from and write to characteristic HOT 1
- Communication with Dongle
- Laptop BLE no issue Resolving Characteristics, Desktop has issues... HOT 2
- Problems connecting two devices at the same time. HOT 1
- BleScan.Impl.PollData make my Unity crashed. HOT 2
- The ValueChanged function runs at irregular intervals. HOT 1
- Does BleWinrtDll provide API for pairing with passkey? HOT 4
- again: BleWinrtDll.cpp:501 SubscribeCharacteristicAsync catch: The attribute cannot be written. HOT 6
- Write to device problem HOT 2
- Error subscribing to Characteristic HOT 3
- Hololens 2 unable to connect to Microbit HOT 9
- 直接连接 Direct connection HOT 1
- Device Filtering by Service HOT 1
- Connect 2 DLLs to one BLE IndoorBike
- Connect 2 DLLs to one BLE IndoorBike HOT 3
- Microbit Bluetooth UART service data reading problem HOT 2
- Read issue after polling characteristics HOT 3
- Can't write the correct values HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blewinrtdll.