BleWinrtDll icon indicating copy to clipboard operation
BleWinrtDll copied to clipboard

Error subscribing to Characteristic

Open arafi123 opened this issue 2 years ago • 3 comments

Hello, I am trying to connect to BLE Weight scale (Service 0x181D). When I subscribe to characteristic , I get following error:

BleWinrtDll.cpp:501 SubscribeCharacteristicAsync catch: The attribute requires authentication before it can be read or written.

How can I fix this ? What needs to added as authentication parameter in code so that the data can be read from the device ?

I look forward to your support.

Kind regards

arafi123 avatar Dec 27 '23 13:12 arafi123

Hi @arafi123 , maybe you need to pair the device. Maybe related: https://github.com/adabru/BleWinrtDll/issues/7

adabru avatar Dec 31 '23 18:12 adabru

You mean pair it with PC ? For this BLE Weight scale, I get the same authentication error also with the Microsot BLE sample so I assume may be the device is encrypted or something.

arafi123 avatar Jan 02 '24 08:01 arafi123

Yes, I meant pairing it with the PC. Did you try that? I think you can do it via Windows Settings, I'm not sure.

adabru avatar Jan 07 '24 14:01 adabru