<?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>Write Long using MCP 3.6</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4797/write-long-using-mcp-3-6</link><description>I have a 32 byte string to read and write using SD110. In the MCP I can read (using read long) the whole string without any problems. When I try to use write long, MCP times out after about 30 seconds with the error message &amp;quot;Could not update handle (0x0013</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Dec 2014 22:21:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4797/write-long-using-mcp-3-6" /><item><title>RE: Write Long using MCP 3.6</title><link>https://devzone.nordicsemi.com/thread/16985?ContentTypeID=1</link><pubDate>Thu, 18 Dec 2014 22:21:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:668f26f0-5f0a-4a79-ae10-74965681f836</guid><dc:creator>Bj&amp;#248;rn Inge</dc:creator><description>&lt;p&gt;Event id 0x0002 is BLE_EVT_USER_MEM_REQUEST and needs to be handled. See the updated post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write Long using MCP 3.6</title><link>https://devzone.nordicsemi.com/thread/16984?ContentTypeID=1</link><pubDate>Thu, 18 Dec 2014 16:12:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff6bcd9a-7ea4-4a40-94e1-fd7be6b4102d</guid><dc:creator>c cook</dc:creator><description>&lt;p&gt;UPDATE:
I coded up the UART to dump all BLE event ids to a terminal.  When I click the Write Long button in the MCP, it is consistently generating a p_ble_evt-&amp;gt;header.evt_id = 0x0002.  The 0x0012 event comes later, which I believe is a connection parameters update.&lt;/p&gt;
&lt;p&gt;I’m not sure what BLE Event is 0x0002 – in the ble_gatts.h file all the BLE events are enumurations, and start with some base offset.  I haven’t located any that start with base 0x0000.  I added a case 0x0002: to on_ble_evt(ble_evt_t * p_ble_evt) and placed a break point at case 0x0002, so I could look at the data pointed to by p_ble_evt.  No where do I see the data I’m trying to write.  This makes be believe the stack needs me to respond, but because I don’t know what event 0x0002 is I can’t respond to the stack.&lt;/p&gt;
&lt;p&gt;What BLE event is assigned to 0x0002 – and where or how do I find my data?&lt;/p&gt;
&lt;p&gt;Also, if I do a Read Long after a Write Long, the data is unchanged (the write long did not write)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write Long using MCP 3.6</title><link>https://devzone.nordicsemi.com/thread/16983?ContentTypeID=1</link><pubDate>Wed, 17 Dec 2014 18:11:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c04aba2-61d1-4f30-9ff9-c8888f1222fc</guid><dc:creator>c cook</dc:creator><description>&lt;p&gt;Bjorn - I added BLE_GATTS_OP_EXEC_WRITE_REQ_NOW as a case in on_ble_evt(...).  After clicking the Write Long button in MCP p_ble_evt-&amp;gt;header.evt_id = 0x0012.&lt;/p&gt;
&lt;p&gt;For reference - I&amp;#39;m using SDK 7.1, PCA10028 eval board, SD110 7.1, MCP 3.6.0.8331&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write Long using MCP 3.6</title><link>https://devzone.nordicsemi.com/thread/16982?ContentTypeID=1</link><pubDate>Wed, 17 Dec 2014 07:14:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3ec1b3a-a9a9-4272-bae8-d422fcaad415</guid><dc:creator>Bj&amp;#248;rn Inge</dc:creator><description>&lt;p&gt;Support for long write was added in MCP 3.6.0, that is correct.&lt;/p&gt;
&lt;p&gt;Update:
To receive an incoming long write request correctly in your app you will need to handle the BLE_EVT_USER_MEM_REQUEST event (evt_id 0x02). The event needs to be responded to with sd_ble_user_mem_reply(conn_handle, p_block).&lt;/p&gt;
&lt;p&gt;Next a BLE_GATTS_EVT_WRITE will be received, notifying that the value has been written.&lt;/p&gt;
&lt;p&gt;Have a look at this thread: &lt;a href="https://devzone.nordicsemi.com/question/5998/writing-long-characteristic-values/?answer=6003#post-id-6003"&gt;Writing long characteristic values&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>