<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82573/how-does-nrf-connect-interpret-the-rr-intervals-in-nrf-connect</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Dec 2021 12:21:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82573/how-does-nrf-connect-interpret-the-rr-intervals-in-nrf-connect" /><item><title>RE: How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/thread/343886?ContentTypeID=1</link><pubDate>Thu, 16 Dec 2021 12:21:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01578ac7-85dc-4d85-ad5a-d972e76d7bff</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;After some further debugging on the Android side, we found a bug in the nRFConnect application where a rouge offset causes these two bytes not to be printed by the nRFConnect log.&lt;/p&gt;
&lt;p&gt;Thank you for reporting this and helping us reproduce it so we could get to the bottom of it. This fix will hopefully find its way into the next update of the nRFConnect for Android scheduled early next year.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d also like to thank you for your persistence.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/thread/343840?ContentTypeID=1</link><pubDate>Thu, 16 Dec 2021 10:27:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0cdea6b-f65a-4e6b-8d9a-7a98a0add6f7</guid><dc:creator>mmnano</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you again for your time on this.&lt;/p&gt;
&lt;p&gt;As I said previously, the spec does not explicitly say that you need to put RR intervals from byte 2 onwards.&lt;/p&gt;
&lt;p&gt;It is interpretation of (&lt;a href="https://www.bluetooth.com/specifications/specs/gatt-specification-supplement-5/"&gt;GATT Specification Supplement 5 &amp;ndash; Bluetooth&amp;reg; Technology Website&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="273" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1639047462234v1.png" width="485" /&gt;&lt;/p&gt;
&lt;p&gt;and:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;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.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;+ &amp;quot;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&amp;quot; (in GATT Specification Supplement v5)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In the table, EE is of size 0 when the flag for it is deactivated&lt;/strong&gt;. And it is said multiple times that the number of RR-Intervals in the packet depends on whether EE is activated or not.&lt;/p&gt;
&lt;p&gt;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 ?&lt;/p&gt;
&lt;p&gt;I cannot make it clearer than that. You could say it is a matter of interpretation, the documentation is indeed not very clear.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/thread/343824?ContentTypeID=1</link><pubDate>Thu, 16 Dec 2021 09:48:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ea3faaa-0c39-4c87-b631-15447bd8ae20</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I am discussing this with a colleague, and we&amp;#39;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&amp;#39;re currently investigating why the nRFConnect app is not printing the first RR interval, but don&amp;#39;t have a conclusion yet. Thank you for your patience and thorough feedback. I&amp;#39;ve been able to reproduce it on my end, so it&amp;#39;s not specific to your specific phone at least.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/thread/343554?ContentTypeID=1</link><pubDate>Wed, 15 Dec 2021 08:16:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:013f4feb-5be1-4509-b53e-cbcbaff89d7f</guid><dc:creator>mmnano</dc:creator><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is a sample (build folder inside also has a .hex for nrf52840dk_nrf52840):&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Peripheral_5F00_RR_5F00_Interval_5F00_nRF_5F00_Connect_5F00_App.zip"&gt;devzone.nordicsemi.com/.../Peripheral_5F00_RR_5F00_Interval_5F00_nRF_5F00_Connect_5F00_App.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It alternates between sending the RR Intervals from byte 2 and byte 4 while keeping the EE flag deactivated.&lt;/p&gt;
&lt;p&gt;It shows this behavior:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot_5F00_2021_2D00_12_2D00_15_2D00_09_2D00_12_2D00_17_2D00_690_5F00_no.nordicsemi.android.mcp.jpg" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The RR-Interval with value 0x15e (341.80ms) is thus ignored on the display when place on byte 2 but not when placed on byte 4.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am using Android. As far as what I tried, iOS does not seem to offer an obvious way to interpret a heart rate measurement packet.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/thread/343536?ContentTypeID=1</link><pubDate>Wed, 15 Dec 2021 06:47:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e459bc6c-09ed-4e9c-bc63-e28aa2e7a50d</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;That&amp;#39;s true, can you double check that the energy expended bit is actually disabled in your application? Do you have a second nRF52 device that you can use as a HRS central device to connect and see if you&amp;#39;re able to print RR-values from there as well, so we can see if this issue is specific to the nRFConnect app or not. Or alternatively do you have a .hex file of the app I can test to reproduce this on my end?&lt;/p&gt;
&lt;p&gt;Are you using the Android or iOS version of the application. Let me know and I&amp;#39;ll ask the app developers if they&amp;#39;re aware of something like this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/thread/343353?ContentTypeID=1</link><pubDate>Tue, 14 Dec 2021 10:07:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e29b753d-4285-45e6-bcad-3dc541efb786</guid><dc:creator>mmnano</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for your time on this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The paragraph that makes me hesitate is this one (page 12 of 15):&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;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.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For a given MTU size, the maximum number of RR-Interval that can be fit &lt;strong&gt;changes&lt;/strong&gt; depending on if Energy Expended is present or not. That can only mean that 1 RR-Interval measurement is put where EE should be (bytes 2 and 3) ! I don&amp;#39;t see any other way to go from 7 to 8 RR-Interval within a&amp;nbsp;constrained packet ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/thread/343343?ContentTypeID=1</link><pubDate>Tue, 14 Dec 2021 09:34:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b579ca0-74c4-40c1-b146-785519ebd045</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not able to see where in the HRS specification it&amp;#39;s stated that bytes 2 and 3 should be used for RR intervals if the EE bit is set to 0. Aren&amp;#39;t these for the EE field, and thus when the EE bit is set to 0 these bytes are ignored, and only the later bytes are printed by the central app. At least that&amp;#39;s my understanding. Let me know if I missed something.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/HRS_5F00_SPEC_5F00_V10.pdf"&gt;devzone.nordicsemi.com/.../HRS_5F00_SPEC_5F00_V10.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/thread/343054?ContentTypeID=1</link><pubDate>Mon, 13 Dec 2021 07:31:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14bdb42e-fe3b-408d-828d-54fe9e74745d</guid><dc:creator>mmnano</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The data packet is constructed in a straight forward way.&lt;/p&gt;
&lt;p&gt;A Packet where byte 02 and 03 are ignored:&amp;nbsp;10-BA-F2-03-18-01-22-FA-00&lt;/p&gt;
&lt;p&gt;0x10: Byte 01 is the flags. Bit 4 is true for indicating that RR-Intervals are present and Bit 3 is false for Energy Expended deactivated. Bit 0 is false for heart rate in the uint8 format&lt;/p&gt;
&lt;p&gt;0xBA: Heart Rate measurement value.&lt;/p&gt;
&lt;p&gt;0x3F2: RR-Interval&lt;/p&gt;
&lt;p&gt;0x118: RR-Interval&lt;/p&gt;
&lt;p&gt;0x0FA: RR-Interval.&lt;/p&gt;
&lt;p&gt;This number of RR-Intervals is very much within what the packet should be able to handle (which is 7 to 9 I believe).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The thing is nRF Connect does not display 0x3F2 despite Energy Expended flag being deactivated.&amp;nbsp;&lt;/strong&gt;Seems like the fact this is ignored: when EE is deactivated the RR-Interval part should start at byte 2 and not 4 (as per the spec).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you send the same packet with 0x0000 at byte 2/3 (10-BA-00-00-F2-03-18-01-22-FA-00), suddenly 0x3F2 is displayed correctly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/thread/342843?ContentTypeID=1</link><pubDate>Fri, 10 Dec 2021 08:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f60c5b0-bf97-41b1-b7c3-60a4279d79fc</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What seems to be happening is that it&amp;#39;s not room for all the RR-iterval values. From the spec.:&lt;/p&gt;
&lt;p&gt;&amp;quot;If more RR-Interval values are measured since the last notification than fit into one Heart Rate Measurement characteristic, then the remaining RR-Interval values should be included in the next available Heart Rate Measurement characteristic&amp;quot;&lt;/p&gt;
&lt;p&gt;Can you show me what your data packet looks like on the nRF side as well as where you have disabled this Energy Expended bit?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/thread/342730?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 13:23:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:442a85ef-c43f-4c61-91ee-4468bf0e7f76</guid><dc:creator>mmnano</dc:creator><description>&lt;p&gt;Take the first values on the first example.&lt;/p&gt;
&lt;p&gt;Per specs, RR intervals should be from byte 2 onward, in 2 byte format.&lt;/p&gt;
&lt;p&gt;So I should have 0x3f2, 0x118, 0x122 and 0xfa as RR intervals. This corresponds to 986ms, 273ms, 283ms and 244ms.&lt;/p&gt;
&lt;p&gt;As seen on that first screenshot, the 0x3F2 (986ms) is ignored, not the others. Kind of like the RR intervals are only read from the byte 4 onward, which would happen if Energy Expended would be activated. But, Energy Expended flag is not activated.&lt;/p&gt;
&lt;p&gt;On the bottom screenshot I manually code the RR intervals to be on byte 4 onward in the packet. No value is ignored there, it once again acts like byte 2 and 3 are Energy Expended (but the flag is not set which means that no energy expended field is shown).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How does nRF Connect interpret the RR Intervals in nRF Connect?</title><link>https://devzone.nordicsemi.com/thread/342727?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 13:15:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e80fbbc7-ec0b-4a44-a51b-ba674357ef1d</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Sorry if I&amp;#39;m misunderstanding, but where do you see that the RR interval values are ignored? In both these screenshots it seems to me that RR values are printed as they should. What exactly are you expecting in the top screenshot that you are able to see in the bottom one?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>