-
Notifications
You must be signed in to change notification settings - Fork 23
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
Comments
ATM i'm away from home, i can upload the build when i get back home. |
@uwburn Thanks Michele, I look forward to hear from you once you're back. |
@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 |
@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. |
@uwburn thanks for making that available. I have another problem before I can confirm on the status of the ones you mentioned. |
@Ariestar what kind of tablet is that? Is it x86 based? |
@uwburn it's an Intel tablet running win10 x64. The 1.0 release runs fine. |
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. |
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?
|
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 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: 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 :) |
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. |
No, I just installed Visual Studio to see, why it is failing. It was the "System.InvalidOperationException" at |
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. |
Any posibillity someone can upload this? |
How is the program going? |
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. |
Awesome stuff. |
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).
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! |
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 |
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:
|
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:
|
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 Hopefully this information helps. |
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? |
It doesn't freeze I can move everything about but it comes up with "Bluetooth HRP device not transmitting" after about 20-30 secs. |
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. |
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. |
Here is the log from a first time run of the new release: Hope this may help with my issues. |
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. |
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. |
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 ^^ |
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. |
2018-01-14 18:32:14,909 [1] INFO MGT.Cardia.Program - Starting Cardia I sit here for atleast 15-20 minutes fiddling round with the strap/re-pairing the device to still not avail. |
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. |
Getting GattDeviceService heart rate sensor with id \?\BTHLEDevice#{0000180d-0000-1000-8000-00805f9b34fb}_f0c77fe841ad#8&2688b932&19&0010#{6e3bb679-4372-40c8-9eaa-4509df260cd8} Not getting the same as before now :( It's really temperamental it seems. |
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: |
Hello, beside trying again, i cannot suggest much more.
If i recall correctly it should state Also try with setting the 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. |
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 :) |
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. |
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.
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? |
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! |
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 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! |
Using CooSpo at the moment I get 'Bluetooth HRP device not transmitting' |
Is anyone tried to use MZ3 from myZone and does it work ? would like to use this as a video game feature |
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. |
@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. |
Sorry, i'm stupid. Wrong line. it's this command: GattCommunicationStatus status = |
@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! |
Got it to work easily with BT: |
Works OK with cheap Chinese BLE HRM presented in Windows as "heart rate sensor". |
Thanks for feedback! |
Closed, as the new version seems to fix this definitely. |
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: Here's the log file: |
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 |
Any chance you can generate a build for the BT Smart branch?
I have a device and would love to test it out. Thanks.
The text was updated successfully, but these errors were encountered: