<?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>Difference between sd_ble_gatts_hvx() and sd_ble_gatts_value_set()</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16039/difference-between-sd_ble_gatts_hvx-and-sd_ble_gatts_value_set</link><description>I can&amp;#39;t find clarification on what is a difference between this two functions. Both of them could be used for changing value attibute</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Aug 2021 12:12:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16039/difference-between-sd_ble_gatts_hvx-and-sd_ble_gatts_value_set" /><item><title>RE: Difference between sd_ble_gatts_hvx() and sd_ble_gatts_value_set()</title><link>https://devzone.nordicsemi.com/thread/326779?ContentTypeID=1</link><pubDate>Thu, 26 Aug 2021 12:12:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80f10abb-30db-43b9-82e2-318ad0db3f73</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It could make sense in some cases. Perhaps you want to set it for later, or in case the value is read later (even though notifications or indications have not been enabled).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difference between sd_ble_gatts_hvx() and sd_ble_gatts_value_set()</title><link>https://devzone.nordicsemi.com/thread/326763?ContentTypeID=1</link><pubDate>Thu, 26 Aug 2021 11:52:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c145b8b-7820-44c0-876d-6be5a79f32a9</guid><dc:creator>Fraggel</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;in some examples, both functions after another will be called. Why?&amp;nbsp; &lt;code&gt;sd_ble_gatts_hvx()&lt;/code&gt; should be sufficient?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;see:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/nRF52-Bluetooth-Course/blob/master/ble_cus.c"&gt;https://github.com/NordicPlayground/nRF52-Bluetooth-Course/blob/master/ble_cus.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difference between sd_ble_gatts_hvx() and sd_ble_gatts_value_set()</title><link>https://devzone.nordicsemi.com/thread/61166?ContentTypeID=1</link><pubDate>Sun, 28 Aug 2016 00:50:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51666865-b9f1-4bcc-8811-9272145da34f</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;They are totally different. &lt;code&gt;sd_ble_gatts_value_set()&lt;/code&gt; just changes the value of a characteristic on the device. When another device chooses to read that characteristic, the stack will (by default) return the latest set value. You can change it as many times as you want, but the other side will only see the new value if it happens to read it.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sd_ble_gatts_hvx()&lt;/code&gt; not-only can change the internal value of the characteristic, but also sends it out as a notification/indication to the other side which is subscribed to the characteristic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>