<?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 to variable length characteristic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1619/write-to-variable-length-characteristic</link><description>Hello, 
 I have some code running that transfers binary data from an iPhone to a nRF51822 device (used for firmware upgrade). 
 I have used a variable length characteristic with a maximum length of 20 bytes. I then write &amp;quot;as often as possible&amp;quot; from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Feb 2014 18:55:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1619/write-to-variable-length-characteristic" /><item><title>RE: Write to variable length characteristic</title><link>https://devzone.nordicsemi.com/thread/7126?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2014 18:55:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f0a8b35-ca7e-429d-8b35-37b012f8fec9</guid><dc:creator>Paarvai Naai</dc:creator><description>&lt;p&gt;Hi Ole,&lt;/p&gt;
&lt;p&gt;Thanks for your quick response!  I was confused because you had referenced a link on how to implement long writes at the application, while (based on other posts) I was under the impression S110 v6.0.0 supported this through some higher-level API mechanism.  I will look into this more as needed and post in a separate thread if I have any problems.&lt;/p&gt;
&lt;p&gt;Thanks again,
Paarvai&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write to variable length characteristic</title><link>https://devzone.nordicsemi.com/thread/7125?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2014 11:37:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58ee2c79-2924-4b12-a210-b4f30617b7fa</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I&amp;#39;m not quite sure I understand what you&amp;#39;re confused about. It&amp;#39;s correct that S110 version 6.0.0 supports long writes, and such support can be implemented as shown in the MSC I linked to above. GATT Long Writes is basically just about doing multiple writes up to ATT_MTU-5 bytes each, and then executing all those writes with a single operation. As I said above, the ATT_MTU is fixed for current S110, at 23 B, so an actual Write Long operation would be multiple 18 B writes followed by one execute to &amp;quot;commit&amp;quot; them all. I&amp;#39;d recommend you to take a look at the Core Specification to understand how this works, specifically Volume 3, Part G, section 4.9.4.&lt;/p&gt;
&lt;p&gt;As far as I know, Android doesn&amp;#39;t currently support long writes. Unfortunately, I also don&amp;#39;t have a full example of implementing a long write, but please give it a go, and post a separate question if you have trouble. If so, I can try to look into making a quick example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write to variable length characteristic</title><link>https://devzone.nordicsemi.com/thread/7124?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2014 04:16:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c235d728-4ce0-4a9b-9262-621d2fa37a6f</guid><dc:creator>Paarvai Naai</dc:creator><description>&lt;p&gt;Hi Ole,&lt;/p&gt;
&lt;p&gt;I am a bit confused.  I saw here that S110 SoftDevice 6.0.0 supports long writes:
&lt;a href="https://devzone.nordicsemi.com/index.php/will-the-master-emulator-support-long-writes"&gt;devzone.nordicsemi.com/.../will-the-master-emulator-support-long-writes&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Is this not correct?  And, how is this configured using the nRF51822 API?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;(However, I read somewhere else that Android 4.3 BLE API does not support long writes.  Is that true of 4.4.x as well?)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;OTOH, I have been able to perform a read on a characteristic and successfully received data that is longer than 20 bytes (nRF51822 -&amp;gt; Android 4.4.2).&lt;/p&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Finally, do you have a concrete example on how to implement the queued write scheme you referenced in your previous post?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Sorry if this question is redundant -- the information on some of these limitations isn&amp;#39;t clearly spelled out either in a single post here or in the documentation.&lt;/p&gt;
&lt;p&gt;Thanks in advance,
Paarvai&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write to variable length characteristic</title><link>https://devzone.nordicsemi.com/thread/7123?ContentTypeID=1</link><pubDate>Mon, 17 Feb 2014 14:43:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0c78937-1ffb-4c95-a5ee-1f2e81a7e34f</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Current S110 does not support bigger MTU sizes, and to make writes of more than 20 bytes work, you&amp;#39;ll therefore have to implement GATT Write Long as a GATT Server, for instance following &lt;a href="https://devzone.nordicsemi.com/documentation/nrf51/5.1.0/html/a00861.html"&gt;this MSC&lt;/a&gt;. However, beware that this will not give you higher throughput in any way.&lt;/p&gt;
&lt;p&gt;You should note that (at least) iPhone 5S has an issue causing it to transfer at most 1 packet per interval, and this is most likely the cause of your slowdown, as you can see from &lt;a href="https://devzone.nordicsemi.com/index.php/how-do-i-calculate-throughput-for-a-ble-link"&gt;this question&lt;/a&gt;. This issue should be fixed in a future version of iOS, but I can&amp;#39;t really promise anything. Unfortunately, I&amp;#39;m not aware of any workaround for this problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>