Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release for the Bt Smart branch #3

Closed
emanuelstanciu opened this issue Mar 23, 2016 · 84 comments
Closed

release for the Bt Smart branch #3

emanuelstanciu opened this issue Mar 23, 2016 · 84 comments

Comments

@emanuelstanciu
Copy link

Any chance you can generate a build for the BT Smart branch?
I have a device and would love to test it out. Thanks.

@uwburn
Copy link
Owner

uwburn commented Mar 27, 2016

ATM i'm away from home, i can upload the build when i get back home.
Anyway, i would be surprised to see that it works on first try.

@emanuelstanciu
Copy link
Author

@uwburn Thanks Michele, I look forward to hear from you once you're back.
Even if it doesn't we can try and fix it if it doesn't :)

@emanuelstanciu
Copy link
Author

@uwburn Hi again, any news on this one? Apologies if you are still away, but just wanted to kindly remind you if it's possible

@uwburn
Copy link
Owner

uwburn commented Apr 12, 2016

@Ariestar I just uploaded a preview release: BT-Smart-pre.1.

You should use a device recognized as a HRM profile and connect it before executing Cardia, otherwise it will not be recognized. In the device menu you should select Bluetooth Smart HRP and then open the Device->Configuration panel where your device should be listed. If it shows up we're half done. Then you should just hit the start button and see if it reads.

In the meantime, i bought a cheap BT Smart HRM on eBay but was crappy... that was not working at all, not even with some fitness apps on the phone, i'm waiting for the substitution, i hope to have more luck with it.

@emanuelstanciu
Copy link
Author

@uwburn thanks for making that available. I have another problem before I can confirm on the status of the ones you mentioned.
The sensor is recognised by my Windows 10 tablet, however the app doesn't start. I tried it with admin rights and various compatibility modes, it simply doesn't start..
There are no log files as far as I can see.. I can only test on that tablet as it has BLE and the supported drivers. Please advise if we can do anything about it. Thanks

@uwburn
Copy link
Owner

uwburn commented Apr 13, 2016

@Ariestar what kind of tablet is that? Is it x86 based?
If you try the 1.0 release, does it open up?

@emanuelstanciu
Copy link
Author

@uwburn it's an Intel tablet running win10 x64. The 1.0 release runs fine.

@uwburn
Copy link
Owner

uwburn commented Apr 17, 2016

I'm afraid that's caused by how the libraries for accessing the BT Smart are referenced. Unfortunately that's hackish, and probably it's looking for the libraries for my system localization (italian), as on my office PC (that's also italian) it's working ok.

I will try to make it independent, maybe copying the required DLLs in the cardia.exe folder will do the trick.

@uwburn
Copy link
Owner

uwburn commented Apr 17, 2016

Can you check out if on your system the folder "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5.1" is present?

If so, are the following files present?

  • System.Runtime.dll
  • System.Runtime.InteropServices.WindowsRuntime.dll
  • System.Runtime.WindowsRuntime.dll
  • System.Threading.dll
  • System.Threading.Tasks.dll

@h4pppy
Copy link

h4pppy commented Jun 5, 2016

I have the same problem as ariestar. I got a desktop pc with Windows 10, which runs Cardia just fine, but has no bluetooth. And my Surface Pro 4 which won't even start Cardia. I have no idea of programming, but I have a Polar H7 HRM and a lot of spare time this weekend, but I didn't come far.

I installed Visual Studio and tried to find all prerequisites for compiling Cardia. Took a little (seems that on a surface there are some core components missing), but eventually I got it running. But as soon as I launch it, it throws a "System.InvalidOperationException" at
"BtSmartDevices = task.GetResults();" in Cardia.cs
If I put a "System.Threading.Thread.Sleep(10000);" right before that, Cardia comes up :)
(Yeah, I got some really basic programming skills from way back in time smile)
Seems that task.GetResults is called before task is filled by FindAllAsync, but I didn't understand the await / GetAwaiter / async stuff so that was my time to give up finding a fix.

If I connect and pair my Polar H7 before I start Cardia, I get a "System.NullReferenceException" at DeviceInformation backup = Device; at BtHrp.cs

