<?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>Queued Writes intentions and clarifications?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34664/queued-writes-intentions-and-clarifications</link><description>Can I get some clarification on what Queued Writes is and is not? This is just another one of the hilariously under documented features that could be summed up immediately if instead of just posting code - someone thought to write a few sentences on </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Apr 2020 10:17:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34664/queued-writes-intentions-and-clarifications" /><item><title>RE: Queued Writes intentions and clarifications?</title><link>https://devzone.nordicsemi.com/thread/247497?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2020 10:17:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5931a8d-1412-4ff0-b66b-173d4383754d</guid><dc:creator>awneil</dc:creator><description>[quote userid="8101" url="~/f/nordic-q-a/34664/queued-writes-intentions-and-clarifications"]My sincerest plea for Nordic is someone write “how we intended this to be used” notes on SDK15 and beyond. A questionably readable example is not a replacement.&amp;nbsp;[/quote]
&lt;p&gt;I heartily agree!&lt;/p&gt;
&lt;p&gt;To be fair, it&amp;#39;s not just Nordic - this seems to be endemic in manufacturer-provided libraries &amp;amp; SDKs. [1]&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not helped by the over-reliance on Doxygen-generated documentation, which will naturally produce very &amp;quot;close-in&amp;quot; documentation of individual functions/types/variables etc - but all too often lacks the overview, context and intention of the system or module as a whole.&lt;/p&gt;
&lt;p&gt;The examples don&amp;#39;t help in this, as they provide&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;em&gt;&lt;strong&gt;no&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp;explanation of the structure, or process of creating the application -&amp;nbsp;they are purely presented as a done &amp;amp; dusted&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;em&gt;fait accompli&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The &amp;quot;description&amp;quot; is little more than. &amp;quot;&lt;em&gt;press that button and see this happen&lt;/em&gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For example:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/60875/multi-link-peripheral---what-is-really-needed"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/60875/multi-link-peripheral---what-is-really-needed&lt;/a&gt;&amp;nbsp;- which is what prompted the wakeup of this old thread.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sorry - rant over.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;EDIT&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[1] To illustrate &amp;quot;&lt;em&gt;seems to be endemic in manufacturer-provided libraries &amp;amp; SDKs&lt;/em&gt;&amp;quot;, see:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://www.avrfreaks.net/comment/2200431#comment-2200431"&gt;https://www.avrfreaks.net/comment/2200431#comment-2200431&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and the reply there.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Queued Writes intentions and clarifications?</title><link>https://devzone.nordicsemi.com/thread/133858?ContentTypeID=1</link><pubDate>Tue, 29 May 2018 14:12:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ce95cc3-d294-4c07-8c7d-4c57a169b2a2</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi SRA,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First, I apologize for the late reply.&lt;/p&gt;
&lt;p&gt;Your feedback has been noted and I will suggest that the documentation is expanded upon and/or a blog post is written on the topic.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Q1: Yes, Prepare Write Request/Response and&amp;nbsp;Execute&amp;nbsp;Write Request/Response is defined by the Bluetooth Specification, see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part F,&amp;nbsp; Section 3.4.6 Queued Writes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Q2: Yes, the maximum size of an attribute is limited to 512 bytes, hence this is also the limit for queued writes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Q3: Yes, each&amp;nbsp;Prepare Write Request must be replied to by calling sd_ble_gatts_rw_authorize_reply ( SD will then reply with ATT Prepare Write Response), see&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/group___b_l_e___g_a_t_t_s___q_u_e_u_e_d___w_r_i_t_e___n_o_b_u_f___n_o_a_u_t_h___m_s_c.html" target="_self"&gt;GATTS Queued Writes: App handled, no attributes require authorization&lt;/a&gt;&amp;nbsp;or the other Queued Writes Message Sequence Charts found &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.0.0/group___b_l_e___g_a_t_t_s___m_s_c.html"&gt;here&lt;/a&gt;. So yes,&amp;nbsp; you&amp;#39;ll only see one packet per connection interval when using Queued Writes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Q4: You are correct that the Queued Write operation is not widely used. I think that the overhead is 4 bytes (Attribute handle 2 bytes + Attribute Offset 2 bytes) per 18 byte data. I would rather&amp;nbsp; the low throughput compared to write commands is the reason for its little use.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>