<?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>Getting the new updated value of a write long in the event handler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3419/getting-the-new-updated-value-of-a-write-long-in-the-event-handler</link><description>I&amp;#39;m getting an event when a write long is completed (the line with BLE_GATTS_OP_EXEC_WRITE_REQ_NOW): 
 static void on_write(ble_mlbx_t * p_mlbx, ble_evt_t * p_ble_evt)
{
 ble_gatts_evt_write_t * p_evt_write = &amp;amp;p_ble_evt-&amp;gt;evt.gatts_evt.params.write;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Aug 2014 14:43:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3419/getting-the-new-updated-value-of-a-write-long-in-the-event-handler" /><item><title>RE: Getting the new updated value of a write long in the event handler</title><link>https://devzone.nordicsemi.com/thread/12416?ContentTypeID=1</link><pubDate>Wed, 20 Aug 2014 14:43:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4f42d5e-d516-44b1-b188-c144f7b5f936</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Robert, I believe the answer from Ole Morten is clear enough. Yes, you would need to parse the user memory and you can find the format for that user memory in the link Ole gave. There is a &amp;quot;length&amp;quot; field there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting the new updated value of a write long in the event handler</title><link>https://devzone.nordicsemi.com/thread/12415?ContentTypeID=1</link><pubDate>Wed, 20 Aug 2014 12:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28fd9c6b-5dd7-4acc-a9cb-7afd0f8681f2</guid><dc:creator>Robert Taylor</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Thanks for your help. I did see that case and it did help. My question is really this: should the write field in the ble_gatts_evt_write_t data structure contain the new value or is it expected that an application should parse the memory block directly? If it&amp;#39;s expected that you should parse the memory block how do you know how many bytes the new data is?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting the new updated value of a write long in the event handler</title><link>https://devzone.nordicsemi.com/thread/12414?ContentTypeID=1</link><pubDate>Wed, 20 Aug 2014 10:40:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8bdc352-8e45-409f-bbe0-d393d1366382</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Robert,&lt;/p&gt;
&lt;p&gt;If you have a look at &lt;a href="https://devzone.nordicsemi.com/question/5998/writing-long-characteristic-values/"&gt;this case&lt;/a&gt; you can find the reply from Ole Morten would maybe answer your question.&lt;/p&gt;
&lt;p&gt;You could either parse the user memory or read the actual value of the characteristic to get the written value. Please be noted that handle ID need to be looked up in the user memory block since it&amp;#39;s not included in the p_evt_write.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>