Here are some ressources I found:
http://developer.polar.com/wiki/H6_and_H7_Heart_rate_sensors
https://code.msdn.microsoft.com/windowsapps/Bluetooth-Generic-5a99ef95

With the sample app, my heart rate monitor worked fine. I tried to implement there a network transmission of the heartrate via UDP sockets (and later add that to Cardia), but my basic programming skills were far from enough for that so I failed there, too.

Thank's for your great piece of software so far and for making it open source. I hope I was able to help a little and I really hope you don't loose interest in that project. Is there any way to donate for it? Maybe an Amazon wishlist with a Polar H7 on it? ;-) If you implement it and are willing to add another small feature for me, I would be glad to donate one for you :)

@uwburn
Copy link
Owner

uwburn commented Jun 5, 2016

Thanks for the feedback! Just to be sure: after installing Visual Studio on the Surface, you were able to run Cardia BT-Smart-pre.1 on it?

Moving to the experiments: i would recommend you to stay away from the UDP routing, i mean, it's a nice idea, but it's overcomplicated and once again device specific.

As for the await/async, some of the methods used in there are asynchronous, that means normally, when you invoke them, you have to pass as a parameter a callback method that will deal with their result when they complete their task. As this concept tends to break the "normal" programming style (thing happenings one after another, follwoing the flow of the instructions) you can use the await keyword to "resync" the asynchronous call, making it return the result as a normal method. That's nice, but there's a price to pay: the methods where you use await have to be async as well, so that's basically moving the start of the asynchronous execution up in the stack. That's the basic idea if you wanna try to mess again with it, there are some further details specific to C#/.NET i might not be remembering.

Anyway, i'm wtill waiting for the replacement of my HRM to ship... if it's lost or it doesn't work as the previous one, i will open a wishlist for donations.

@h4pppy
Copy link

h4pppy commented Jun 6, 2016

No, I just installed Visual Studio to see, why it is failing. It was the "System.InvalidOperationException" at
"BtSmartDevices = task.GetResults();" As soon as I delay this line for 10 seconds, it at least starts :)

@h4pppy
Copy link

h4pppy commented Jun 8, 2016

A friend of mine helped me to get it running. No serious programming, just a quick and dirty solution for my usecase (Polar H7 via Bluetooth). I don't even have to send you the code because it almost just worked. I put here and there a second sleep in to dirty, really dirty, fix some async tasks (like the one mentioned above). And there was a ProcessPackets() missing, I think. And some List casts to Devicelists I didn't understand (I just commented them out and assumed that there is just one device in the system.). Everything else worked out of the box. Thank you again for that. Really great project.
I'm not familiar with github, so I don't know how to upload code here (but I think no one should see my bad fixes anyway), but if you want it, just let me know how to send it to you :)

@kampklar
Copy link

Any posibillity someone can upload this?

@Funkiekitty
Copy link

How is the program going?

This was referenced Jun 20, 2017
@uwburn
Copy link
Owner

uwburn commented Jun 20, 2017

Quick update: thanks to donations, i just bought a Polar H7 and i'm awaiting the shipping. I hope to finally nail the BT Smart support down.

@kampklar
Copy link

Awesome stuff.

@uwburn
Copy link
Owner

uwburn commented Jun 24, 2017

Please check out BT-Smart-pre.2, it should allow BT Smart to work on Windows 8.1 and later.

Please keep in mind that BT Smart devices support on regular Windows Desktop is hacky to say the least (unless something changed with Windows 10, but i have not find anything in that regard).
So, be sure of:

  • Pair your device before starting Cardia
  • Select Bluetooth Smart HRP in Device menu
  • Check that in Device -> Configuration your device name appear as selected in the dropdown menu
  • If it times out when starting, TRY AGAIN: i don't know why with my Polar H7 sometimes it starts, sometimes it needs several retries

Please note that this version will not start up on Windows 7, and i'm unsure if Windows 7 support has to be dropped in Bluetooth Smart version.

If someone can provide feedback it would be appreciated!

@Tristay
Copy link

Tristay commented Jun 24, 2017

Just downloaded it now and it now runs when you have a device connected although it still refuses to start... Am I that dead inside? haha

