BleWinrtDll icon indicating copy to clipboard operation
BleWinrtDll copied to clipboard

直接连接 Direct connection

Open Styxxxxxxxx opened this issue 2 years ago • 1 comments

Hi, By using the demo scene you provided,I can subscribe my sensor's character and read the poll back data successfully.So i'm wondering if i get the service id and character id in advance,can i use SubscribeCharacteristic directly to get the data?Cause I don't know how the underlying layer of this DLL works

Styxxxxxxxx avatar Jan 12 '24 13:01 Styxxxxxxxx

Not sure. If I remember correctly I had problems doing that. But just try it out. If it doesn't work, you can do it like here:

https://github.com/adabru/BleWinrtDll/blob/f2635b7b02432ea3006983657107f092c862171d/DebugBle/Program.cs#L42-L50

and here:

https://github.com/adabru/BleWinrtDll/blob/f2635b7b02432ea3006983657107f092c862171d/DebugBle/BLE.cs#L192-L206

https://github.com/adabru/BleWinrtDll/blob/f2635b7b02432ea3006983657107f092c862171d/DebugBle/BLE.cs#L167-L179

adabru avatar Jan 12 '24 14:01 adabru