<?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 to use HTS to notify temperature instead of indicate ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23803/how-to-use-hts-to-notify-temperature-instead-of-indicate</link><description>As per the example, HTS only the &amp;quot;indicate&amp;quot; property is mandatory. But, I want to use Notify and Read property. The example suggests using the intermediate temperature in order to use Notify property in the temperature measurement. Is there any alternative</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Jul 2019 13:54:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23803/how-to-use-hts-to-notify-temperature-instead-of-indicate" /><item><title>RE: How to use HTS to notify temperature instead of indicate ?</title><link>https://devzone.nordicsemi.com/thread/196027?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 13:54:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc12ee65-09c7-4751-b69a-8cda18ffc594</guid><dc:creator>RatheeshT</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am using the following&lt;/p&gt;
&lt;p&gt;SDK 14.2&lt;/p&gt;
&lt;p&gt;Profile - HTS&lt;/p&gt;
&lt;p&gt;Device -nRF52832&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As per your above suggestion, I have done below to change property to &amp;quot;notify from indicate&amp;quot;.&lt;pre class="ui-code" data-mode="text"&gt;static uint32_t hts_measurement_char_add(ble_hts_t * p_hts, ble_hts_init_t const * p_hts_init)
{
    .
    .
    .
    char_md.char_props.notify = 1;
    
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;attr_md.read_perm);(added above to memset of attr_md function call)
   
    
    .
    .
    .
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As extra ,I have done the below also on function&amp;nbsp;ble_hts_measurement_send()&lt;/p&gt;
&lt;p&gt;hvx_params.type&amp;nbsp;&amp;nbsp; = BLE_GATT_HVX_INDICATION;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; to&lt;br /&gt;hvx_params.type&amp;nbsp;&amp;nbsp; = BLE_GATT_HVX_NOTIFICATION;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;After all those modification, it is not working(crashing) in notify property hence I have the following question.&lt;/p&gt;
&lt;p&gt;Q1: Whether I have to change anything on services_init() function?&lt;/p&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; Below are available inside services_init function&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;hts_init.hts_meas_attr_md.cccd_write_perm);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&amp;amp;hts_init.hts_meas_attr_md.read_perm);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&amp;amp;hts_init.hts_meas_attr_md.write_perm);&lt;/div&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;hts_init.hts_temp_type_attr_md.read_perm);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&amp;amp;hts_init.hts_temp_type_attr_md.write_perm);&lt;/div&gt;
&lt;p&gt;Q2: Function on_cccd_write() is having function/statement only regarding indication. Anything needs to be changed on this function?&lt;/p&gt;
&lt;p&gt;Please let me know your feedback on this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use HTS to notify temperature instead of indicate ?</title><link>https://devzone.nordicsemi.com/thread/93636?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2017 13:35:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be7dfb6c-e78e-4cc3-af77-a63e3fa510e7</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;The values are only simulated. They should change if you press Button 1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use HTS to notify temperature instead of indicate ?</title><link>https://devzone.nordicsemi.com/thread/93638?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2017 09:24:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b65218f6-8ac3-48dd-95d2-598b221e8212</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;Thanks! It works fine. I have plugged in the HTS service. I have a doubt though. What temperature is actually being transmitted here? Is it the chip&amp;#39;s temperature or other value? I see only 37.6 value. Please clarify!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use HTS to notify temperature instead of indicate ?</title><link>https://devzone.nordicsemi.com/thread/93637?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2017 06:51:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d06bb060-3abc-4f12-a88c-5b0236e4714f</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;I can&amp;#39;t see what would be wrong with the measurements. I don&amp;#39;t think there is anything wrong with what you are doing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use HTS to notify temperature instead of indicate ?</title><link>https://devzone.nordicsemi.com/thread/93635?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 14:47:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5c87ef7-76d6-4ad9-85ff-6761b0a93a4a</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;got it working! Thanks! But is this the right way to implement? Are these measurements are still valid by using the notify property? Or should I use the intermediate values characteristic to enable the notify temperature values?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use HTS to notify temperature instead of indicate ?</title><link>https://devzone.nordicsemi.com/thread/93633?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 14:39:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8a312df-18bc-450e-9fb3-58d21f9f0695</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;yes, I meant the same. I want to use notify, read params just like the battery status to see the temperature.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use HTS to notify temperature instead of indicate ?</title><link>https://devzone.nordicsemi.com/thread/93632?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 14:37:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90d7d7db-d538-4976-8ab1-d79710762183</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Are you talking about the Temperature Measurement characteristic in the Health Thermometer service? That should be all you need to enable notification. You won&amp;#39;t receive any notification though, before you have also changed the code in on_hts_evt() in main.c to use notification events.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use HTS to notify temperature instead of indicate ?</title><link>https://devzone.nordicsemi.com/thread/93634?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 13:34:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55cd2aeb-665b-4bf9-b3a1-3edb0096a501</guid><dc:creator>Nivetha</dc:creator><description>&lt;p&gt;Thanks! But this didn&amp;#39;t solve the problem. I guess I have to change few more things in the ble_hts.c to have notifications instead of indication property.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use HTS to notify temperature instead of indicate ?</title><link>https://devzone.nordicsemi.com/thread/93631?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 13:11:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff1cefac-f484-4921-ba92-55d505dd9738</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if I understand your question, but to use notification you can change this line in the function hts_measurement_char_add() ble_hts.c&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;char_md.char_props.indicate = 1;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;char_md.char_props.notify = 1;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and to enable reading change this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;attr_md.read_perm  = p_hts_init-&amp;gt;hts_meas_attr_md.read_perm;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to e.g. this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;attr_md.read_perm);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you make these changes though, your device will no longer comply with the HTS profile.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>