BleWinrtDll icon indicating copy to clipboard operation
BleWinrtDll copied to clipboard

Connecting and Subscribing to heart sensor

Open 99bits opened this issue 2 years ago • 3 comments

Thank you for this really amazing project.
I have a heart sensor and it connects fine and the Scan services and Scan characteristic seems to populate fine. When I try to subscribe to the sensor, the editor completely hangs. I also built the app and tested it. It also hanged when trying to subscribe to the data.
Correct Heart Service

The heart rate service is 0x180D 0x2A37 is the UUID for the Heart Rate Measurement characteristic

Other information:
Unity 2022.2.13f1 Built for windows 10 standalone, not UWP

Do you know what I am missing.

Thank you in advance.

99bits avatar Apr 04 '23 14:04 99bits

I have no clue. You can try this out: https://docs.microsoft.com/en-us/samples/microsoft/windows-universal-samples/bluetoothle/ and report whether that works for the heart rate measurement subscription.

adabru avatar Apr 09 '23 19:04 adabru

Hey, I am new to BLE programming and was just checking out the issues. I did notice that in this screenshot the devices appear dozens of times again and again. When I was checking out your BleWinRRDll example project I had the same "problem". I was wondering if this is normal or how I can avoid this. Thanks!

lazerbots avatar Jul 13 '24 13:07 lazerbots

Thanks @lazerbots for the remark! You're right, the lines https://github.com/adabru/BleWinrtDll/blob/03b4dcf71a4152958074b90cb5459cf575456bb7/BleWinrtDll%20Unity/Assets/Scenes/Demo.cs#L67-L74 don't check whether the device was there before. That's a bug. If the device sends multiple updates and has IsConnectable to true on some of them, it will be listed multiple times.

I don't know if that could have something to do with the hanging.

adabru avatar Jul 14 '24 18:07 adabru