adabru / BleWinrtDll

BLE for Unity 3d in Windows without UWP.
Do What The F*ck You Want To Public License
168 stars 52 forks source link

Error subscribing to Characteristic #58

Open arafi123 opened 8 months ago

arafi123 commented 8 months ago

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

adabru commented 8 months ago

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

arafi123 commented 8 months ago

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.

adabru commented 7 months ago

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.