@uwburn
Copy link
Owner

uwburn commented Jun 25, 2017

By refuse to start you mean that you hit Start button, the chart starts running and you have no reading until it stops, timing out?

Can you please list:

@uwburn
Copy link
Owner

uwburn commented Jun 25, 2017

Uploaded BT-Smart-pre.3, i restructured a little Start/Stop logic and added a few options. On Polar H7 i had no more issues starting the devices, yet the reasons behind it are not clear.

I also added two options:

  • Characteristic Index: if your devices has several characteristics, changing the index may allow it to work; usually value 0 is fine, if you insert a value not supported by your device it will fail to start immediatly.
  • InitDelay: a delay applied before certain start phase instructions, adding a delay seems to help out (as above i don't know why...).

@Tristay
Copy link

Tristay commented Jun 25, 2017

I would push start and it would just hang on starting with no timeout. I just downloaded the BT-Smart-pre 3 and it actually comes up with Bluetooth device is not transmitting this time although, it seems to pick up on my iPhone so i'm not sure what's going off here.

OS - Windows 10
HRM im using is called a CooSpo
Adapter type is Microsoft.

Hopefully this information helps.

@uwburn
Copy link
Owner

uwburn commented Jun 26, 2017

When you hit start and it hangs, you also cannot move the window and open the menus? Is the UI freezed?

BTW, what is the OS language?

@Tristay
Copy link

Tristay commented Jun 26, 2017

It doesn't freeze I can move everything about but it comes up with "Bluetooth HRP device not transmitting" after about 20-30 secs.
The OS language is ENG (United Kingdom)

@uwburn
Copy link
Owner

uwburn commented Jun 26, 2017

Sorry, hangs sounded to me like a freeze, "Bluetooth HRP device not transmitting" after 30 seconds is the starting timeout.

If you haven't already tried, you can play with the Characteristic Index and Init Delay. In the next few day i will try to put some logging instruction down the code.

@uwburn
Copy link
Owner

uwburn commented Jul 1, 2017

Uploaded BT-Smart-pre.4, including logging to help track down comm issues. When you run it, it will create a log directory with a log file for each day you use it. Please include the logs contents in case of problems reports.

@Tristay
Copy link

Tristay commented Jul 1, 2017

Here is the log from a first time run of the new release:
2017-07-01 23:59:18,459 [1] INFO MGT.Cardia.Program - Starting Cardia
2017-07-01 23:59:27,705 [1] DEBUG MGT.HRM.HRP.BtHrp - Starting HRP
2017-07-01 23:59:27,723 [7] DEBUG MGT.HRM.HRP.BtHrp - Getting GattDeviceService heart rate sensorwith id \?\BTHLEDevice#{0000180d-0000-1000-8000-00805f9b34fb}_f0c77fe841ad#8&16443534&4&0010#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
2017-07-01 23:59:57,846 [6] DEBUG MGT.HRM.HRP.BtHrp - Communication timeout elapsed
2017-07-01 23:59:57,847 [6] DEBUG MGT.HRM.HRP.BtHrp - Stopping HRP
2017-07-01 23:59:57,847 [6] DEBUG MGT.HRM.HRP.BtHrp - Stopping timeout timer
2017-07-01 23:59:57,848 [6] DEBUG MGT.HRM.HRP.BtHrp - Resetting counters

Hope this may help with my issues.

@uwburn
Copy link
Owner

uwburn commented Jan 14, 2018

Umh, can you try it out on Cardia directly? The test program is not really up to date.

In any case, be sure to check the association of the HRM in Windows Bluetooth devices panel, eventually try reassociating it.

@uwburn
Copy link
Owner

uwburn commented Jan 14, 2018

I have moved all BT Smart changes to master and released new versions, if someone is willing to carry out tests, please use v1.1 Main.

@Tristay
Copy link

Tristay commented Jan 14, 2018

Tested my HRM out on another computer and it still gets Device unreachable. New HRM will be ordered soon and i'll test it then ^^

@uwburn
Copy link
Owner

uwburn commented Jan 14, 2018

By any chance, do you have the logs?

I had feedback from another Polar HRM user that was working OK. Today, i strapped on mine to test the release: at first it connected fine, but was reading 0 (probably because was not fitted correctly/too dry), then it started to timeout or refuse to configure, then again it worked ok. Unfortunately, even with the debugger, i could not track down what was wrong when it refused to work: simply the API calls fail.

On my experience it works 3 times out of 4: when it doesn't start i poke around with the band (i'm never sure it's fitted properly) and then i reassociate the bluetooth device and restart Cardia. Also trying several times helps sometimes, as the bluetooth advertisement cycle is not continuous.

@Tristay
Copy link

Tristay commented Jan 14, 2018

2018-01-14 18:32:14,909 [1] INFO MGT.Cardia.Program - Starting Cardia
2018-01-14 18:32:23,623 [1] DEBUG MGT.HRM.HRP.BtHrp - Starting HRP
2018-01-14 18:32:23,644 [1] DEBUG MGT.HRM.HRP.BtHrp - Getting GattDeviceService heart rate sensor with id \?\BTHLEDevice#{0000180d-0000-1000-8000-00805f9b34fb}_f0c77fe841ad#8&2688b932&16&0010#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
2018-01-14 18:32:24,242 [1] DEBUG MGT.HRM.HRP.BtHrp - Getting HeartRateMeasurement GattCharacteristic 0
2018-01-14 18:32:24,254 [1] DEBUG MGT.HRM.HRP.BtHrp - Setting EncryptionRequired protection level on GattCharacteristic
2018-01-14 18:32:24,757 [1] DEBUG MGT.HRM.HRP.BtHrp - Registering event handler onction level on GattCharacteristic
2018-01-14 18:32:24,760 [1] DEBUG MGT.HRM.HRP.BtHrp - Reading GattCharacteristic configuration descriptor
2018-01-14 18:32:24,770 [1] DEBUG MGT.HRM.HRP.BtHrp - Setting GattCharacteristic configuration descriptor to enable notifications
2018-01-14 18:32:32,482 [1] DEBUG MGT.HRM.HRP.BtHrp - Device unreachable
2018-01-14 18:32:32,486 [1] DEBUG MGT.HRM.HRP.BtHrp - Registering device connection watcher updated event handler
2018-01-14 18:32:32,487 [1] DEBUG MGT.HRM.HRP.BtHrp - Starting device connection watcher
2018-01-14 18:32:53,753 [9] DEBUG MGT.HRM.HRP.BtHrp - Communication timeout elapsed
2018-01-14 18:32:53,755 [9] DEBUG MGT.HRM.HRP.BtHrp - Stopping HRP
2018-01-14 18:32:53,756 [9] DEBUG MGT.HRM.HRP.BtHrp - Stopping timeout timer
2018-01-14 18:32:53,756 [9] DEBUG MGT.HRM.HRP.BtHrp - Clearing GattCharacteristic
2018-01-14 18:32:53,758 [9] DEBUG MGT.HRM.HRP.BtHrp - Clearing device changed watcher
2018-01-14 18:32:53,759 [9] DEBUG MGT.HRM.HRP.BtHrp - Clearing GattDeviceService
2018-01-14 18:32:53,763 [9] DEBUG MGT.HRM.HRP.BtHrp - Resetting counters

I sit here for atleast 15-20 minutes fiddling round with the strap/re-pairing the device to still not avail.

@uwburn
Copy link
Owner

uwburn commented Jan 14, 2018

Compared to the log of the test program, the lines Device connection updated, args = Device connection updated, args = Windows.Devices.Enumeration.Pnp.PnpObjectUpdate are missing, i was hoping to see them here as well (i added other log info there).

Do you still get thoose lines in the test program? If so that would be an hint to see what are the differences.

@Tristay
Copy link

Tristay commented Jan 14, 2018

Getting GattDeviceService heart rate sensor with id \?\BTHLEDevice#{0000180d-0000-1000-8000-00805f9b34fb}_f0c77fe841ad#8&2688b932&19&0010#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
Getting HeartRateMeasurement GattCharacteristic 0
Setting EncryptionRequired protection level on GattCharacteristic
Registering event handler onction level on GattCharacteristic
Reading GattCharacteristic configuration descriptor
Setting GattCharacteristic configuration descriptor to enable notifications
Device unreachable
Registering device connection watcher updated event handler
Starting device connection watcher

Not getting the same as before now :( It's really temperamental it seems.

@dejv997
Copy link

dejv997 commented Jun 9, 2020

Hello, i hope you can help me. I just bought some cheap BT senson from aliexpress, it should be some "KYTO 2809". I paired it with my Win10 laptop with built in bluetooth, downloaded Cardia, the app founded my HRM, but no data are sent to the app.. I tried it with my phone, and several apps had no problem, always showed me my heart rate. Can you help me? Is there something i should enable in Windows?

Here's log:
2020-06-09 18:33:14,429 [1] INFO MGT.Cardia.Program - Starting Cardia
2020-06-09 18:33:14,608 [1] DEBUG MGT.Cardia.BtHrpBundle - Retrieving heart rate capable devices
2020-06-09 18:33:14,665 [1] DEBUG MGT.Cardia.BtHrpBundle - Attempting to retrieve async result...
2020-06-09 18:33:14,780 [1] DEBUG MGT.Cardia.BtHrpBundle - Found 1 heart rate capable deices
2020-06-09 18:33:14,794 [1] DEBUG MGT.Cardia.BtHrpBundle - 2809_3F9D82: id = \?\BTHLEDevice#{0000180d-0000-1000-8000-00805f9b34fb}_e7ef243f9d82#8&28b25868&3&000c#{6e3bb679-4372-40c8-9eaa-4509df260cd8}, default = False, enabled = True, paired = False
2020-06-09 18:33:20,680 [1] DEBUG MGT.HRM.HRP.BtHrp - Starting HRP
2020-06-09 18:33:20,688 [1] DEBUG MGT.HRM.HRP.BtHrp - Getting GattDeviceService 2809_3F9D82 with id \?\BTHLEDevice#{0000180d-0000-1000-8000-00805f9b34fb}_e7ef243f9d82#8&28b25868&3&000c#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
2020-06-09 18:33:21,338 [1] DEBUG MGT.HRM.HRP.BtHrp - GattDeviceService instatiated successfully
2020-06-09 18:33:21,344 [1] DEBUG MGT.HRM.HRP.BtHrp - GattSession status = Closed, mantain connection = False, can mantain connection = False
2020-06-09 18:33:21,345 [1] DEBUG MGT.HRM.HRP.BtHrp - Getting all GattCharacteristic...
2020-06-09 18:33:21,372 [1] DEBUG MGT.HRM.HRP.BtHrp - GattCharacteristicsResult status Success
2020-06-09 18:33:21,372 [1] DEBUG MGT.HRM.HRP.BtHrp - GattCharacteristic 00002a37-0000-1000-8000-00805f9b34fb: description = , protection level = Plain
2020-06-09 18:33:21,376 [1] DEBUG MGT.HRM.HRP.BtHrp - GattCharacteristic 00002a38-0000-1000-8000-00805f9b34fb: description = , protection level = Plain
2020-06-09 18:33:21,377 [1] DEBUG MGT.HRM.HRP.BtHrp - Getting HeartRateMeasurement GattCharacteristic 0
2020-06-09 18:33:21,382 [1] DEBUG MGT.HRM.HRP.BtHrp - GattCharacteristicsResult status Success
2020-06-09 18:33:21,384 [1] DEBUG MGT.HRM.HRP.BtHrp - GattCharacteristic 00002a37-0000-1000-8000-00805f9b34fb: description = , protection level = Plain
2020-06-09 18:33:21,385 [1] DEBUG MGT.HRM.HRP.BtHrp - Setting EncryptionRequired protection level on GattCharacteristic
2020-06-09 18:33:21,903 [1] DEBUG MGT.HRM.HRP.BtHrp - Registering event handler onction level on GattCharacteristic
2020-06-09 18:33:21,904 [1] DEBUG MGT.HRM.HRP.BtHrp - Reading GattCharacteristic configuration descriptor
2020-06-09 18:33:21,921 [1] DEBUG MGT.HRM.HRP.BtHrp - Setting GattCharacteristic configuration descriptor to enable notifications
2020-06-09 18:33:22,187 [1] DEBUG MGT.HRM.HRP.BtHrp - Device unreachable
2020-06-09 18:33:22,187 [1] DEBUG MGT.HRM.HRP.BtHrp - Registering device connection watcher updated event handler
2020-06-09 18:33:22,187 [1] DEBUG MGT.HRM.HRP.BtHrp - Starting device connection watcher
2020-06-09 18:33:51,126 [6] DEBUG MGT.HRM.HRP.BtHrp - Communication timeout elapsed
2020-06-09 18:33:51,129 [6] DEBUG MGT.HRM.HRP.BtHrp - Stopping HRP
2020-06-09 18:33:51,129 [6] DEBUG MGT.HRM.HRP.BtHrp - Stopping timeout timer
2020-06-09 18:33:51,133 [6] DEBUG MGT.HRM.HRP.BtHrp - Clearing GattCharacteristic
2020-06-09 18:33:51,134 [6] DEBUG MGT.HRM.HRP.BtHrp - Clearing device changed watcher
2020-06-09 18:33:51,134 [6] DEBUG MGT.HRM.HRP.BtHrp - Clearing GattDeviceService
2020-06-09 18:33:51,147 [6] DEBUG MGT.HRM.HRP.BtHrp - Resetting counters

@uwburn
Copy link
Owner

uwburn commented Jun 9, 2020

Hello, beside trying again, i cannot suggest much more.
The only point raising any idea is the line from your logs:

2020-06-09 18:33:14,794 [1] DEBUG MGT.Cardia.BtHrpBundle - 2809_3F9D82: id = \?\BTHLEDevice#{0000180d-0000-1000-8000-00805f9b34fb}_e7ef243f9d82#8&28b25868&3&000c#{6e3bb679-4372-40c8-9eaa-4509df260cd8}, default = False, enabled = True, paired = False

If i recall correctly it should state paired = True, not false. Check that Windows states that your device is paired and remove pairing with any other device (e.g. your phone)

Also try with setting the Characteristic index in Device > Configuration to either 0 (wich is default) or 1, as your device seems to expose two values.

Anyway, ss was already mentioned in the discussion, Windows support for BT Smart devices in Winform (the framework used for Cardia GUI) is not official and seems to not always work properly, even if the code was ported pretty much from MS examples.

@dejv997
Copy link

dejv997 commented Jun 10, 2020

I double checked everything in Windows, in bluetooth settings it says it's paired, in Control Panel looks everything alright.. I've tried change Configuration to 1, but it wasnt working at all, when it was 0, after I pressed "Start", Cardia waited 10 seconds, and then said, that HRM is not transmitting any data.. Maybe it's indeed the Winform framework, after some googling, i've discovered another heart rate app from github (https://github.com/jlennox/HeartRate), which is working. Right after i open the app, it shows my heart rate. The app is a bit simpler, it's a shame, that it hasnt so many functions like your app, but it works in my case.. But anyway, thanks for your help :)

@uwburn
Copy link
Owner

uwburn commented Jun 10, 2020

Thanks for pointing me out the other project. I will take a look at it sooner or later, i will try to compare the implementation and see if i can finally fix this.

@timbeaudet
Copy link

timbeaudet commented Jun 19, 2020

I can confirm HeartRate app mentioned in @dejv997's comment is working though with the Zephyr HMX I see "No serial port found" in the status bar, I am unable to press "Configuration" or "Start" unless I use Emulator. I am not sure if it is the same problem as being discussed since there was no mention of serial port not found in this thread.
In the debug log I can see

2020-06-19 12:35:02,632 [1] DEBUG MGT.Cardia.BtHrpBundle - Retrieving heart rate capable devices
2020-06-19 12:35:02,647 [1] DEBUG MGT.Cardia.BtHrpBundle - Attempting to retrieve async result...
2020-06-19 12:35:02,748 [1] DEBUG MGT.Cardia.BtHrpBundle - Found 1 heart rate capable deices
2020-06-19 12:35:02,750 [1] DEBUG MGT.Cardia.BtHrpBundle - Zephyr HXM200016027: id = \\?\BTHLEDevice#{0000180d-0000-1000-8000-00805f9b34fb}_Dev_VID&01000d_PID&0000_REV&0110_f45eab09c4e2#8&119521df&0&0010#{6e3bb679-4372-40c8-9eaa-4509df260cd8}, default = False, enabled = True,  paired = False

So the device is detected.

Huh. After just clicking through all the available devices I found that Bluetooth Smart HRP worked for me... I wonder if that was related to the comment about being compatible with more BT devices on a more generic level?

@uwburn
Copy link
Owner

uwburn commented Jun 21, 2020

Hello, as you figured out, your device is BT HRP compliant. Two Zephyr HxM version exists, an older one that required serial port emulation and a new one that use the generic HRP.

Happy to see it worked, have fun!

@Tristay
Copy link

Tristay commented Sep 22, 2020

It's been a while since I've tried this app and since the release of the newer windows apps I thought i'd give it another bash.

This time round it seems to give me a bit more information than previous attempts:

2020-09-22 20:36:26,548 [1] DEBUG MGT.HRM.HRP.BtHrp - Starting HRP
2020-09-22 20:36:26,548 [1] DEBUG MGT.HRM.HRP.BtHrp - Getting GattDeviceService heart rate sensor with id \?\BTHLEDevice#{0000180d-0000-1000-8000-00805f9b34fb}_f0c77fe841ad#9&15ac7dc8&1&0010#{6e3bb679-4372-40c8-9eaa-4509df260cd8}
2020-09-22 20:36:28,616 [1] DEBUG MGT.HRM.HRP.BtHrp - GattDeviceService instatiated successfully
2020-09-22 20:36:28,617 [1] DEBUG MGT.HRM.HRP.BtHrp - GattSession status = Closed, mantain connection = False, can mantain connection = False
2020-09-22 20:36:28,617 [1] DEBUG MGT.HRM.HRP.BtHrp - Getting all GattCharacteristic...
2020-09-22 20:36:28,623 [1] DEBUG MGT.HRM.HRP.BtHrp - GattCharacteristicsResult status Success
2020-09-22 20:36:28,623 [1] DEBUG MGT.HRM.HRP.BtHrp - GattCharacteristic 00002a37-0000-1000-8000-00805f9b34fb: description = , protection level = Plain
2020-09-22 20:36:28,624 [1] DEBUG MGT.HRM.HRP.BtHrp - GattCharacteristic 00002a38-0000-1000-8000-00805f9b34fb: description = , protection level = Plain
2020-09-22 20:36:28,624 [1] DEBUG MGT.HRM.HRP.BtHrp - GattCharacteristic 00002a39-0000-1000-8000-00805f9b34fb: description = , protection level = Plain
2020-09-22 20:36:28,624 [1] DEBUG MGT.HRM.HRP.BtHrp - Getting HeartRateMeasurement GattCharacteristic 0
2020-09-22 20:36:28,625 [1] DEBUG MGT.HRM.HRP.BtHrp - GattCharacteristicsResult status Success
2020-09-22 20:36:28,625 [1] DEBUG MGT.HRM.HRP.BtHrp - GattCharacteristic 00002a37-0000-1000-8000-00805f9b34fb: description = , protection level = Plain
2020-09-22 20:36:28,626 [1] DEBUG MGT.HRM.HRP.BtHrp - Setting EncryptionRequired protection level on GattCharacteristic
2020-09-22 20:36:30,638 [1] DEBUG MGT.HRM.HRP.BtHrp - Registering event handler onction level on GattCharacteristic
2020-09-22 20:36:30,638 [1] DEBUG MGT.HRM.HRP.BtHrp - Reading GattCharacteristic configuration descriptor
2020-09-22 20:36:30,640 [1] DEBUG MGT.HRM.HRP.BtHrp - Setting GattCharacteristic configuration descriptor to enable notifications
2020-09-22 20:36:38,341 [1] DEBUG MGT.HRM.HRP.BtHrp - Device unreachable
2020-09-22 20:36:38,342 [1] DEBUG MGT.HRM.HRP.BtHrp - Registering device connection watcher updated event handler
2020-09-22 20:36:38,342 [1] DEBUG MGT.HRM.HRP.BtHrp - Starting device connection watcher
2020-09-22 20:36:56,711 [6] DEBUG MGT.HRM.HRP.BtHrp - Communication timeout elapsed

Saw that it outputs 3 different characteristics now and tried changing them in the program with no avail still. By this time I could of just invested into a Polar H7 and be done with it haha.

Hope all is well!

@MrSicXit
Copy link

Using CooSpo at the moment I get 'Bluetooth HRP device not transmitting'
cardia_2021-03-17.log

@Brieux
Copy link

Brieux commented Feb 3, 2022

Is anyone tried to use MZ3 from myZone and does it work ? would like to use this as a video game feature

@effgenesis
Copy link

effgenesis commented Jul 21, 2022

Tested on CooSpoo H808S. Program gets heartbeat when I connect first time, but fails with [Bluetooth HRP device not transmitting] every other time even after pc reboot. After I connect pulse monitor through other software it will work again - once. The reason is HRM\HRP\BtHrp.cs:204. When Cardia does this command everithing works OK. But it always skips this part because of contitional. I placed it outside and it works now. Here is working (first part) and not working (second part) log.
cardia_2022-07-22.log
.

@uwburn
Copy link
Owner

uwburn commented Jul 22, 2022

@effgenesis, can you show me the edited file? Did you just remove the conditional?

Lines 204-217 in the conditional are there just for logging, sounds strange that they really make a difference. it's been a long time, i don't recall if the release EXE was built with debug enabled or not, so i'm not sure this is really the culprit.

Thanks for the interest, btw.

@effgenesis
Copy link

effgenesis commented Jul 22, 2022

Sorry, i'm stupid. Wrong line. it's this command: GattCommunicationStatus status =
await characteristic.WriteClientCharacteristicConfigurationDescriptorAsync(
CHARACTERISTIC_NOTIFICATION_TYPE);
Here is BtHrp.cs:
BtHrp.txt
Cool project btw. I like it.

@uwburn
Copy link
Owner

uwburn commented Aug 3, 2022

@effgenesis, i see, changes make sense, probably there are some devices where using the cached values ends up not working.

I finally had the chance to fire up VS again and luckily my Polar still works ok: i made some changes to reflect your initialization sequence and published a new draft release (related branch is bthrpfix). For what it counts on the Polar it worked ok on first try.

If you have time to test it out let me know if it works... it would be really nice to fix this issues after such a long time!

@kikosgc
Copy link

kikosgc commented Sep 11, 2022

Got it to work easily with BT:
Windows 10 21H2
Magene H64

@Paxy
Copy link

Paxy commented Dec 6, 2022

Works OK with cheap Chinese BLE HRM presented in Windows as "heart rate sensor".

@uwburn
Copy link
Owner

uwburn commented Dec 6, 2022

Thanks for feedback!

@uwburn
Copy link
Owner

uwburn commented Dec 18, 2022

Closed, as the new version seems to fix this definitely.

@uwburn uwburn closed this as completed Dec 18, 2022
@CirqueAlvis
Copy link

CirqueAlvis commented Apr 17, 2023

I still get the [Bluetooth HRP device not transmitting] on my XOSS X2 (version used: v1.2.0.1_Main; log files still show "paired = False"), but the possible root cause may have been found now and it might be the device packet initialization process. I launched Cardia and set it aside in the background, then launched the mentioned HeartRate app and exited then quickly started Cardia, it worked and it didn't get the [Bluetooth HRP device not transmitting] error. Starting Cardia without launching and closing the HeartRate app, Cardia had the error again, so it made me think that it may be the device packet initialization process; it's more of an assumption that that's the issue as I lack understanding and skill in coding, but hopefully with this demonstration it would be the real cause and be fixed.

Here's the video demonstration:
cardiaDataTransmissionIssue

Here's the log file:
cardia_2023-04-17.log

@ukusann
Copy link

ukusann commented Apr 18, 2024

My Polar H10 worked after a long trouble... I had to enable all devices in my bluetooth configuration (I'm running on Windows 11 btw), then I had to keep trying to connect with my Polar Band with no sucess, then suddenly it connected (?) and, as the instructions says, the Cardia was able to identify and display the data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests