again: BleWinrtDll.cpp:501 SubscribeCharacteristicAsync catch: The attribute cannot be written.
Hello: I was able to use the computer's Bluetooth LE Explorer tool to connect to my device and debug it. When I was running Blewinrtdell in unity I was able to search the device to find services and characteristics, but when I clicked subscribe I got the error warning above. Can you kindly give me some advice?
I find the reason why I can't debug. Every time I write a value, I only write the content to the characteristic 1,but I need to write the value to the characteristics 3. How can I solve this problem?
Hi @zhouyexi98, for investigation, you can download and run the Microsoft's Bluetooth Low Energy sample and see whether subscribing works there. If the demo works, it should be fixable in this repo.
Hi @adabru
I tested the Microsoft BLE sample and saw the data coming there for few characteristic but here I get for the same characteristic the same error that "the attribute cannot be written ". Could you please look into that ?
Thanks
Hi @arafi123,
do I understand you correctly: There is a characteristic that is consistently read from the Microsoft BLE sample without error but shows the error BleWinrtDll.cpp:501 SubscribeCharacteristicAsync catch: The attribute cannot be written everytime you try to subscribe to that characteristic from the BleWinrtDll demo scene?
Hi @adabru Yes you have understood it correctly.
The relevant line should be https://github.com/adabru/BleWinrtDll/blob/f2635b7b02432ea3006983657107f092c862171d/BleWinrtDll/BleWinrtDll.cpp#L486
You can compare it to the code in the Microsoft sample.