BleWinrtDll icon indicating copy to clipboard operation
BleWinrtDll copied to clipboard

again: BleWinrtDll.cpp:501 SubscribeCharacteristicAsync catch: The attribute cannot be written.

Open zhouyexi98 opened this issue 2 years ago • 6 comments

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?

zhouyexi98 avatar Oct 27 '23 11:10 zhouyexi98

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?

zhouyexi98 avatar Oct 27 '23 12:10 zhouyexi98

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.

adabru avatar Nov 08 '23 12:11 adabru

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

arafi123 avatar Dec 29 '23 13:12 arafi123

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?

adabru avatar Dec 31 '23 18:12 adabru

Hi @adabru Yes you have understood it correctly.

arafi123 avatar Jan 02 '24 08:01 arafi123

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.

adabru avatar Jan 07 '24 14:01 adabru