<?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>Health Thermometer not working</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10579/health-thermometer-not-working</link><description>Hi, 
 I&amp;#39;m new with a) the Nordic Softdevice environment and b) using the nRF52. So there are a few questions... 
 As a starting point I&amp;#39;ve used the template project (...\SDK\nRF52_SDK_0.9.2_dbc28c9\examples\ble_peripheral\ble_app_template) and added</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Dec 2015 11:08:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10579/health-thermometer-not-working" /><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39361?ContentTypeID=1</link><pubDate>Tue, 15 Dec 2015 11:08:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90153ec5-efbb-47f8-b7c5-8072664a52fe</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;So in services_init () I changed&lt;/p&gt;
&lt;p&gt;BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;hts_init.hts_meas_attr_md.cccd_write_perm);&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;hts_init.hts_meas_attr_md.cccd_write_perm);&lt;/p&gt;
&lt;p&gt;and all works fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39360?ContentTypeID=1</link><pubDate>Fri, 11 Dec 2015 11:43:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4404bc8e-edfb-4ad9-ba81-afc3df7afe44</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;Hi Anders,&lt;/p&gt;
&lt;p&gt;I will try and get back to you as soon as possible. Thank you for your help so far.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39357?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2015 10:30:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8831f86-b58b-4337-8db2-31f460e326f3</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;What happens on MCP (Android version):
a) for Indications that I can enable: I click on the up/down arrow (on the right of the respective Characteristic name). The up/down arrow gets crossed out and 0x2902 changes to &amp;quot;Indications enabled&amp;quot;
b) for my HTS service that doesn&amp;#39;t work: nothing happens when I click on the up/down arrow.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39354?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2015 10:01:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bebc440a-131f-46fd-84b1-71c1e3a8fabb</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Why can&amp;#39;t you enable indications? Are you using MCP for Android or Windows?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39359?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 08:59:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79fe4136-220c-4398-8767-7c5e8a46d389</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;Hmmm. I did quite a bit of debugging... :-(.&lt;/p&gt;
&lt;p&gt;I have just enabled the code again and used the nRF Master Control to see if HTS is working. Unfortunately not.&lt;/p&gt;
&lt;p&gt;However I note that I cannot enable Indications on the nRF Master Control. Maybe this helps to find the problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39358?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 08:31:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff81cea9-6209-4999-803e-f0901950a047</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;I see that you have commented out this;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//        case BLE_GATTS_EVT_SYS_ATTR_MISSING:
//            err_code = sd_ble_gatts_sys_attr_set (m_conn_handle, NULL, 0, BLE_GATTS_SYS_ATTR_FLAG_SYS_SRVCS | BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS);
//            APP_ERROR_CHECK (err_code);
//            break;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Why is it commented out?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39356?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 07:10:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ed45dcb-eaf1-4ce7-af6c-1e02677d46fa</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;Stack.c is attached to the original post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39355?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 13:44:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bccad7df-945c-4945-a1e0-bb03b85d0c26</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Can you post you code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39353?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 10:32:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bafaf88-b4e9-4ea6-9990-8dd433edc165</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;Hi, thanks for your reply. So, for my tests I&amp;#39;m using HTS-capable Apps (e.g. nRF Toolbox, BLE Scanner and others) which enable indications on relevant characteristics. Still doesn&amp;#39;t work...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39352?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 10:07:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b21b8b90-da79-4d5a-b706-66125510de18</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;The error code is BLE_ERROR_GATTS_SYS_ATTR_MISSING. This means that the softdevice does not know the system attributes for that characteristic. The system attributes are in practice only the cccd (Client Characteristic Configuration Descriptor). value. This is 1 when notifications are enabled, and zero otherwise.&lt;/p&gt;
&lt;p&gt;You are returned this error because the softdevice does not know the state of the System Attributes. It will communicate this to you by returning this error, but also by sending you the BLE event BLE_GATTS_EVT_SYS_ATTR_MISSING. If you have not stored the system attributes from a previous connection (normal when bonding), you can handle this event by adding this to &lt;code&gt;on_ble_evt&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;case BLE_GATTS_EVT_SYS_ATTR_MISSING:
        // No system attributes have been stored.
        err_code = sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0, 0);
        APP_ERROR_CHECK(err_code);
        break;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;See the documentation for sd_ble_gatts_sys_attr_set &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s110.api.v8.0.0/group___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html#ga577c788e199b1a2c0d19602b07ef2515"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I see that in the ble_app_template project, this is already implemented.&lt;/p&gt;
&lt;p&gt;The solution for you will be to check if notifications are enabled on the characteristic, before attempting to send data on it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = ble_hts_is_indication_enabled(&amp;amp;m_hts, &amp;amp;is_indication_enabled);
APP_ERROR_CHECK(err_code);
if (is_indication_enabled)
{
    temperature_measurement_send();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;UPDATE 1:&lt;/strong&gt;
I tried this myself using the hts example from the SDK. When i click the up/down arrow, it works for a while. Then i see that it says Value: Indications enabled under &amp;quot;Descriptors&amp;quot;. When i press button_0, i receive a temperature. Are you sure that &lt;code&gt;temperature_measurement_send&lt;/code&gt;is called in your application?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7357.screenshot.png" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39350?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2015 13:01:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:547ddf52-71d4-4702-b7a3-bbdeceffe2dc</guid><dc:creator>oneguy</dc:creator><description>&lt;p&gt;The error code is 13313.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Health Thermometer not working</title><link>https://devzone.nordicsemi.com/thread/39351?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2015 10:10:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b07d242f-f02e-4609-8108-230e1c75af9d</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Hi. Can you check what error code ble_hts_measurement_send returns ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>