<?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>BLE UART send bytes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12730/ble-uart-send-bytes</link><description>I&amp;#39;m using ble_nus_string_send() to send 15 bytes over BLE UART. 
 As expected it sends 15 bytes, however on occasion 14 bytes are sent instead of 15 bytes. 
 Would there be a particular reason for this to occur? 
 void uart_event_handle(app_uart_evt_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Mar 2016 13:28:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12730/ble-uart-send-bytes" /><item><title>RE: BLE UART send bytes</title><link>https://devzone.nordicsemi.com/thread/48336?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2016 13:28:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52bcea7d-bcd4-4471-8815-4b714302a17c</guid><dc:creator>ypearson</dc:creator><description>&lt;p&gt;This error was due to a android app bug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE UART send bytes</title><link>https://devzone.nordicsemi.com/thread/48337?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2016 11:00:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54be3c6e-c9ad-4f8b-a1e0-f1191d1583e4</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Are you surely calling ble_nus_sting_send function with index = 15 every time?  Any error code returned from ble_nus_sting_send function? Are you perhaps only sending one byte every time? To maximize throughput, you should set 20 bytes in each packet, i.e. call ble_nus_sting_send first when you have accumulated 20 bytes for transmission. One call to ble_nus_sting_send will transmit one data packet over BLE.&lt;/p&gt;
&lt;p&gt;Are you using the standard ble_app_uart example from nRF51 SDK 11.0.0? nRF51 or nRF52? What softdevice?&lt;/p&gt;
&lt;p&gt;Perhaps the &lt;a href="https://devzone.nordicsemi.com/question/41090/what-does-sd_ble_tx_buffer_count_get-return/?answer=43938#post-id-43938"&gt;softdevice buffer&lt;/a&gt; is full. In that case, you will receive error &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s110.api.v8.0.0/group__ble__err.html?cp=2_6_0_0_0_2_0_2_3#ga901e1bc3ccae29eff9fb31cabdbb5e02"&gt;BLE_ERROR_NO_TX_BUFFERS&lt;/a&gt;. See also these threads &lt;a href="https://devzone.nordicsemi.com/question/2540/understanding-ble_evt_tx_complete/"&gt;(1)&lt;/a&gt; &lt;a href="https://devzone.nordicsemi.com/question/72219/stream-live-sensor-data-from-ble_uart-application/?answer=72687#post-id-72687"&gt;(2)&lt;/a&gt; and the documentation for &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s110.api.v8.0.0/group___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html?cp=2_6_0_0_0_2_3_5_2#ga313fe43c2e93267da668572e885945db"&gt;sd_ble_gatts_hvx&lt;/a&gt; which is the function used to send notification packets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>