Closed sheeets closed 3 years ago
Thanks for the feedback! Back when I developed the script, it was mainly tested with my Polar H7 and the (hardcoded) timeout values were set accordingly. Pull requests for supporting more devices are always welcomed.
I have used this with Polar H10 successfully; the pairing seems to work very smoothly on a Lenovo Thinkpad running an Ubuntu 18.04 variant. I had to update the script to support Python3. You can see my fork in https://github.com/whacked/BLEHeartRateLogger. Let me know if you'd want to merge back.
Pull requests are always welcome.
This may be related to the bluetooth adapter in the device I am using, but I was unable to get your script to function for the Polar H10 until I changed the timeout from
10
seconds to30
seconds under main for determining the heart rate handle. This is most likely due to the fact that runningchar-desc
for the H10 takes significantly longer than if I didchar-desc 0x000e 0x0013
based on runningprimary
and determining the handle group that corresponds to the heart rate sensor.This may even be a better implementation to support more devices. If I make the change myself I will send a pull request, but food for thought.