<?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>nRF52832 BLE improve transfer file with UART service</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48212/nrf52832-ble-improve-transfer-file-with-uart-service</link><description>Hi 
 We are using today nRF52832 and communicate through Nordic UART service (NUS). 
 Sometimes we would like to transfer files from our device to the app. This is going very slow. 
 Our default setup is: - connection interval 50ms - MTU size 23 bytes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Jun 2019 11:48:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48212/nrf52832-ble-improve-transfer-file-with-uart-service" /><item><title>RE: nRF52832 BLE improve transfer file with UART service</title><link>https://devzone.nordicsemi.com/thread/191628?ContentTypeID=1</link><pubDate>Fri, 07 Jun 2019 11:48:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5648705c-1499-48a6-82b7-720c64bd8725</guid><dc:creator>PederOlav</dc:creator><description>&lt;p&gt;Thank you very much for good and understandable answers :-)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Peder Olav&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE improve transfer file with UART service</title><link>https://devzone.nordicsemi.com/thread/191615?ContentTypeID=1</link><pubDate>Fri, 07 Jun 2019 11:16:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b5029c2-04ee-4496-9be2-3b7b881dedef</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Peder Olav,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;/p&gt;&lt;p&gt;1) What is the reason why our device (slave) respond with an Empty PDU first, after received a write request?&lt;/p&gt;&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If the slave does not have any data to send at the scheduled connection interval it will respond with an empty PDU. Both master and SLave will send empty PDUs if there are no data to be sent in order to maintain link synchronization, i.e. make sure that the timers that keep track of when to turn the radio on in TX/RX mode does not drift apart.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]2) We have now set wr_auth=1. If we set this to 0, will we get higher transfer rate? And if so what kind of pitfalls can there be?[/quote]
&lt;p&gt;&amp;nbsp;Yes, Write Commands and Write Requests will require the application to authorize any values that is written to which reduce the throughput., please see the GATT Server&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/group___b_l_e___g_a_t_t_s___m_s_c.html"&gt;Message Sequence Charts&lt;/a&gt;&amp;nbsp;as well as the&amp;nbsp;&lt;a title="Bluetooth Low Energy data throughput" href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/ble_data_throughput/ble_data_throughput.html?cp=3_4_1_0_16"&gt;Bluetooth Low Energy data throughput&lt;/a&gt;&amp;nbsp;section of the S132 SoftDevice Specification. Read/Write Authorization can be useful in some cases, but if throughput is the most important factor, then you should go for Write Commands without authorization.&amp;nbsp;&lt;/p&gt;
[quote user=""]3) Should we increase the MTU size from 23? Is this a good choice? If increasing the MTU size will this mean higher current consumption?[/quote]
&lt;p&gt;&amp;nbsp;Increasing the ATT MTU size will result in less overhead as you can fit more ATT data within one BLE packet. You reduce the overhead by not sending the ATT header, which in turn is more effcient use of the radio.&amp;nbsp;&lt;/p&gt;
[quote user=""]4) Is it possible within the same software, since our device can both act like Central and Pheripheral, to have two different MTU sizes?&lt;br /&gt; E.g when Master runs with 23 bytes and Slave with 128 bytes.[/quote]
&lt;p&gt;As of S132 v4.0.x the MTU length can be individually configured per link. So yes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;4) Are there other ways we can improve the transfer with NUS?&lt;/p&gt;
&lt;p&gt;5) Should we look into another service, e.g. Object Transfer Service?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I recommend that you take a look at the&amp;nbsp;&lt;a title="Experimental: ATT_MTU Throughput Example" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_att_mtu.html?cp=5_1_4_2_1_0"&gt;Experimental: ATT_MTU Throughput Example&lt;/a&gt;&amp;nbsp;in our SDK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE improve transfer file with UART service</title><link>https://devzone.nordicsemi.com/thread/191289?ContentTypeID=1</link><pubDate>Thu, 06 Jun 2019 09:44:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11b7cba2-ccde-4f78-aec6-4f253ebd5b18</guid><dc:creator>awneil</dc:creator><description>[quote userid="79337" url="~/f/nordic-q-a/48212/nrf52832-ble-improve-transfer-file-with-uart-service/191242"] I guess the phone will use perhaps the min.interval[/quote]
&lt;p&gt;Unfortunately not.&lt;/p&gt;
&lt;p&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;As I said,&amp;nbsp;&lt;span&gt;most phones will not allow that low.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE improve transfer file with UART service</title><link>https://devzone.nordicsemi.com/thread/191242?ContentTypeID=1</link><pubDate>Thu, 06 Jun 2019 07:29:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09070575-a2c7-4ac2-976f-82bec59ff3ca</guid><dc:creator>PederOlav</dc:creator><description>&lt;p&gt;You are right. I checked our software and min. interval is 7.5 ms and max. 50 ms for our peripheral setup. Latency is 0.So I guess the phone will use perhaps the min.interval&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE improve transfer file with UART service</title><link>https://devzone.nordicsemi.com/thread/191180?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2019 16:34:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fb4767b-443e-4a22-84d9-ad1d4c7e3ad2</guid><dc:creator>awneil</dc:creator><description>[quote userid="79337" url="~/f/nordic-q-a/48212/nrf52832-ble-improve-transfer-file-with-uart-service"]connection interval 50ms[/quote]
&lt;p&gt;That&amp;#39;s very slow!&lt;/p&gt;
&lt;p&gt;The spec minimum limit is 7.5ms, although most phones will not allow that low.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>