This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How does nRF Connect interpret the RR Intervals in nRF Connect?

Hello,

I was trying out sending RR intervals on the Heart Rate Measurement service and seeing what happens in nRF Connect. But, something is weird with the way the values are interpreted in the app. The flag for Energy Expended is set to 0, so there should not be any in the packet. But if bytes 2 and 3 of the hrm packet are used to send RR intervals , they are just ignored:

Whatever RR interval is in bytes 2 and 3 is straight up ignored.

Here is another example with putting RR intervals values from byte 4 onward instead of byte 2 onward:

This time, no RR Interval value is ignored!

This is the table from the spec as reference:

Could somebody explain what I am doing wrong ?

Thank you for your help.

Best regards,

Parents
  • Hi

    I am discussing this with a colleague, and we're not able to see where the specification says that RR intervals should be from byte 2 onwards, in 2 byte format, could you point to it? We're currently investigating why the nRFConnect app is not printing the first RR interval, but don't have a conclusion yet. Thank you for your patience and thorough feedback. I've been able to reproduce it on my end, so it's not specific to your specific phone at least.

    Best regards,

    Simon

  • Hello,

    Thank you again for your time on this.

    As I said previously, the spec does not explicitly say that you need to put RR intervals from byte 2 onwards.

    It is interpretation of (GATT Specification Supplement 5 – Bluetooth® Technology Website):

    and:

    "For a 23-octet ATT_MTU and the Heart Rate Measurement Value format set to UINT16, when notifying the Heart Rate Measurement characteristic, the maximum number of RR-Interval values that can be contained within a single Heart Rate Measurement characteristic with Energy Expended is 7 and the maximum number of RR-Interval values that can be notified if Energy Expended is not present is 8."

    + "The number of RR-Interval sub-fields present is determined by a combination of the overall length of the characteristic and whether or not the characteristic contains the Energy Expended field" (in GATT Specification Supplement v5)

     

    In the table, EE is of size 0 when the flag for it is deactivated. And it is said multiple times that the number of RR-Intervals in the packet depends on whether EE is activated or not.

    All this can only mean that if EE is not present (flag deactivated), RR-Intervals start at byte 2 (Heart Rate Value set to uint8) or byte 3 (Heart Rate Value set to uint16). This is because the packet is constrained. The max number of RR-Interval is increased by 1 (uint16) when EE is not present (uint16 too). This can only mean that RR-Intervals start 2 byte earlier in the packet. How is it possible otherwise ?

    I cannot make it clearer than that. You could say it is a matter of interpretation, the documentation is indeed not very clear.

Reply
  • Hello,

    Thank you again for your time on this.

    As I said previously, the spec does not explicitly say that you need to put RR intervals from byte 2 onwards.

    It is interpretation of (GATT Specification Supplement 5 – Bluetooth® Technology Website):

    and:

    "For a 23-octet ATT_MTU and the Heart Rate Measurement Value format set to UINT16, when notifying the Heart Rate Measurement characteristic, the maximum number of RR-Interval values that can be contained within a single Heart Rate Measurement characteristic with Energy Expended is 7 and the maximum number of RR-Interval values that can be notified if Energy Expended is not present is 8."

    + "The number of RR-Interval sub-fields present is determined by a combination of the overall length of the characteristic and whether or not the characteristic contains the Energy Expended field" (in GATT Specification Supplement v5)

     

    In the table, EE is of size 0 when the flag for it is deactivated. And it is said multiple times that the number of RR-Intervals in the packet depends on whether EE is activated or not.

    All this can only mean that if EE is not present (flag deactivated), RR-Intervals start at byte 2 (Heart Rate Value set to uint8) or byte 3 (Heart Rate Value set to uint16). This is because the packet is constrained. The max number of RR-Interval is increased by 1 (uint16) when EE is not present (uint16 too). This can only mean that RR-Intervals start 2 byte earlier in the packet. How is it possible otherwise ?

    I cannot make it clearer than that. You could say it is a matter of interpretation, the documentation is indeed not very clear.

Children
No Data
Related