<?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>Why stack doesn&amp;#39;t point to new value after sd_ble_gatts_rw_authorize_reply</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27223/why-stack-doesn-t-point-to-new-value-after-sd_ble_gatts_rw_authorize_reply</link><description>Hi,
I&amp;#39;m trying to implement GATTS Queued Writes: App handled, no attributes require authorization variant #2 VLOC_USER. 
 According to the documentation values in ATT table are set to the new values after the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST{WRITE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Nov 2017 21:20:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27223/why-stack-doesn-t-point-to-new-value-after-sd_ble_gatts_rw_authorize_reply" /><item><title>RE: Why stack doesn't point to new value after sd_ble_gatts_rw_authorize_reply</title><link>https://devzone.nordicsemi.com/thread/107395?ContentTypeID=1</link><pubDate>Mon, 27 Nov 2017 21:20:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9fdb214-bad4-46d8-88d4-dddeee31d2bc</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure why sd_ble_gatts_value_set() doesn&amp;#39;t copy correctly, but you can try to call it will p_value set til NULL. Then only the length will be updated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why stack doesn't point to new value after sd_ble_gatts_rw_authorize_reply</title><link>https://devzone.nordicsemi.com/thread/107394?ContentTypeID=1</link><pubDate>Mon, 27 Nov 2017 21:20:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56c267d1-dc63-4957-8a4f-cf1668ceee59</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;&amp;quot;Application traverses its queue and executes the write operations(memcpy)&amp;quot; is very unclear. I recommend using sd_ble_gatts_value_set() to set the attribute values, as it seems you are doing now. So variant #1 and variant #2 are very similar actually. I have reported this as a documentation improvement.&lt;/p&gt;
&lt;p&gt;When you reply with sd_ble_user_mem_reply(p_ble_evt-&amp;gt;evt.gattc_evt.conn_handle, NULL); you have to set the attribute values, the SoftDevice will not have any place to store the values you reply to sd_ble_gatts_rw_authorize_reply() until EXEC_WRITE_REQ_NOW is received.&lt;/p&gt;
&lt;p&gt;.update has to be 1 when type is BLE_GATTS_AUTHORIZE_TYPE_WRITE&lt;/p&gt;
&lt;p&gt;.p_data is actually sent back to the peer, see &amp;quot;Prepare write response&amp;quot; in the Bluetooth spec for more information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why stack doesn't point to new value after sd_ble_gatts_rw_authorize_reply</title><link>https://devzone.nordicsemi.com/thread/107396?ContentTypeID=1</link><pubDate>Fri, 24 Nov 2017 09:28:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c36720c2-4238-40cb-b841-fdc362725a42</guid><dc:creator>Miro Petrak</dc:creator><description>&lt;p&gt;Yes i&amp;#39;ve checked the length and it was ok (it should be because vector tracks it&amp;#39;s size automatically)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why stack doesn't point to new value after sd_ble_gatts_rw_authorize_reply</title><link>https://devzone.nordicsemi.com/thread/107393?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2017 16:01:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a722c2bf-31b6-4b14-916c-e3c61eaba50c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Sorry the late replay. Could you edit your question and include your answer/update below? Just to keep things clean. I&amp;#39;m not sure why you data is changed. Have you checked the length you provide when calling sd_ble_gatts_value_set()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>