Hopefully, your heart rate monitor follows the data specification defined here:
Heart Rate Measurement at Bluetooth.org
As far as I can tell, here's how to apply the info in that document:
- Take your first hex byte, 55, and convert that to binary: 01010101.
- Since Bluetooth data is little-endian, think of the right end of that sequence as bit 0 and the left end as bit 7.
- Now you can look at the documentation for the Flags field of the Bluetooth message. Bit 0 of the flags field tells you whether the heart rate data is 8-bit or 16-bit. In your case bit 0 is 1, so you have 16-bit data.
- Look at the next two hex bytes in your first sample: 04 00.
- Convert that to decimal. Now this part I'm not sure about. If I convert 04 00 to decimal I get 1024, so I must be doing something wrong. Perhaps coincidentally, if I reverse these digits and convert 00 40 to decimal, I get 64, which is a likely heart rate value for someone sitting at their computer (mine is 62 right now). Maybe someone can comment on how to interpret this part.
In my case, with a Wahoo Blue HR, data is coming back like this:
14 46 59 03 58 03
Converting 14 to binary (00010100) and looking at bit 0 (0) tells me that the heart rate is 8-bit, so I just need the second hex byte (46). Converting that to decimal gives me 70.
Unfortunately, I don't know how to interpret your second sample. The first hex byte, 14, indicates an 8-bit value, but that would make the heart rate value B0, or 176 -- not a likely value for someone sitting at their computer. I also wouldn't expect a single device to switch between transmitting 8-bit and 16-bit values, but I guess it's possible.
This SO question includes code for doing these conversions, and it's working for me. I just wanted to try and understand the documentation before implementing it.